aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-04-24 14:10:15 +0000
committerWerner Koch <[email protected]>2015-04-24 14:10:15 +0000
commit575230d91bba95697518da418ea0e8712f889a0f (patch)
tree382b577e91c4aa3b335481e6bf170ce0161fee7a
parentcommon: Remove libjnlib-config.h (jnlib merge). (diff)
downloadgnupg-575230d91bba95697518da418ea0e8712f889a0f.tar.gz
gnupg-575230d91bba95697518da418ea0e8712f889a0f.zip
common: Remove two JNLIB_ macros (jnlib merge).
* configure.ac: Merge seperate jnlib checks. (HAVE_JNLIB_LOGGING): Remove. * common/logging.c, common/simple-pwquery.c (JNLIB_NEED_AFLOCAL): Rename to GNUPG_COMMON_NEED_AFLOCAL. Change all tests. -- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--agent/gpg-agent.c3
-rw-r--r--agent/preset-passphrase.c1
-rw-r--r--agent/protect-tool.c1
-rw-r--r--common/asshelp.c1
-rw-r--r--common/logging.c2
-rw-r--r--common/miscellaneous.c1
-rw-r--r--common/mischelp.h4
-rw-r--r--common/simple-pwquery.c6
-rw-r--r--common/simple-pwquery.h4
-rw-r--r--configure.ac21
-rw-r--r--dirmngr/dirmngr-client.c1
-rw-r--r--dirmngr/dirmngr.c3
-rw-r--r--dirmngr/dirmngr_ldap.c1
-rw-r--r--dirmngr/server.c1
-rw-r--r--g10/keyedit.c1
-rw-r--r--kbx/kbxutil.c1
-rw-r--r--scd/ccid-driver.c10
-rw-r--r--scd/sc-copykeys.c1
-rw-r--r--scd/scdaemon.c3
-rw-r--r--sm/certchain.c2
-rw-r--r--tools/gpg-check-pattern.c2
-rw-r--r--tools/gpgconf-comp.c1
-rw-r--r--tools/symcryptrun.c1
-rw-r--r--tools/watchgnupg.c2
24 files changed, 19 insertions, 55 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 740af7551..0a8232f28 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -49,8 +49,7 @@
#endif
#include <npth.h>
-#define JNLIB_NEED_LOG_LOGV
-#define JNLIB_NEED_AFLOCAL
+#define GNUPG_COMMON_NEED_AFLOCAL
#include "agent.h"
#include <assuan.h> /* Malloc hooks and socket wrappers. */
diff --git a/agent/preset-passphrase.c b/agent/preset-passphrase.c
index 6378d7a56..1ebf1812a 100644
--- a/agent/preset-passphrase.c
+++ b/agent/preset-passphrase.c
@@ -44,7 +44,6 @@
# include <windows.h> /* To initialize the sockets. fixme */
#endif
-#define JNLIB_NEED_LOG_LOGV
#include "agent.h"
#include "simple-pwquery.h"
#include "i18n.h"
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index dc363f2ca..03dbda939 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -38,7 +38,6 @@
#include <fcntl.h> /* for setmode() */
#endif
-#define JNLIB_NEED_LOG_LOGV
#include "agent.h"
#include "i18n.h"
#include "get-passphrase.h"
diff --git a/common/asshelp.c b/common/asshelp.c
index 51ef17227..d7125ad22 100644
--- a/common/asshelp.c
+++ b/common/asshelp.c
@@ -37,7 +37,6 @@
#include <locale.h>
#endif
-#define JNLIB_NEED_LOG_LOGV
#include "i18n.h"
#include "util.h"
#include "exechelp.h"
diff --git a/common/logging.c b/common/logging.c
index 9e7d55c34..66cd09a68 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -56,7 +56,7 @@
#include <assert.h>
-#define JNLIB_NEED_AFLOCAL 1
+#define GNUPG_COMMON_NEED_AFLOCAL 1
#include "util.h"
#include "i18n.h"
#include "common-defs.h"
diff --git a/common/miscellaneous.c b/common/miscellaneous.c
index 862e952ea..95dbb670d 100644
--- a/common/miscellaneous.c
+++ b/common/miscellaneous.c
@@ -31,7 +31,6 @@
#include <stdlib.h>
#include <errno.h>
-#define JNLIB_NEED_LOG_LOGV
#include "util.h"
#include "iobuf.h"
#include "i18n.h"
diff --git a/common/mischelp.h b/common/mischelp.h
index 0f865e2ef..df009ad5e 100644
--- a/common/mischelp.h
+++ b/common/mischelp.h
@@ -81,7 +81,7 @@ time_t timegm (struct tm *tm);
/* Include hacks which are mainly required for Slowaris. */
-#ifdef JNLIB_NEED_AFLOCAL
+#ifdef GNUPG_COMMON_NEED_AFLOCAL
#ifndef HAVE_W32_SYSTEM
# include <sys/socket.h>
# include <sys/un.h>
@@ -115,7 +115,7 @@ time_t timegm (struct tm *tm);
# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ strlen ((ptr)->sun_path))
#endif /*SUN_LEN*/
-#endif /*JNLIB_NEED_AFLOCAL*/
+#endif /*GNUPG_COMMON_NEED_AFLOCAL*/
#endif /*LIBJNLIB_MISCHELP_H*/
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
index d1b298061..90d04c08a 100644
--- a/common/simple-pwquery.c
+++ b/common/simple-pwquery.c
@@ -40,7 +40,7 @@
#include <locale.h>
#endif
-#define JNLIB_NEED_AFLOCAL
+#define GNUPG_COMMON_NEED_AFLOCAL
#include "../common/mischelp.h"
#ifdef HAVE_W32_SYSTEM
#include "../common/w32-afunix.h"
@@ -50,10 +50,6 @@
#define SIMPLE_PWQUERY_IMPLEMENTATION 1
#include "simple-pwquery.h"
-#if defined(SPWQ_USE_LOGGING) && !defined(HAVE_JNLIB_LOGGING)
-# undef SPWQ_USE_LOGGING
-#endif
-
#ifndef _
#define _(a) (a)
#endif
diff --git a/common/simple-pwquery.h b/common/simple-pwquery.h
index 04ae1f04e..5ae696a6d 100644
--- a/common/simple-pwquery.h
+++ b/common/simple-pwquery.h
@@ -26,9 +26,7 @@
#include <gcrypt.h>
#include "../common/logging.h"
-/* Try to write error message using the standard log mechanism. The
- current implementation requires that the HAVE_JNLIB_LOGGING is also
- defined. */
+/* Try to write error message using the standard gnupg log mechanism. */
#define SPWQ_USE_LOGGING 1
/* Memory allocation functions used by the implementation. Note, that
diff --git a/configure.ac b/configure.ac
index 05d423182..58e35f405 100644
--- a/configure.ac
+++ b/configure.ac
@@ -527,9 +527,6 @@ AH_BOTTOM([
/* Tell Libgcrypt not to include deprecated definitions. */
#define GCRYPT_NO_DEPRECATED 1
-/* We use jnlib, so tell other modules about it. */
-#define HAVE_JNLIB_LOGGING 1
-
/* Our HTTP code is used in estream mode. */
#define HTTP_USE_ESTREAM 1
@@ -1174,7 +1171,8 @@ fi
AC_MSG_NOTICE([checking for header files])
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h \
- pty.h utmp.h pwd.h inttypes.h signal.h sys/select.h])
+ pty.h utmp.h pwd.h inttypes.h signal.h sys/select.h \
+ signal.h])
AC_HEADER_TIME
@@ -1255,6 +1253,10 @@ AC_CHECK_FUNCS([gettimeofday getrusage getrlimit setrlimit clock_gettime])
AC_CHECK_FUNCS([atexit raise getpagesize strftime nl_langinfo setlocale])
AC_CHECK_FUNCS([waitpid wait4 sigaction sigprocmask pipe getaddrinfo])
AC_CHECK_FUNCS([ttyname rand ftello fsync stat lstat])
+AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol \
+ memrchr isascii timegm getrusage setrlimit stat setlocale \
+ flockfile funlockfile fopencookie funopen getpwnam getpwuid \
+ getenv inet_pton strpbrk])
if test "$have_android_system" = yes; then
# On Android ttyname is a stub but prints an error message.
@@ -1270,17 +1272,6 @@ if test $ac_cv_func_mmap != yes -a $mmap_needed = yes; then
fi
#
-# These are needed by the jnlib parts in common.
-# Note: We already checked pwd.h.
-AC_CHECK_HEADERS([signal.h])
-AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol \
- memrchr isascii timegm getrusage setrlimit stat setlocale \
- flockfile funlockfile fopencookie funopen getpwnam getpwuid \
- getenv inet_pton strpbrk])
-# end jnlib checks.
-
-
-#
# W32 specific test
#
GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
diff --git a/dirmngr/dirmngr-client.c b/dirmngr/dirmngr-client.c
index 770e941a4..5938ed2ec 100644
--- a/dirmngr/dirmngr-client.c
+++ b/dirmngr/dirmngr-client.c
@@ -31,7 +31,6 @@
#include <gpg-error.h>
#include <assuan.h>
-#define JNLIB_NEED_LOG_LOGV
#include "../common/logging.h"
#include "../common/argparse.h"
#include "../common/stringhelp.h"
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 437c6ebdd..504b13eaf 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -50,8 +50,7 @@
#endif /*HTTP_USE_GNUTLS*/
-#define JNLIB_NEED_LOG_LOGV
-#define JNLIB_NEED_AFLOCAL
+#define GNUPG_COMMON_NEED_AFLOCAL
#include "dirmngr.h"
#include <assuan.h>
diff --git a/dirmngr/dirmngr_ldap.c b/dirmngr/dirmngr_ldap.c
index 981b5ccf1..b4c9bda4a 100644
--- a/dirmngr/dirmngr_ldap.c
+++ b/dirmngr/dirmngr_ldap.c
@@ -49,7 +49,6 @@
#endif
-#define JNLIB_NEED_LOG_LOGV
#include <gpg-error.h>
#include "../common/logging.h"
#include "../common/argparse.h"
diff --git a/dirmngr/server.c b/dirmngr/server.c
index df6c66fcc..1b7e9e9ce 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -30,7 +30,6 @@
#include <unistd.h>
#include <errno.h>
-#define JNLIB_NEED_LOG_LOGV
#include "dirmngr.h"
#include <assuan.h>
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 2f9469f17..8f64729d5 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -31,7 +31,6 @@
# include <readline/readline.h>
#endif
-#define JNLIB_NEED_LOG_LOGV
#include "gpg.h"
#include "options.h"
#include "packet.h"
diff --git a/kbx/kbxutil.c b/kbx/kbxutil.c
index 368c02d22..178b9e8e0 100644
--- a/kbx/kbxutil.c
+++ b/kbx/kbxutil.c
@@ -28,7 +28,6 @@
#include <limits.h>
#include <assert.h>
-#define JNLIB_NEED_LOG_LOGV
#include <gpg-error.h>
#include "../common/logging.h"
#include "../common/argparse.h"
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 151b371b4..4f0a4897e 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -108,12 +108,10 @@
#define CCID_MAX_BUF (2048+7+10)
/* 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))
+ output to go to stderr or to the GnuPG based logging functions. We
+ use the latter when GNUPG_MAJOR_VERSION or GNUPG_SCD_MAIN_HEADER
+ are defined. */
+#if defined(GNUPG_MAJOR_VERSION) || defined(GNUPG_SCD_MAIN_HEADER)
#if defined(GNUPG_SCD_MAIN_HEADER)
# include GNUPG_SCD_MAIN_HEADER
diff --git a/scd/sc-copykeys.c b/scd/sc-copykeys.c
index e503d3665..eb246c492 100644
--- a/scd/sc-copykeys.c
+++ b/scd/sc-copykeys.c
@@ -27,7 +27,6 @@
#include <sys/stat.h>
#include <unistd.h>
-#define JNLIB_NEED_LOG_LOGV
#include "scdaemon.h"
#include <gcrypt.h>
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index 39925ce99..2cabee87d 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -37,8 +37,7 @@
#include <signal.h>
#include <npth.h>
-#define JNLIB_NEED_LOG_LOGV
-#define JNLIB_NEED_AFLOCAL
+#define GNUPG_COMMON_NEED_AFLOCAL
#include "scdaemon.h"
#include <ksba.h>
#include <gcrypt.h>
diff --git a/sm/certchain.c b/sm/certchain.c
index 5e632f798..2c8fe49ee 100644
--- a/sm/certchain.c
+++ b/sm/certchain.c
@@ -28,8 +28,6 @@
#include <stdarg.h>
#include <assert.h>
-#define JNLIB_NEED_LOG_LOGV /* We need log_logv. */
-
#include "gpgsm.h"
#include <gcrypt.h>
#include <ksba.h>
diff --git a/tools/gpg-check-pattern.c b/tools/gpg-check-pattern.c
index e76f12140..83f655031 100644
--- a/tools/gpg-check-pattern.c
+++ b/tools/gpg-check-pattern.c
@@ -40,8 +40,6 @@
#include <regex.h>
#include <ctype.h>
-
-#define JNLIB_NEED_LOG_LOGV
#include "util.h"
#include "i18n.h"
#include "sysutils.h"
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 01c4135fa..b993efb77 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -44,7 +44,6 @@
#endif
/* For log_logv(), asctimestamp(), gnupg_get_time (). */
-#define JNLIB_NEED_LOG_LOGV
#include "util.h"
#include "i18n.h"
#include "exechelp.h"
diff --git a/tools/symcryptrun.c b/tools/symcryptrun.c
index c7fc5b6b3..3b73cf407 100644
--- a/tools/symcryptrun.c
+++ b/tools/symcryptrun.c
@@ -86,7 +86,6 @@
#endif
#include <gpg-error.h>
-#define JNLIB_NEED_LOG_LOGV
#include "i18n.h"
#include "../common/util.h"
#include "../common/init.h"
diff --git a/tools/watchgnupg.c b/tools/watchgnupg.c
index 9118aa056..b22635745 100644
--- a/tools/watchgnupg.c
+++ b/tools/watchgnupg.c
@@ -49,7 +49,7 @@
#define BUGREPORT_LINE ""
#endif
#if !defined(SUN_LEN) || !defined(PF_LOCAL) || !defined(AF_LOCAL)
-#define JNLIB_NEED_AFLOCAL
+#define GNUPG_COMMON_NEED_AFLOCAL
#include "../common/mischelp.h"
#endif