2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Changes to support win32

This commit is contained in:
Danny Mayer 2001-07-26 03:15:16 +00:00
parent 64dab5aca2
commit 922a15c7c0
11 changed files with 62 additions and 59 deletions

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 * Notice to programmers: Do not use this code as an example of how to
@ -70,15 +70,15 @@
#ifdef HAVE_GETADDRINFO #ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR #ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO #define USE_GETADDRINFO
#define HAVE_H_ERRNO
#endif #endif
#endif #endif
#endif #endif
#ifndef HAVE_H_ERRNO #ifndef USE_GETADDRINFO
#define HAVE_H_ERRNO #ifndef ISC_PLATFORM_NONSTDHERRNO
extern int h_errno; extern int h_errno;
#endif #endif
#endif
ISC_LIST(dig_lookup_t) lookup_list; ISC_LIST(dig_lookup_t) lookup_list;
dig_serverlist_t server_list; dig_serverlist_t server_list;

View File

@ -15,17 +15,12 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 <config.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
#ifndef HAVE_H_ERRNO
#define HAVE_H_ERRNO
extern int h_errno;
#endif
#include <isc/app.h> #include <isc/app.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/netaddr.h> #include <isc/netaddr.h>
@ -44,6 +39,10 @@ extern int h_errno;
#include <dig/dig.h> #include <dig/dig.h>
#ifndef ISC_PLATFORM_NONSTDHERRNO
extern int h_errno;
#endif
extern ISC_LIST(dig_lookup_t) lookup_list; extern ISC_LIST(dig_lookup_t) lookup_list;
extern ISC_LIST(dig_server_t) server_list; extern ISC_LIST(dig_server_t) server_list;
extern ISC_LIST(dig_searchlist_t) search_list; extern ISC_LIST(dig_searchlist_t) search_list;

View File

@ -15,17 +15,12 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 <config.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#ifndef HAVE_H_ERRNO
#define HAVE_H_ERRNO
extern int h_errno;
#endif
#include <isc/app.h> #include <isc/app.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
@ -48,6 +43,10 @@ extern int h_errno;
#include <dig/dig.h> #include <dig/dig.h>
#ifndef ISC_PLATFORM_NONSTDHERRNO
extern int h_errno;
#endif
extern ISC_LIST(dig_lookup_t) lookup_list; extern ISC_LIST(dig_lookup_t) lookup_list;
extern ISC_LIST(dig_server_t) server_list; extern ISC_LIST(dig_server_t) server_list;
extern ISC_LIST(dig_searchlist_t) search_list; extern ISC_LIST(dig_searchlist_t) search_list;

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
@ -62,7 +62,7 @@ int bindmain()
/* Command line users should put -f in the options */ /* Command line users should put -f in the options */
while (argv[i]) { while (argv[i]) {
if (!strcmp(argv[i], "-f") || !strcmp(argv[i], "/f")) { if (!strcmp(argv[i], "-f") || !strcmp(argv[i], "-g")) {
foreground = TRUE; foreground = TRUE;
break; break;
} }

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 <config.h> #include <config.h>
@ -70,14 +70,15 @@
#ifdef HAVE_GETADDRINFO #ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR #ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO #define USE_GETADDRINFO
#define HAVE_H_ERRNO
#endif #endif
#endif #endif
#endif #endif
#ifndef HAVE_H_ERRNO #ifndef USE_GETADDRINFO
#ifndef ISC_PLATFORM_NONSTDHERRNO
extern int h_errno; extern int h_errno;
#endif #endif
#endif
#define MAXCMD (4 * 1024) #define MAXCMD (4 * 1024)
#define INITDATA (32 * 1024) #define INITDATA (32 * 1024)

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 * Principal Author: DCL
@ -56,15 +56,15 @@
#ifdef HAVE_GETADDRINFO #ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR #ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO #define USE_GETADDRINFO
#define HAVE_H_ERRNO
#endif #endif
#endif #endif
#endif #endif
#ifndef HAVE_H_ERRNO #ifndef USE_GETADDRINFO
#define HAVE_H_ERRNO #ifndef ISC_PLATFORM_NONSTDHERRNO
extern int h_errno; extern int h_errno;
#endif #endif
#endif
char *progname; char *progname;
isc_boolean_t verbose; isc_boolean_t verbose;
@ -369,7 +369,8 @@ main(int argc, char **argv) {
int ch; int ch;
int i; int i;
admin_conffile = RNDC_SYSCONFDIR "/rndc.conf"; admin_conffile = RNDC_SYSCONFPATH;
isc_app_start(); isc_app_start();
result = isc_file_progname(*argv, program, sizeof(program)); result = isc_file_progname(*argv, program, sizeof(program));

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 * win32 configuration file
@ -172,17 +172,7 @@ typedef long off_t;
* Set up the Version Information * Set up the Version Information
*/ */
#include <versions.h> #include <versions.h>
/*
* 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" #define PATH_RANDOMDEV "CryptAPI"

View File

@ -48,7 +48,7 @@
* SUCH DAMAGE. * 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 * Principal Authors: Computer Systems Research Group at UC Berkeley
@ -83,15 +83,14 @@
#include <isc/boolean.h> #include <isc/boolean.h>
#include <isc/lang.h> #include <isc/lang.h>
/* Index into parent argv vector. */ int isc_commandline_index = 1; /* Index into parent argv vector. */
/* Argument associated with option. */ int isc_commandline_option; /* Character checked for validity. */
char *isc_commandline_argument;
int isc_commandline_index = 1; char *isc_commandline_argument; /* Argument associated with option. */
isc_commandline_option; char *isc_commandline_progname; /* For printing error messages. */
char *isc_commandline_argument;
char *isc_commandline_progname; isc_boolean_t isc_commandline_errprint = ISC_TRUE;/* Print error messages. */
isc_boolean_t isc_commandline_errprint = ISC_TRUE; isc_boolean_t isc_commandline_reset = ISC_TRUE; /* Reset processing. */
isc_boolean_t isc_commandline_reset = ISC_TRUE;
#define BADOPT '?' #define BADOPT '?'
#define BADARG ':' #define BADARG ':'

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 * Windows-specific path definitions
@ -26,6 +26,8 @@
#ifndef ISC_NTPATHS_H #ifndef ISC_NTPATHS_H
#define ISC_NTPATHS_H #define ISC_NTPATHS_H
#include <isc/lang.h>
/* /*
* Index of paths needed * Index of paths needed
*/ */
@ -38,10 +40,25 @@ enum NtPaths {
LWRESD_PID_PATH 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 void
isc_ntpaths_init(void); isc_ntpaths_init(void);
char * char *
isc_ntpaths_get(int); isc_ntpaths_get(int);
ISC_LANG_ENDDECLS
#endif /* ISC_NTPATHS_H */ #endif /* ISC_NTPATHS_H */

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 #ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1 #define ISC_PLATFORM_H 1
@ -47,6 +47,11 @@
#define ISC_PLATFORM_USEDECLSPEC 1 #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 * Set up a macro for importing and exporting from the DLL
*/ */
@ -74,10 +79,4 @@
#define LIBDNS_EXTERNAL_DATA __declspec( dllimport ) #define LIBDNS_EXTERNAL_DATA __declspec( dllimport )
#endif #endif
#ifdef LIBLWRES_EXPORTS
#define LIBLWRES_EXTERNAL_DATA __declspec( dllexport )
#else
#define LIBLWRES_EXTERNAL_DATA __declspec( dllimport )
#endif
#endif /* ISC_PLATFORM_H */ #endif /* ISC_PLATFORM_H */

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 #ifndef LWRES_PLATFORM_H
#define LWRES_PLATFORM_H 1 #define LWRES_PLATFORM_H 1
@ -70,13 +70,11 @@
/* /*
* Define some Macros * Define some Macros
*/ */
#ifndef LIBLWRES_EXTERNAL_DATA
#ifdef LIBLWRES_EXPORTS #ifdef LIBLWRES_EXPORTS
#define LIBLWRES_EXTERNAL_DATA __declspec(dllexport) #define LIBLWRES_EXTERNAL_DATA __declspec(dllexport)
#else #else
#define LIBLWRES_EXTERNAL_DATA __declspec(dllimport) #define LIBLWRES_EXTERNAL_DATA __declspec(dllimport)
#endif #endif
#endif
/* /*
* Define the MAKE_NONBLOCKING Macro here since it can get used in * Define the MAKE_NONBLOCKING Macro here since it can get used in