diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index d0b5903ff3..0675e2f027 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.209 2001/07/22 18:09:46 bwelling Exp $ */ +/* $Id: dighost.c,v 1.210 2001/07/26 03:15:05 mayer Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -70,15 +70,15 @@ #ifdef HAVE_GETADDRINFO #ifdef HAVE_GAISTRERROR #define USE_GETADDRINFO -#define HAVE_H_ERRNO #endif #endif #endif -#ifndef HAVE_H_ERRNO -#define HAVE_H_ERRNO +#ifndef USE_GETADDRINFO +#ifndef ISC_PLATFORM_NONSTDHERRNO extern int h_errno; #endif +#endif ISC_LIST(dig_lookup_t) lookup_list; dig_serverlist_t server_list; diff --git a/bin/dig/host.c b/bin/dig/host.c index f535d319b4..83ee8aac69 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -15,17 +15,12 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: host.c,v 1.67 2001/07/22 06:03:05 mayer Exp $ */ +/* $Id: host.c,v 1.68 2001/07/26 03:15:06 mayer Exp $ */ #include #include #include -#ifndef HAVE_H_ERRNO -#define HAVE_H_ERRNO -extern int h_errno; -#endif - #include #include #include @@ -44,6 +39,10 @@ extern int h_errno; #include +#ifndef ISC_PLATFORM_NONSTDHERRNO +extern int h_errno; +#endif + extern ISC_LIST(dig_lookup_t) lookup_list; extern ISC_LIST(dig_server_t) server_list; extern ISC_LIST(dig_searchlist_t) search_list; diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index 33def77232..3c1f7a60e6 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -15,17 +15,12 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nslookup.c,v 1.83 2001/07/22 06:03:06 mayer Exp $ */ +/* $Id: nslookup.c,v 1.84 2001/07/26 03:15:07 mayer Exp $ */ #include #include -#ifndef HAVE_H_ERRNO -#define HAVE_H_ERRNO -extern int h_errno; -#endif - #include #include #include @@ -48,6 +43,10 @@ extern int h_errno; #include +#ifndef ISC_PLATFORM_NONSTDHERRNO +extern int h_errno; +#endif + extern ISC_LIST(dig_lookup_t) lookup_list; extern ISC_LIST(dig_server_t) server_list; extern ISC_LIST(dig_searchlist_t) search_list; diff --git a/bin/named/win32/ntservice.c b/bin/named/win32/ntservice.c index 8a5041bfe5..13f2ac3ab9 100644 --- a/bin/named/win32/ntservice.c +++ b/bin/named/win32/ntservice.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ntservice.c,v 1.2 2001/07/18 18:42:48 gson Exp $ */ +/* $Id: ntservice.c,v 1.3 2001/07/26 03:15:08 mayer Exp $ */ #include #include @@ -62,7 +62,7 @@ int bindmain() /* Command line users should put -f in the options */ while (argv[i]) { - if (!strcmp(argv[i], "-f") || !strcmp(argv[i], "/f")) { + if (!strcmp(argv[i], "-f") || !strcmp(argv[i], "-g")) { foreground = TRUE; break; } diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index dac21f4ca5..d977923995 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.101 2001/07/22 06:11:44 mayer Exp $ */ +/* $Id: nsupdate.c,v 1.102 2001/07/26 03:15:10 mayer Exp $ */ #include @@ -70,14 +70,15 @@ #ifdef HAVE_GETADDRINFO #ifdef HAVE_GAISTRERROR #define USE_GETADDRINFO -#define HAVE_H_ERRNO #endif #endif #endif -#ifndef HAVE_H_ERRNO +#ifndef USE_GETADDRINFO +#ifndef ISC_PLATFORM_NONSTDHERRNO extern int h_errno; #endif +#endif #define MAXCMD (4 * 1024) #define INITDATA (32 * 1024) diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index f5655e4936..83644c07c9 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rndc.c,v 1.70 2001/07/23 16:32:40 gson Exp $ */ +/* $Id: rndc.c,v 1.71 2001/07/26 03:15:11 mayer Exp $ */ /* * Principal Author: DCL @@ -56,15 +56,15 @@ #ifdef HAVE_GETADDRINFO #ifdef HAVE_GAISTRERROR #define USE_GETADDRINFO -#define HAVE_H_ERRNO #endif #endif #endif -#ifndef HAVE_H_ERRNO -#define HAVE_H_ERRNO +#ifndef USE_GETADDRINFO +#ifndef ISC_PLATFORM_NONSTDHERRNO extern int h_errno; #endif +#endif char *progname; isc_boolean_t verbose; @@ -369,7 +369,8 @@ main(int argc, char **argv) { int ch; int i; - admin_conffile = RNDC_SYSCONFDIR "/rndc.conf"; + admin_conffile = RNDC_SYSCONFPATH; + isc_app_start(); result = isc_file_progname(*argv, program, sizeof(program)); diff --git a/config.h.win32 b/config.h.win32 index 51fd81b9a1..66334640d9 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.h.win32,v 1.5 2001/07/23 17:37:48 gson Exp $ */ +/* $Id: config.h.win32,v 1.6 2001/07/26 03:15:03 mayer Exp $ */ /* * win32 configuration file @@ -172,18 +172,8 @@ typedef long off_t; * Set up the Version Information */ #include -/* - * Information about where this are on disk - */ -#define NS_LOCALSTATEDIR "dns/bin" -#define NS_SYSCONFDIR "dns/etc" -/* - * DO NOT REMOVE TRAILING COMMENT, even though it is not conformant - * to C standards - */ -#define RNDC_SYSCONFDIR isc_ntpaths_get(RNDC_CONF_PATH); /* Done */ -/* We actually are using the CryptAPI and not a device */ +/* We actually are using the CryptAPI and not a device */ #define PATH_RANDOMDEV "CryptAPI" #include diff --git a/lib/dns/gen-win32.h b/lib/dns/gen-win32.h index 3d992154a2..86101185e9 100644 --- a/lib/dns/gen-win32.h +++ b/lib/dns/gen-win32.h @@ -48,7 +48,7 @@ * SUCH DAMAGE. */ -/* $Id: gen-win32.h,v 1.12 2001/07/22 06:22:28 mayer Exp $ */ +/* $Id: gen-win32.h,v 1.13 2001/07/26 03:15:12 mayer Exp $ */ /* * Principal Authors: Computer Systems Research Group at UC Berkeley @@ -83,15 +83,14 @@ #include #include -/* Index into parent argv vector. */ -/* Argument associated with option. */ -char *isc_commandline_argument; -int isc_commandline_index = 1; -isc_commandline_option; - char *isc_commandline_argument; -char *isc_commandline_progname; -isc_boolean_t isc_commandline_errprint = ISC_TRUE; -isc_boolean_t isc_commandline_reset = ISC_TRUE; +int isc_commandline_index = 1; /* Index into parent argv vector. */ +int isc_commandline_option; /* Character checked for validity. */ + +char *isc_commandline_argument; /* Argument associated with option. */ +char *isc_commandline_progname; /* For printing error messages. */ + +isc_boolean_t isc_commandline_errprint = ISC_TRUE;/* Print error messages. */ +isc_boolean_t isc_commandline_reset = ISC_TRUE; /* Reset processing. */ #define BADOPT '?' #define BADARG ':' diff --git a/lib/isc/win32/include/isc/ntpaths.h b/lib/isc/win32/include/isc/ntpaths.h index c3eae946c5..55915f6fb0 100644 --- a/lib/isc/win32/include/isc/ntpaths.h +++ b/lib/isc/win32/include/isc/ntpaths.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ntpaths.h,v 1.3 2001/07/09 21:34:44 gson Exp $ */ +/* $Id: ntpaths.h,v 1.4 2001/07/26 03:15:14 mayer Exp $ */ /* * Windows-specific path definitions @@ -26,6 +26,8 @@ #ifndef ISC_NTPATHS_H #define ISC_NTPATHS_H +#include + /* * Index of paths needed */ @@ -38,10 +40,25 @@ enum NtPaths { LWRESD_PID_PATH }; +/* + * Define a macro to get the path of the RNDC config file + */ +#define RNDC_SYSCONFPATH isc_ntpaths_get(RNDC_CONF_PATH) + +/* + * Information about where these are on disk + */ +#define NS_LOCALSTATEDIR "dns/bin" +#define NS_SYSCONFDIR "dns/etc" + +ISC_LANG_BEGINDECLS + void isc_ntpaths_init(void); char * isc_ntpaths_get(int); +ISC_LANG_ENDDECLS + #endif /* ISC_NTPATHS_H */ diff --git a/lib/isc/win32/include/isc/platform.h b/lib/isc/win32/include/isc/platform.h index 82d7a11ec4..7cbbb4583a 100644 --- a/lib/isc/win32/include/isc/platform.h +++ b/lib/isc/win32/include/isc/platform.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h,v 1.4 2001/07/12 05:58:28 mayer Exp $ */ +/* $Id: platform.h,v 1.5 2001/07/26 03:15:15 mayer Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -47,6 +47,11 @@ #define ISC_PLATFORM_USEDECLSPEC 1 /* + * Define this here for now as winsock2.h defines h_errno + * and we don't want to redeclare it. + */ +#define ISC_PLATFORM_NONSTDHERRNO + /* * Set up a macro for importing and exporting from the DLL */ @@ -74,10 +79,4 @@ #define LIBDNS_EXTERNAL_DATA __declspec( dllimport ) #endif -#ifdef LIBLWRES_EXPORTS -#define LIBLWRES_EXTERNAL_DATA __declspec( dllexport ) -#else -#define LIBLWRES_EXTERNAL_DATA __declspec( dllimport ) -#endif - #endif /* ISC_PLATFORM_H */ diff --git a/lib/lwres/win32/include/lwres/platform.h b/lib/lwres/win32/include/lwres/platform.h index 128e957eba..d9b14b9435 100644 --- a/lib/lwres/win32/include/lwres/platform.h +++ b/lib/lwres/win32/include/lwres/platform.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h,v 1.3 2001/07/23 03:01:56 mayer Exp $ */ +/* $Id: platform.h,v 1.4 2001/07/26 03:15:16 mayer Exp $ */ #ifndef LWRES_PLATFORM_H #define LWRES_PLATFORM_H 1 @@ -70,13 +70,11 @@ /* * Define some Macros */ -#ifndef LIBLWRES_EXTERNAL_DATA #ifdef LIBLWRES_EXPORTS #define LIBLWRES_EXTERNAL_DATA __declspec(dllexport) #else #define LIBLWRES_EXTERNAL_DATA __declspec(dllimport) #endif -#endif /* * Define the MAKE_NONBLOCKING Macro here since it can get used in