2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Fix places where wrong tag was used in #ifdef's

This commit is contained in:
Michael Sawyer 2000-10-19 21:49:49 +00:00
parent 3308ba7ebd
commit 7a87d1c63b
2 changed files with 15 additions and 15 deletions

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dig.c,v 1.116 2000/10/18 22:11:20 gson Exp $ */ /* $Id: dig.c,v 1.117 2000/10/19 21:49:47 mws Exp $ */
#include <config.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
@ -843,15 +843,15 @@ plus_option(char *option, isc_boolean_t is_batchfile,
} }
break; break;
case 'v': case 'v':
#ifdef DNS_OPT_NEWCODES #ifdef DNS_OPT_NEWCODES_LIVE
switch (cmd[1]) { switch (cmd[1]) {
default: default:
case 'c': /* vc, and default */ case 'c': /* vc, and default */
#endif /* DNS_OPT_NEWCODES */ #endif /* DNS_OPT_NEWCODES_LIVE */
if (!is_batchfile) if (!is_batchfile)
lookup->tcp_mode = state; lookup->tcp_mode = state;
break; break;
#ifdef DNS_OPT_NEWCODES #ifdef DNS_OPT_NEWCODES_LIVE
case 'i': /* view */ case 'i': /* view */
if (value == NULL) if (value == NULL)
goto need_value; goto need_value;
@ -868,7 +868,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto invalid_option; goto invalid_option;
strncpy(lookup->zonename, value, MXNAME); strncpy(lookup->zonename, value, MXNAME);
break; break;
#endif #endif /* DNS_OPT_NEWCODES_LIVE */
default: default:
invalid_option: invalid_option:
need_value: need_value:

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dighost.c,v 1.151 2000/10/19 17:30:14 gson Exp $ */ /* $Id: dighost.c,v 1.152 2000/10/19 21:49:49 mws Exp $ */
/* /*
* Notice to programmers: Do not use this code as an example of how to * Notice to programmers: Do not use this code as an example of how to
@ -321,10 +321,10 @@ make_empty_lookup(void) {
looknew->section_authority = ISC_TRUE; looknew->section_authority = ISC_TRUE;
looknew->section_additional = ISC_TRUE; looknew->section_additional = ISC_TRUE;
looknew->new_search = ISC_FALSE; looknew->new_search = ISC_FALSE;
#ifdef DNS_OPT_NEWCODES #ifdef DNS_OPT_NEWCODES_LIVE
looknew->zonename[0] = 0; looknew->zonename[0] = 0;
looknew->viewname[0] = 0; looknew->viewname[0] = 0;
#endif #endif /* DNS_OPT_NEWCODES_LIVE */
ISC_LIST_INIT(looknew->q); ISC_LIST_INIT(looknew->q);
ISC_LIST_INIT(looknew->my_server_list); ISC_LIST_INIT(looknew->my_server_list);
return (looknew); return (looknew);
@ -373,10 +373,10 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
looknew->section_authority = lookold->section_authority; looknew->section_authority = lookold->section_authority;
looknew->section_additional = lookold->section_additional; looknew->section_additional = lookold->section_additional;
looknew->retries = lookold->retries; looknew->retries = lookold->retries;
#ifdef DNS_OPT_NEWCODES #ifdef DNS_OPT_NEWCODES_LIVE
strncpy(looknew->viewname, lookold-> viewname, MXNAME); strncpy(looknew->viewname, lookold-> viewname, MXNAME);
strncpy(looknew->zonename, lookold-> zonename, MXNAME); strncpy(looknew->zonename, lookold-> zonename, MXNAME);
#endif /* DNS_OPT_NEWCODES */ #endif /* DNS_OPT_NEWCODES_LIVE */
if (servers) if (servers)
clone_server_list(lookold->my_server_list, clone_server_list(lookold->my_server_list,
@ -716,13 +716,13 @@ add_opt(dns_message_t *msg, isc_uint16_t udpsize, dns_optlist_t optlist) {
dns_rdatalist_t *rdatalist = NULL; dns_rdatalist_t *rdatalist = NULL;
dns_rdata_t *rdata = NULL; dns_rdata_t *rdata = NULL;
isc_result_t result; isc_result_t result;
#ifdef DNS_OPT_NEWCODES #ifdef DNS_OPT_NEWCODES_LIVE
isc_buffer_t *rdatabuf = NULL; isc_buffer_t *rdatabuf = NULL;
unsigned int i, optsize = 0; unsigned int i, optsize = 0;
#else /* DNS_OPT_NEWCODES */ #else /* DNS_OPT_NEWCODES_LIVE */
UNUSED(optlist); UNUSED(optlist);
#endif /* DNS_OPT_NEWCODES */ #endif /* DNS_OPT_NEWCODES_LIVE */
debug("add_opt()"); debug("add_opt()");
result = dns_message_gettemprdataset(msg, &rdataset); result = dns_message_gettemprdataset(msg, &rdataset);
@ -740,7 +740,7 @@ add_opt(dns_message_t *msg, isc_uint16_t udpsize, dns_optlist_t optlist) {
rdatalist->ttl = 0; rdatalist->ttl = 0;
rdata->data = NULL; rdata->data = NULL;
rdata->length = 0; rdata->length = 0;
#ifdef DNS_OPT_NEWCODES #ifdef DNS_OPT_NEWCODES_LIVE
for (i=0; i<optlist.used; i++) for (i=0; i<optlist.used; i++)
optsize += optlist.attrs[i].value.length + 4; optsize += optlist.attrs[i].value.length + 4;
result = isc_buffer_allocate(mctx, &rdatabuf, optsize); result = isc_buffer_allocate(mctx, &rdatabuf, optsize);
@ -748,7 +748,7 @@ add_opt(dns_message_t *msg, isc_uint16_t udpsize, dns_optlist_t optlist) {
result = dns_opt_add(rdata, &optlist, rdatabuf); result = dns_opt_add(rdata, &optlist, rdatabuf);
check_result(result, "dns_opt_add"); check_result(result, "dns_opt_add");
dns_message_takebuffer(msg, &rdatabuf); dns_message_takebuffer(msg, &rdatabuf);
#endif /* DNS_OPT_NEWCODES */ #endif /* DNS_OPT_NEWCODES_LIVE */
ISC_LIST_INIT(rdatalist->rdata); ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link); ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
dns_rdatalist_tordataset(rdatalist, rdataset); dns_rdatalist_tordataset(rdatalist, rdataset);