Commit 922a15c7 authored by Danny Mayer's avatar Danny Mayer
Browse files

Changes to support win32

parent 64dab5ac
......@@ -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;
......
......@@ -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 <config.h>
#include <stdlib.h>
#include <limits.h>
#ifndef HAVE_H_ERRNO
#define HAVE_H_ERRNO
extern int h_errno;
#endif
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/netaddr.h>
......@@ -44,6 +39,10 @@ extern int h_errno;
#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_server_t) server_list;
extern ISC_LIST(dig_searchlist_t) search_list;
......
......@@ -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 <config.h>
#include <stdlib.h>
#ifndef HAVE_H_ERRNO
#define HAVE_H_ERRNO
extern int h_errno;
#endif
#include <isc/app.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
......@@ -48,6 +43,10 @@ extern int h_errno;
#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_server_t) server_list;
extern ISC_LIST(dig_searchlist_t) search_list;
......
......@@ -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 <config.h>
#include <stdio.h>
......@@ -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;
}
......
......@@ -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 <config.h>
......@@ -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)
......
......@@ -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));
......
......@@ -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 <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"
#include <stddef.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 <isc/boolean.h>
#include <isc/lang.h>
/* 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 ':'
......
......@@ -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 <isc/lang.h>
/*
* 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 */
......@@ -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 */
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment