mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
Updates to support LIBISC_EXTERNAL_DATA and misc. cleanup
This commit is contained in:
parent
5e664afb95
commit
c4958494a9
@ -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 <config.h>
|
||||
|
||||
@ -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) {
|
||||
|
@ -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 <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
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';
|
||||
|
||||
|
@ -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 <isc/lang.h>
|
||||
#include <isc/platform.h>
|
||||
|
||||
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);
|
||||
|
@ -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 <isc/boolean.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/platform.h>
|
||||
|
||||
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
|
||||
|
||||
|
@ -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 <isc/formatcheck.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/platform.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
/*
|
||||
@ -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,
|
||||
|
@ -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 <isc/lang.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/platform.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
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
|
||||
|
@ -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.
|
||||
|
@ -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 <config.h>
|
||||
|
||||
@ -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()
|
||||
|
@ -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 <config.h>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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 <isc/net.h>
|
||||
#include <isc/platform.h>
|
||||
|
||||
LIBISC_EXTERNAL_DATA const struct in6_addr in6addr_any =
|
||||
IN6ADDR_ANY_INIT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user