Commit e51ba265 authored by Mark Andrews's avatar Mark Andrews

4461. [bug] win32: not all external data was properly marked

                        as external data for windows dll. [RT #43161]

(cherry picked from commit 8eceb0bf)
parent f71fa687
--- 9.11.0rc1 released ---
4461. [bug] win32: not all external data was properly marked
as external data for windows dll. [RT #43161]
4460. [test] Add system test for dnstap using unix domain sockets.
[RT #42926]
......
......@@ -103,10 +103,10 @@
#define BACKTRACE_MAXFRAME 128
#endif
extern int isc_dscp_check_value;
extern unsigned int dns_zone_mkey_hour;
extern unsigned int dns_zone_mkey_day;
extern unsigned int dns_zone_mkey_month;
LIBISC_EXTERNAL_DATA extern int isc_dscp_check_value;
LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_hour;
LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_day;
LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_month;
static isc_boolean_t want_stats = ISC_FALSE;
static char program_name[ISC_DIR_NAMEMAX] = "named";
......
......@@ -71,11 +71,11 @@ static dst_func_t *dst_t_func[DST_MAX_ALGS];
static isc_entropy_t *dst_entropy_pool = NULL;
static unsigned int dst_entropy_flags = 0;
isc_boolean_t dst_initialized = ISC_FALSE;
static isc_boolean_t dst_initialized = ISC_FALSE;
void gss_log(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
isc_mem_t *dst__memory_pool = NULL;
LIBDNS_EXTERNAL_DATA isc_mem_t *dst__memory_pool = NULL;
/*
* Static functions.
......
......@@ -66,7 +66,7 @@ ISC_LANG_BEGINDECLS
#define VALID_KEY(x) ISC_MAGIC_VALID(x, KEY_MAGIC)
#define VALID_CTX(x) ISC_MAGIC_VALID(x, CTX_MAGIC)
extern isc_mem_t *dst__memory_pool;
LIBDNS_EXTERNAL_DATA extern isc_mem_t *dst__memory_pool;
/***
*** Types
......
......@@ -44,8 +44,8 @@ dns_iptable_create(isc_mem_t *mctx, dns_iptable_t **target) {
return (result);
}
isc_boolean_t dns_iptable_neg = ISC_FALSE;
isc_boolean_t dns_iptable_pos = ISC_TRUE;
static isc_boolean_t dns_iptable_neg = ISC_FALSE;
static isc_boolean_t dns_iptable_pos = ISC_TRUE;
/*
* Add an IP prefix to an existing IP table
......
......@@ -273,7 +273,7 @@ opensslgost_destroy(dst_key_t *key) {
key->keydata.pkey = NULL;
}
unsigned char gost_prefix[37] = {
static const unsigned char gost_prefix[37] = {
0x30, 0x63, 0x30, 0x1c, 0x06, 0x06, 0x2a, 0x85,
0x03, 0x02, 0x02, 0x13, 0x30, 0x12, 0x06, 0x07,
0x2a, 0x85, 0x03, 0x02, 0x02, 0x23, 0x01, 0x06,
......
......@@ -1240,9 +1240,6 @@ dns_zone_log
dns_zone_logc
dns_zone_maintenance
dns_zone_markdirty
dns_zone_mkey_day
dns_zone_mkey_hour
dns_zone_mkey_month
dns_zone_name
dns_zone_nameonly
dns_zone_next
......@@ -1466,5 +1463,13 @@ dst_result_totext
EXPORTS
dns_pps DATA
dns_master_style_full DATA
dns_msgcat DATA
dns_tsig_hmacmd5_name DATA
dns_zone_mkey_day DATA
dns_zone_mkey_hour DATA
dns_zone_mkey_month DATA
dst__memory_pool DATA
dst_msgcat DATA
@END NOLONGER
......@@ -720,9 +720,9 @@ struct dns_include {
#define HOUR 3600
#define DAY (24*HOUR)
#define MONTH (30*DAY)
unsigned int dns_zone_mkey_hour = HOUR;
unsigned int dns_zone_mkey_day = DAY;
unsigned int dns_zone_mkey_month = MONTH;
LIBDNS_EXTERNAL_DATA unsigned int dns_zone_mkey_hour = HOUR;
LIBDNS_EXTERNAL_DATA unsigned int dns_zone_mkey_day = DAY;
LIBDNS_EXTERNAL_DATA unsigned int dns_zone_mkey_month = MONTH;
#define SEND_BUFFER_SIZE 2048
......
......@@ -22,5 +22,6 @@
#include <isc/backtrace.h>
const int isc__backtrace_nsymbols = 0;
const isc_backtrace_symmap_t isc__backtrace_symtable[] = { { NULL, "" } };
LIBISC_EXTERNAL_DATA const int isc__backtrace_nsymbols = 0;
LIBISC_EXTERNAL_DATA const
isc_backtrace_symmap_t isc__backtrace_symtable[] = { { NULL, "" } };
......@@ -46,8 +46,9 @@ struct isc_backtrace_symmap {
const char *symbol;
};
extern const int isc__backtrace_nsymbols;
extern const isc_backtrace_symmap_t isc__backtrace_symtable[];
LIBISC_EXTERNAL_DATA extern const int isc__backtrace_nsymbols;
LIBISC_EXTERNAL_DATA extern const
isc_backtrace_symmap_t isc__backtrace_symtable[];
/***
*** Functions
......
......@@ -28,8 +28,6 @@ isc__appctx_destroy
isc__appctx_setsocketmgr
isc__appctx_settaskmgr
isc__appctx_settimermgr
isc__backtrace_nsymbols
isc__backtrace_symtable
isc__buffer_activeregion
isc__buffer_add
isc__buffer_availableregion
......@@ -195,7 +193,6 @@ isc_dir_init
isc_dir_open
isc_dir_read
isc_dir_reset
isc_dscp_check_value
isc_entropy_addcallbacksample
isc_entropy_addsample
isc_entropy_attach
......@@ -804,6 +801,8 @@ syslog
EXPORTS
isc__backtrace_nsymbols DATA
isc__backtrace_symtable DATA
isc_bind9 DATA
isc_commandline_argument DATA
isc_commandline_errprint DATA
......@@ -811,9 +810,12 @@ isc_commandline_index DATA
isc_commandline_option DATA
isc_commandline_progname DATA
isc_commandline_reset DATA
isc_dscp_check_value DATA
isc_hashctx DATA
isc_mem_debugging DATA
isc_msgcat DATA
@IF PKCS11
pk11_msgcat DATA
pk11_verbose_init DATA
@END PKCS11
@END NOLONGER
......@@ -74,7 +74,7 @@
* other than -1, we check to make sure DSCP values match it, and
* assert if not.
*/
int isc_dscp_check_value = -1;
LIBISC_EXTERNAL_DATA int isc_dscp_check_value = -1;
/*
* How in the world can Microsoft exist with APIs like this?
......
......@@ -64,3 +64,7 @@ isccc_symtab_lookup
isccc_symtab_define
isccc_symtab_undefine
isccc_symtab_foreach
; Exported Data
;isccc_msgcat
......@@ -103,18 +103,21 @@ parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
* not need a union member).
*/
cfg_rep_t cfg_rep_uint32 = { "uint32", free_noop };
cfg_rep_t cfg_rep_uint64 = { "uint64", free_noop };
cfg_rep_t cfg_rep_string = { "string", free_string };
cfg_rep_t cfg_rep_boolean = { "boolean", free_noop };
cfg_rep_t cfg_rep_map = { "map", free_map };
cfg_rep_t cfg_rep_list = { "list", free_list };
cfg_rep_t cfg_rep_tuple = { "tuple", free_tuple };
cfg_rep_t cfg_rep_sockaddr = { "sockaddr", free_noop };
cfg_rep_t cfg_rep_netprefix = { "netprefix", free_noop };
cfg_rep_t cfg_rep_void = { "void", free_noop };
cfg_rep_t cfg_rep_fixedpoint = { "fixedpoint", free_noop };
cfg_rep_t cfg_rep_percentage = { "percentage", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_uint32 = { "uint32", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_uint64 = { "uint64", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_string = { "string", free_string };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_boolean = { "boolean", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_map = { "map", free_map };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_list = { "list", free_list };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_tuple = { "tuple", free_tuple };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_sockaddr = { "sockaddr", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_netprefix =
{ "netprefix", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_void = { "void", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_fixedpoint =
{ "fixedpoint", free_noop };
LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_percentage =
{ "percentage", free_noop };
/*
* Configuration type definitions.
......@@ -638,7 +641,7 @@ cfg_obj_isvoid(const cfg_obj_t *obj) {
return (ISC_TF(obj->type->rep == &cfg_rep_void));
}
cfg_type_t cfg_type_void = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_void = {
"void", cfg_parse_void, cfg_print_void, cfg_doc_void, &cfg_rep_void,
NULL };
......@@ -694,7 +697,7 @@ cfg_obj_aspercentage(const cfg_obj_t *obj) {
return (obj->value.uint32);
}
cfg_type_t cfg_type_percentage = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_percentage = {
"percentage", cfg_parse_percentage, cfg_print_percentage,
cfg_doc_terminal, &cfg_rep_percentage, NULL
};
......@@ -774,7 +777,7 @@ cfg_obj_asfixedpoint(const cfg_obj_t *obj) {
return (obj->value.uint32);
}
cfg_type_t cfg_type_fixedpoint = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_fixedpoint = {
"fixedpoint", cfg_parse_fixedpoint, cfg_print_fixedpoint,
cfg_doc_terminal, &cfg_rep_fixedpoint, NULL
};
......@@ -837,7 +840,7 @@ cfg_obj_asuint32(const cfg_obj_t *obj) {
return (obj->value.uint32);
}
cfg_type_t cfg_type_uint32 = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_uint32 = {
"integer", cfg_parse_uint32, cfg_print_uint32, cfg_doc_terminal,
&cfg_rep_uint32, NULL
};
......@@ -866,7 +869,7 @@ cfg_print_uint64(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_print_cstr(pctx, buf);
}
cfg_type_t cfg_type_uint64 = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_uint64 = {
"64_bit_integer", NULL, cfg_print_uint64, cfg_doc_terminal,
&cfg_rep_uint64, NULL
};
......@@ -1092,19 +1095,19 @@ cfg_obj_asstring(const cfg_obj_t *obj) {
}
/* Quoted string only */
cfg_type_t cfg_type_qstring = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_qstring = {
"quoted_string", cfg_parse_qstring, print_qstring, cfg_doc_terminal,
&cfg_rep_string, NULL
};
/* Unquoted string only */
cfg_type_t cfg_type_ustring = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_ustring = {
"string", parse_ustring, cfg_print_ustring, cfg_doc_terminal,
&cfg_rep_string, NULL
};
/* Any string (quoted or unquoted); printed with quotes */
cfg_type_t cfg_type_astring = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_astring = {
"string", cfg_parse_astring, print_qstring, cfg_doc_terminal,
&cfg_rep_string, NULL
};
......@@ -1113,7 +1116,7 @@ cfg_type_t cfg_type_astring = {
* Any string (quoted or unquoted); printed with quotes.
* If CFG_PRINTER_XKEY is set when printing the string will be '?' out.
*/
cfg_type_t cfg_type_sstring = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_sstring = {
"string", cfg_parse_sstring, print_sstring, cfg_doc_terminal,
&cfg_rep_string, NULL
};
......@@ -1123,7 +1126,7 @@ cfg_type_t cfg_type_sstring = {
* text to dynamic library or external application. Checked for
* bracket balance, but not otherwise parsed.
*/
cfg_type_t cfg_type_bracketed_text = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_bracketed_text = {
"bracketed_text", parse_btext, print_btext, doc_btext,
&cfg_rep_string, NULL
};
......@@ -1192,7 +1195,7 @@ cfg_print_boolean(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_print_cstr(pctx, "no");
}
cfg_type_t cfg_type_boolean = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_boolean = {
"boolean", cfg_parse_boolean, cfg_print_boolean, cfg_doc_terminal,
&cfg_rep_boolean, NULL
};
......@@ -1940,7 +1943,7 @@ parse_token(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (result);
}
cfg_type_t cfg_type_token = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_token = {
"token", parse_token, cfg_print_ustring, cfg_doc_terminal,
&cfg_rep_string, NULL
};
......@@ -1989,7 +1992,7 @@ parse_unsupported(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (result);
}
cfg_type_t cfg_type_unsupported = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_unsupported = {
"unsupported", parse_unsupported, cfg_print_spacelist, cfg_doc_terminal,
&cfg_rep_list, NULL
};
......@@ -2233,27 +2236,27 @@ cfg_doc_netaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
cfg_print_cstr(pctx, " )");
}
cfg_type_t cfg_type_netaddr = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_netaddr = {
"netaddr", parse_netaddr, cfg_print_sockaddr, cfg_doc_netaddr,
&cfg_rep_sockaddr, &netaddr_flags
};
cfg_type_t cfg_type_netaddr4 = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_netaddr4 = {
"netaddr4", parse_netaddr, cfg_print_sockaddr, cfg_doc_netaddr,
&cfg_rep_sockaddr, &netaddr4_flags
};
cfg_type_t cfg_type_netaddr4wild = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_netaddr4wild = {
"netaddr4wild", parse_netaddr, cfg_print_sockaddr, cfg_doc_netaddr,
&cfg_rep_sockaddr, &netaddr4wild_flags
};
cfg_type_t cfg_type_netaddr6 = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_netaddr6 = {
"netaddr6", parse_netaddr, cfg_print_sockaddr, cfg_doc_netaddr,
&cfg_rep_sockaddr, &netaddr6_flags
};
cfg_type_t cfg_type_netaddr6wild = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_netaddr6wild = {
"netaddr6wild", parse_netaddr, cfg_print_sockaddr, cfg_doc_netaddr,
&cfg_rep_sockaddr, &netaddr6wild_flags
};
......@@ -2339,7 +2342,7 @@ cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
*prefixlen = obj->value.netprefix.prefixlen;
}
cfg_type_t cfg_type_netprefix = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_netprefix = {
"netprefix", cfg_parse_netprefix, print_netprefix, cfg_doc_terminal,
&cfg_rep_netprefix, NULL
};
......@@ -2397,14 +2400,14 @@ parse_sockaddrsub(cfg_parser_t *pctx, const cfg_type_t *type,
}
static unsigned int sockaddr_flags = CFG_ADDR_V4OK | CFG_ADDR_V6OK;
cfg_type_t cfg_type_sockaddr = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_sockaddr = {
"sockaddr", cfg_parse_sockaddr, cfg_print_sockaddr, cfg_doc_sockaddr,
&cfg_rep_sockaddr, &sockaddr_flags
};
static unsigned int sockaddrdscp_flags = CFG_ADDR_V4OK | CFG_ADDR_V6OK |
CFG_ADDR_DSCPOK;
cfg_type_t cfg_type_sockaddrdscp = {
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_sockaddrdscp = {
"sockaddr", cfg_parse_sockaddr, cfg_print_sockaddr, cfg_doc_sockaddr,
&cfg_rep_sockaddr, &sockaddrdscp_flags
};
......
......@@ -121,4 +121,37 @@ cfg_ungettoken
; Exported Data
;cfg_rep_boolean
;cfg_rep_fixedpoint
;cfg_rep_list
;cfg_rep_map
;cfg_rep_netprefix
;cfg_rep_percentage
;cfg_rep_sockaddr
;cfg_rep_string
;cfg_rep_tuple
;cfg_rep_uint32
;cfg_rep_uint64
;cfg_rep_void
;cfg_type_astring
;cfg_type_boolean
;cfg_type_bracketed_text
;cfg_type_fixedpoint
;cfg_type_netaddr
;cfg_type_netaddr4
;cfg_type_netaddr4wild
;cfg_type_netaddr6
;cfg_type_netaddr6wild
;cfg_type_netprefix
;cfg_type_percentage
;cfg_type_qstring
;cfg_type_rndcconf
;cfg_type_sockaddr
;cfg_type_sockaddrdscp
;cfg_type_sstring
;cfg_type_token
;cfg_type_uint32
;cfg_type_uint64
;cfg_type_unsupported
;cfg_type_ustring
;cfg_type_void
......@@ -606,7 +606,7 @@ t_getdate(char *buf, size_t buflen) {
/*
* Some generally used utilities.
*/
struct dns_errormap {
static const struct dns_errormap {
isc_result_t result;
const char *text;
} dns_errormap[] = {
......@@ -660,8 +660,8 @@ struct dns_errormap {
isc_result_t
t_dns_result_fromtext(char *name) {
isc_result_t result;
struct dns_errormap *pmap;
isc_result_t result;
const struct dns_errormap *pmap;
result = ISC_R_UNEXPECTED;
......@@ -678,7 +678,7 @@ t_dns_result_fromtext(char *name) {
return (result);
}
struct dc_method_map {
static const struct dc_method_map {
unsigned int dc_method;
const char *text;
} dc_method_map[] = {
......@@ -691,8 +691,8 @@ struct dc_method_map {
unsigned int
t_dc_method_fromtext(char *name) {
unsigned int dc_method;
struct dc_method_map *pmap;
unsigned int dc_method;
const struct dc_method_map *pmap;
dc_method = DNS_COMPRESS_NONE;
......
Markdown is supported
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