remove isc_bind9 variable

isc_bind9 was a global bool used to indicate whether the library
was being used internally by BIND or by an external caller. external
use is no longer supported, but the variable was retained for use
by dyndb, which needed it only when being built without libtool.
building without libtool is *also* no longer supported, so the variable
can go away.

(cherry picked from commit 935879ed11)
This commit is contained in:
Evan Hunt 2023-02-08 19:28:09 -08:00
parent e67adfb479
commit 342286ecdb
9 changed files with 6 additions and 60 deletions

View file

@ -95,17 +95,6 @@ dyndb_init(isc_mem_t *mctx, const char *name, const char *parameters,
REQUIRE(name != NULL);
REQUIRE(dctx != NULL);
/*
* Depending on how dlopen() was called, we may not have
* access to named's global namespace, in which case we need
* to initialize libisc/libdns
*/
if (dctx->refvar != &isc_bind9) {
isc_log_setcontext(dctx->lctx);
dns_log_setcontext(dctx->lctx);
isc_hash_set_initializer(dctx->hashinit);
}
s = isc_mem_strdup(mctx, parameters);
result = isc_commandline_strtoargv(mctx, s, &argc, &argv, 0);

View file

@ -274,8 +274,12 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx,
REQUIRE(dctxp != NULL && *dctxp == NULL);
dctx = isc_mem_get(mctx, sizeof(*dctx));
*dctx = (dns_dyndbctx_t){
.timermgr = tmgr,
.hashinit = hashinit,
.lctx = lctx,
};
memset(dctx, 0, sizeof(*dctx));
if (view != NULL) {
dns_view_attach(view, &dctx->view);
}
@ -285,10 +289,6 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx,
if (task != NULL) {
isc_task_attach(task, &dctx->task);
}
dctx->timermgr = tmgr;
dctx->hashinit = hashinit;
dctx->lctx = lctx;
dctx->refvar = &isc_bind9;
isc_mem_attach(mctx, &dctx->mctx);
dctx->magic = DNS_DYNDBCTX_MAGIC;

View file

@ -41,7 +41,7 @@ struct dns_dyndbctx {
dns_zonemgr_t *zmgr;
isc_task_t *task;
isc_timermgr_t *timermgr;
const bool *refvar;
const bool *refvar; /* unused, but retained for API compatibility */
};
#define DNS_DYNDBCTX_MAGIC ISC_MAGIC('D', 'd', 'b', 'c')

View file

@ -15,7 +15,6 @@ libisc_la_HEADERS = \
include/isc/barrier.h \
include/isc/base32.h \
include/isc/base64.h \
include/isc/bind9.h \
include/isc/buffer.h \
include/isc/cmocka.h \
include/isc/commandline.h \
@ -120,7 +119,6 @@ libisc_la_SOURCES = \
backtrace.c \
base32.c \
base64.c \
bind9.c \
buffer.c \
commandline.c \
condition.c \

View file

@ -1,20 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include <stdbool.h>
#include <isc/bind9.h>
bool isc_bind9 = true;

View file

@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#pragma once
#include <stdbool.h>
extern bool isc_bind9;

View file

@ -13,7 +13,6 @@
#pragma once
#include <isc/bind9.h>
#include <isc/result.h>
/*! \file isc/types.h

View file

@ -13,7 +13,6 @@
/*! \file */
#include <isc/bind9.h>
#include <isc/mem.h>
#include <isc/os.h>
#include <isc/tls.h>

View file

@ -22,7 +22,6 @@
#include <stdlib.h>
#include <isc/align.h>
#include <isc/bind9.h>
#include <isc/hash.h>
#include <isc/magic.h>
#include <isc/mem.h>