2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

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

as external data for windows dll. [RT #43161]
This commit is contained in:
Mark Andrews
2016-09-07 14:12:11 +10:00
parent 1a49346184
commit 8eceb0bffe
16 changed files with 115 additions and 63 deletions

View File

@@ -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
};