diff --git a/lib/isc/assertions.c b/lib/isc/assertions.c index 6a00a0d9fc..63a2a5ce79 100644 --- a/lib/isc/assertions.c +++ b/lib/isc/assertions.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: assertions.c,v 1.14 2001/01/09 21:55:53 bwelling Exp $ */ +/* $Id: assertions.c,v 1.15 2001/07/12 05:58:17 mayer Exp $ */ #include @@ -36,7 +36,7 @@ default_callback(const char *, int, isc_assertiontype_t, const char *); * Public. */ -isc_assertioncallback_t isc_assertion_failed = default_callback; +LIBISC_EXTERNAL_DATA isc_assertioncallback_t isc_assertion_failed = default_callback; void isc_assertion_setcallback(isc_assertioncallback_t cb) { diff --git a/lib/isc/commandline.c b/lib/isc/commandline.c index a2e4cff874..5120140663 100644 --- a/lib/isc/commandline.c +++ b/lib/isc/commandline.c @@ -48,7 +48,7 @@ * SUCH DAMAGE. */ -/* $Id: commandline.c,v 1.13 2001/03/01 22:40:09 bwelling Exp $ */ +/* $Id: commandline.c,v 1.14 2001/07/12 05:58:18 mayer Exp $ */ /* * This file was adapted from the NetBSD project's source tree, RCS ID: @@ -72,14 +72,14 @@ #include #include -int isc_commandline_index = 1; /* Index into parent argv vector. */ -int isc_commandline_option; /* Character checked for validity. */ +LIBISC_EXTERNAL_DATA int isc_commandline_index = 1; /* Index into parent argv vector. */ +LIBISC_EXTERNAL_DATA int isc_commandline_option; /* Character checked for validity. */ -char *isc_commandline_argument; /* Argument associated with option. */ -char *isc_commandline_progname; /* For printing error messages. */ +LIBISC_EXTERNAL_DATA char *isc_commandline_argument; /* Argument associated with option. */ +LIBISC_EXTERNAL_DATA 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. */ +LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_errprint = ISC_TRUE; /* Print error messages. */ +LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_reset = ISC_TRUE; /* Reset processing. */ static char endopt = '\0'; diff --git a/lib/isc/include/isc/assertions.h b/lib/isc/include/isc/assertions.h index 1c808373c3..45855c6631 100644 --- a/lib/isc/include/isc/assertions.h +++ b/lib/isc/include/isc/assertions.h @@ -16,13 +16,14 @@ */ /* - * $Id: assertions.h,v 1.16 2001/03/05 18:47:00 mayer Exp $ + * $Id: assertions.h,v 1.17 2001/07/12 05:58:21 mayer Exp $ */ #ifndef ISC_ASSERTIONS_H #define ISC_ASSERTIONS_H 1 #include +#include ISC_LANG_BEGINDECLS @@ -36,7 +37,7 @@ typedef enum { typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t, const char *); -extern isc_assertioncallback_t isc_assertion_failed; +LIBISC_EXTERNAL_DATA extern isc_assertioncallback_t isc_assertion_failed; void isc_assertion_setcallback(isc_assertioncallback_t); diff --git a/lib/isc/include/isc/commandline.h b/lib/isc/include/isc/commandline.h index 085139e94c..563063b227 100644 --- a/lib/isc/include/isc/commandline.h +++ b/lib/isc/include/isc/commandline.h @@ -15,22 +15,24 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: commandline.h,v 1.7 2001/01/09 21:56:49 bwelling Exp $ */ +/* $Id: commandline.h,v 1.8 2001/07/12 05:58:22 mayer Exp $ */ #ifndef ISC_COMMANDLINE_H #define ISC_COMMANDLINE_H 1 #include #include +#include -extern int isc_commandline_index; /* Index into parent argv vector. */ -extern int isc_commandline_option; /* Character checked for validity. */ -extern char *isc_commandline_argument; /* Argument associated with option. */ -extern char *isc_commandline_progname; /* For printing error messages. */ +LIBISC_EXTERNAL_DATA extern int isc_commandline_index; /* Index into parent argv vector. */ +LIBISC_EXTERNAL_DATA extern int isc_commandline_option; /* Character checked for validity. */ -extern isc_boolean_t isc_commandline_errprint; /* Print error message. */ -extern isc_boolean_t isc_commandline_reset; /* Reset getopt. */ +LIBISC_EXTERNAL_DATA extern char *isc_commandline_argument; /* Argument associated with option. */ +LIBISC_EXTERNAL_DATA extern char *isc_commandline_progname; /* For printing error messages. */ + +LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_errprint; /* Print error message. */ +LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_reset; /* Reset getopt. */ ISC_LANG_BEGINDECLS diff --git a/lib/isc/include/isc/log.h b/lib/isc/include/isc/log.h index 1880e2867e..dfbb4e2bff 100644 --- a/lib/isc/include/isc/log.h +++ b/lib/isc/include/isc/log.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.h,v 1.38 2001/03/05 12:34:02 tale Exp $ */ +/* $Id: log.h,v 1.39 2001/07/12 05:58:23 mayer Exp $ */ #ifndef ISC_LOG_H #define ISC_LOG_H 1 @@ -26,6 +26,7 @@ #include #include +#include #include /* @@ -126,9 +127,9 @@ typedef union isc_logdestination { * definitions with indexes into its isc_logcategory structure corresponding to * the order of the names. */ -extern isc_logcategory_t isc_categories[]; -extern isc_log_t *isc_lctx; -extern isc_logmodule_t isc_modules[]; +LIBISC_EXTERNAL_DATA extern isc_logcategory_t isc_categories[]; +LIBISC_EXTERNAL_DATA extern isc_log_t *isc_lctx; +LIBISC_EXTERNAL_DATA extern isc_logmodule_t isc_modules[]; /* * Do not log directly to DEFAULT. Use another category. When in doubt, diff --git a/lib/isc/include/isc/mem.h b/lib/isc/include/isc/mem.h index cda2f198f8..8dfce43392 100644 --- a/lib/isc/include/isc/mem.h +++ b/lib/isc/include/isc/mem.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.h,v 1.53 2001/06/27 23:29:29 marka Exp $ */ +/* $Id: mem.h,v 1.54 2001/07/12 05:58:25 mayer Exp $ */ #ifndef ISC_MEM_H #define ISC_MEM_H 1 @@ -24,6 +24,7 @@ #include #include +#include #include ISC_LANG_BEGINDECLS @@ -86,7 +87,7 @@ typedef void (*isc_memfree_t)(void *, void *); * if a hi_water mark is set print the maximium inuse memory every * time it is raised once it exceeds the hi_water mark */ -extern unsigned int isc_mem_debugging; +LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_debugging; #define ISC_MEM_DEBUGTRACE 0x00000001U #define ISC_MEM_DEBUGRECORD 0x00000002U #define ISC_MEM_DEBUGUSAGE 0x00000004U diff --git a/lib/isc/log.c b/lib/isc/log.c index ddd64fda06..3110bca2db 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.68 2001/06/27 04:37:11 mayer Exp $ */ +/* $Id: log.c,v 1.69 2001/07/12 05:58:19 mayer Exp $ */ /* Principal Authors: DCL */ @@ -185,7 +185,7 @@ static const int syslog_map[] = { * be overridden. Since the default is always looked up as the first * channellist in the log context, it must come first in isc_categories[]. */ -isc_logcategory_t isc_categories[] = { +LIBISC_EXTERNAL_DATA isc_logcategory_t isc_categories[] = { { "default", 0 }, /* "default" must come first. */ { "general", 0 }, { NULL, 0 } @@ -194,7 +194,7 @@ isc_logcategory_t isc_categories[] = { /* * See above comment for categories, and apply it to modules. */ -isc_logmodule_t isc_modules[] = { +LIBISC_EXTERNAL_DATA isc_logmodule_t isc_modules[] = { { "socket", 0 }, { "time", 0 }, { NULL, 0 } @@ -210,7 +210,7 @@ static isc_logchannellist_t default_channel; /* * libisc logs to this context. */ -isc_log_t *isc_lctx = NULL; +LIBISC_EXTERNAL_DATA isc_log_t *isc_lctx = NULL; /* * Forward declarations. diff --git a/lib/isc/mem.c b/lib/isc/mem.c index e5bb13c54a..9eb6184d9d 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.c,v 1.96 2001/06/28 01:57:34 marka Exp $ */ +/* $Id: mem.c,v 1.97 2001/07/12 05:58:20 mayer Exp $ */ #include @@ -37,7 +37,7 @@ #ifndef ISC_MEM_DEBUGGING #define ISC_MEM_DEBUGGING 0 #endif -unsigned int isc_mem_debugging = ISC_MEM_DEBUGGING; +LIBISC_EXTERNAL_DATA unsigned int isc_mem_debugging = ISC_MEM_DEBUGGING; /* * Define ISC_MEM_USE_INTERNAL_MALLOC=1 to use the internal malloc() diff --git a/lib/isc/win32/file.c b/lib/isc/win32/file.c index 6219aee546..36a13899e9 100644 --- a/lib/isc/win32/file.c +++ b/lib/isc/win32/file.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: file.c,v 1.14 2001/07/11 04:32:15 mayer Exp $ */ +/* $Id: file.c,v 1.15 2001/07/12 05:58:26 mayer Exp $ */ #include @@ -384,13 +384,15 @@ isc_boolean_t isc_file_isabsolute(const char *filename) { REQUIRE(filename != NULL); /* - * Look for c:\path\... style or \\computer\shar\path... + * Look for c:\path\... style, c:/path/... or \\computer\shar\path... * the UNC style file specs */ if ((filename[0] == '\\') && (filename[1] == '\\')) return (ISC_TRUE); if (isalpha(filename[0]) != 0 && filename[1] == ':' && filename[2] == '\\') return (ISC_TRUE); + if (isalpha(filename[0]) != 0 && filename[1] == ':' && filename[2] == '/') + return (ISC_TRUE); return (ISC_FALSE); } diff --git a/lib/isc/win32/include/isc/platform.h b/lib/isc/win32/include/isc/platform.h index 205c43b9d9..82d7a11ec4 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.3 2001/07/09 21:06:29 gson Exp $ */ +/* $Id: platform.h,v 1.4 2001/07/12 05:58:28 mayer Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -41,4 +41,43 @@ #define ISC_PLATFORM_NEEDSTRSEP +/* + * Used to control how extern data is linked; needed for Win32 platforms. + */ +#define ISC_PLATFORM_USEDECLSPEC 1 + +/* + * Set up a macro for importing and exporting from the DLL + */ + +#ifdef LIBISC_EXPORTS +#define LIBISC_EXTERNAL_DATA __declspec( dllexport ) +#else +#define LIBISC_EXTERNAL_DATA __declspec( dllimport ) +#endif + +#ifdef LIBISCCFG_EXPORTS +#define LIBISCCFG_EXTERNAL_DATA __declspec( dllexport ) +#else +#define LIBISCCFG_EXTERNAL_DATA __declspec( dllimport ) +#endif + +#ifdef LIBISCCC_EXPORTS +#define LIBISCCC_EXTERNAL_DATA __declspec( dllexport ) +#else +#define LIBISCCC_EXTERNAL_DATA __declspec( dllimport ) +#endif + +#ifdef LIBDNS_EXPORTS +#define LIBDNS_EXTERNAL_DATA __declspec( dllexport ) +#else +#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/isc/win32/ipv6.c b/lib/isc/win32/ipv6.c index 0e1614f29c..694c427c82 100644 --- a/lib/isc/win32/ipv6.c +++ b/lib/isc/win32/ipv6.c @@ -15,13 +15,12 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ipv6.c,v 1.3 2001/07/09 21:06:10 gson Exp $ */ - -#define LIBISC_EXTERNAL_DATA __declspec( dllexport ) +/* $Id: ipv6.c,v 1.4 2001/07/12 05:58:27 mayer Exp $ */ #define off_t _off_t #include +#include LIBISC_EXTERNAL_DATA const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;