From 0a86b45b9d4b8a6f34e2dcee80bf06368d478a85 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Sat, 31 May 2003 03:52:02 +0000 Subject: [PATCH] * gpgkeys_hkp.c, gpgkeys_ldap.c: #include if it is available. Also include extern references for optarg and optind since there is no guarantee that any header file will include them. Standards? We don't need no stinkin' standards * Makefile.am: Use @GETOPT@ to pull in libiberty on those platforms that need it. --- keyserver/ChangeLog | 10 ++++++++++ keyserver/Makefile.am | 7 ++----- keyserver/gpgkeys_hkp.c | 6 ++++++ keyserver/gpgkeys_ldap.c | 6 ++++++ 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog index 2ca7559ad..a22618f25 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog @@ -1,3 +1,13 @@ +2003-05-30 David Shaw + + * gpgkeys_hkp.c, gpgkeys_ldap.c: #include if it is + available. Also include extern references for optarg and optind + since there is no guarantee that any header file will include + them. Standards? We don't need no stinkin' standards + + * Makefile.am: Use @GETOPT@ to pull in libiberty on those + platforms that need it. + 2003-04-08 David Shaw * gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory diff --git a/keyserver/Makefile.am b/keyserver/Makefile.am index 7e90fca3f..c595e42c1 100644 --- a/keyserver/Makefile.am +++ b/keyserver/Makefile.am @@ -23,12 +23,9 @@ EXTRA_PROGRAMS = gpgkeys_ldap gpgkeys_hkp EXTRA_SCRIPTS = gpgkeys_mailto libexecdir = @libexecdir@/@PACKAGE@ -# We don't need the libs the regular GPG binaries do -LIBS= - libexec_PROGRAMS = @GPGKEYS_LDAP@ @GPGKEYS_HKP@ libexec_SCRIPTS = @GPGKEYS_MAILTO@ noinst_SCRIPTS = gpgkeys_test -gpgkeys_ldap_LDADD = @LDAPLIBS@ @NETLIBS@ -gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ @INTLLIBS@ @CAPLIBS@ +gpgkeys_ldap_LDADD = @LDAPLIBS@ @NETLIBS@ @GETOPT@ +gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ @INTLLIBS@ @CAPLIBS@ @GETOPT@ diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c index 96c81985a..51487d17f 100644 --- a/keyserver/gpgkeys_hkp.c +++ b/keyserver/gpgkeys_hkp.c @@ -25,11 +25,17 @@ #include #include #include +#ifdef HAVE_GETOPT_H +#include +#endif #define INCLUDED_BY_MAIN_MODULE 1 #include "util.h" #include "http.h" #include "keyserver.h" +extern char *optarg; +extern int optind; + #define GET 0 #define SEND 1 #define SEARCH 2 diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c index aecf163e6..ff42eff7b 100644 --- a/keyserver/gpgkeys_ldap.c +++ b/keyserver/gpgkeys_ldap.c @@ -23,6 +23,9 @@ #include #include #include +#ifdef HAVE_GETOPT_H +#include +#endif #include #include #ifdef NEED_LBER_H @@ -35,6 +38,9 @@ #include "util.h" #endif +extern char *optarg; +extern int optind; + #define GET 0 #define SEND 1 #define SEARCH 2