From: Evan Hunt Date: Thu, 9 Feb 2023 03:28:09 +0000 (-0800) Subject: remove isc_bind9 variable X-Git-Tag: v9.19.11~77^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=935879ed1139d8fd07d0009ab606e43c2a7cbc68;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/tests/system/dyndb/driver/driver.c b/bin/tests/system/dyndb/driver/driver.c index f4497c9d650..7e8a249d3ad 100644 --- a/bin/tests/system/dyndb/driver/driver.c +++ b/bin/tests/system/dyndb/driver/driver.c @@ -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); diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c index 63d0a4a95ba..143b9203219 100644 --- a/lib/dns/dyndb.c +++ b/lib/dns/dyndb.c @@ -279,7 +279,6 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx, .loopmgr = loopmgr, .hashinit = hashinit, .lctx = lctx, - .refvar = &isc_bind9, }; if (view != NULL) { diff --git a/lib/dns/include/dns/dyndb.h b/lib/dns/include/dns/dyndb.h index b8490d5f373..6b3be0e785f 100644 --- a/lib/dns/include/dns/dyndb.h +++ b/lib/dns/include/dns/dyndb.h @@ -41,7 +41,7 @@ struct dns_dyndbctx { dns_zonemgr_t *zmgr; isc_task_t *task; isc_loopmgr_t *loopmgr; - const bool *refvar; + const bool *refvar; /* unused, but retained for API compatibility */ }; #define DNS_DYNDBCTX_MAGIC ISC_MAGIC('D', 'd', 'b', 'c') diff --git a/lib/isc/Makefile.am b/lib/isc/Makefile.am index 36665d28504..8201e71d6a4 100644 --- a/lib/isc/Makefile.am +++ b/lib/isc/Makefile.am @@ -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 \ @@ -124,7 +123,6 @@ libisc_la_SOURCES = \ backtrace.c \ base32.c \ base64.c \ - bind9.c \ commandline.c \ condition.c \ counter.c \ diff --git a/lib/isc/bind9.c b/lib/isc/bind9.c deleted file mode 100644 index b04e56e3524..00000000000 --- a/lib/isc/bind9.c +++ /dev/null @@ -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 - -#include - -bool isc_bind9 = true; diff --git a/lib/isc/include/isc/bind9.h b/lib/isc/include/isc/bind9.h deleted file mode 100644 index 38c568e7592..00000000000 --- a/lib/isc/include/isc/bind9.h +++ /dev/null @@ -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 - -extern bool isc_bind9; diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h index a3ef04698f3..94aa5f760b0 100644 --- a/lib/isc/include/isc/types.h +++ b/lib/isc/include/isc/types.h @@ -13,7 +13,6 @@ #pragma once -#include #include /*! \file isc/types.h diff --git a/lib/isc/lib.c b/lib/isc/lib.c index daf00a59711..c389667bc7c 100644 --- a/lib/isc/lib.c +++ b/lib/isc/lib.c @@ -13,7 +13,6 @@ /*! \file */ -#include #include #include #include diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 7b587642e2d..ea66c9c09d1 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include