summaryrefslogtreecommitdiffstats
path: root/scd/ccid-driver.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2004-03-16 11:49:37 +0100
committerWerner Koch <wk@gnupg.org>2004-03-16 11:49:37 +0100
commitf8d44bc637a4c897fd4448de804ee08ae065e194 (patch)
tree03c71726ae3204c67c8dae3fbcdbd4b8c07376a6 /scd/ccid-driver.c
parent* configure.ac (NEED_GPG_ERROR_VERSION): Set to 0.7. (diff)
downloadgnupg2-f8d44bc637a4c897fd4448de804ee08ae065e194.tar.xz
gnupg2-f8d44bc637a4c897fd4448de804ee08ae065e194.zip
*** empty log message ***
Diffstat (limited to 'scd/ccid-driver.c')
-rw-r--r--scd/ccid-driver.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index ca5620176..b398e3ce3 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -87,16 +87,24 @@
#define DRVNAME "ccid-driver: "
-#ifdef GNUPG_MAJOR_VERSION /* This source is used within GnuPG. */
+/* Depending on how this source is used we either define our error
+ output to go to stderr or to the jnlib based logging functions. We
+ use the latter when GNUPG_MAJOR_VERSION is defines or when both,
+ GNUPG_SCD_MAIN_HEADER and HAVE_JNLIB_LOGGING are defined.
+*/
+#if defined(GNUPG_MAJOR_VERSION) \
+ || (defined(GNUPG_SCD_MAIN_HEADER) && defined(HAVE_JNLIB_LOGGING))
-# if GNUPG_MAJOR_VERSION == 1 /* GnuPG Version is < 1.9. */
+#if defined(GNUPG_SCD_MAIN_HEADER)
+# include GNUPG_SCD_MAIN_HEADER
+#elif GNUPG_MAJOR_VERSION == 1 /* GnuPG Version is < 1.9. */
# include "options.h"
# include "util.h"
# include "memory.h"
# include "cardglue.h"
# else /* This is the modularized GnuPG 1.9 or later. */
# include "scdaemon.h"
-# endif
+#endif
/* Disable all debugging output for now. */
#undef DBG_CARD_IO