]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove message catalogs
authorOndřej Surý <ondrej@sury.org>
Fri, 23 Nov 2018 20:35:01 +0000 (21:35 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 9 Jan 2019 22:44:26 +0000 (23:44 +0100)
67 files changed:
config.h.in
config.h.win32
configure
configure.ac
contrib/sdb/bdb/bdb.c
lib/dns/Makefile.in
lib/dns/dst_lib.c [deleted file]
lib/dns/dst_result.c
lib/dns/include/dns/lib.h
lib/dns/include/dst/Makefile.in
lib/dns/include/dst/lib.h [deleted file]
lib/dns/lib.c
lib/dns/result.c
lib/dns/tests/dbversion_test.c
lib/dns/win32/libdns.def.in
lib/dns/win32/libdns.vcxproj.filters.in
lib/dns/win32/libdns.vcxproj.in
lib/isc/Makefile.in
lib/isc/assertions.c
lib/isc/commandline.c
lib/isc/error.c
lib/isc/include/isc/Makefile.in
lib/isc/include/isc/lib.h
lib/isc/include/isc/log.h
lib/isc/include/isc/msgcat.h [deleted file]
lib/isc/include/isc/msgs.h [deleted file]
lib/isc/include/isc/result.h
lib/isc/include/isc/types.h
lib/isc/include/isc/util.h
lib/isc/include/pk11/result.h
lib/isc/lex.c
lib/isc/lib.c
lib/isc/log.c
lib/isc/mem.c
lib/isc/netaddr.c
lib/isc/nls/Makefile.in [deleted file]
lib/isc/nls/msgcat.c [deleted file]
lib/isc/pk11_result.c
lib/isc/pthreads/condition.c
lib/isc/result.c
lib/isc/rwlock.c
lib/isc/sockaddr.c
lib/isc/task.c
lib/isc/timer.c
lib/isc/unix/app.c
lib/isc/unix/ifiter_getifaddrs.c
lib/isc/unix/interfaceiter.c
lib/isc/unix/net.c
lib/isc/unix/socket.c
lib/isc/win32/app.c
lib/isc/win32/libisc.def.in
lib/isc/win32/libisc.vcxproj.filters.in
lib/isc/win32/libisc.vcxproj.in
lib/isc/win32/net.c
lib/isc/win32/socket.c
lib/isccc/Makefile.in
lib/isccc/include/isccc/Makefile.in
lib/isccc/include/isccc/lib.h [deleted file]
lib/isccc/lib.c [deleted file]
lib/isccc/result.c
lib/isccc/tests/result_test.c
lib/isccc/win32/libisccc.def
lib/isccc/win32/libisccc.vcxproj.filters.in
lib/isccc/win32/libisccc.vcxproj.in
lib/ns/include/ns/lib.h
lib/ns/lib.c
util/copyrights

index 81c5ce8653b460929d5543af2b4cc6547e3f4ae4..50608551e3b8248d565758336afcd75de5fcefae 100644 (file)
@@ -60,9 +60,6 @@
 /* define if the compiler supports __builtin_unreachable(). */
 #undef HAVE_BUILTIN_UNREACHABLE
 
-/* Define to 1 if you have the `catgets' function. */
-#undef HAVE_CATGETS
-
 /* Define to 1 if you have the `chroot' function. */
 #undef HAVE_CHROOT
 
index 7fe8e3fc4001d967feeab0591cb3eae2f5887fa2..44f6bf64324e9181e014ac45c027e2f6458237af 100644 (file)
@@ -73,9 +73,6 @@
 /* define on Solaris to get sigwait() to work using pthreads semantics */
 /* #undef _POSIX_PTHREAD_SEMANTICS */
 
-/* define if catgets() is available */
-/* #undef HAVE_CATGETS */
-
 /* define if you need to #define _XPG4_2 before including sys/socket.h */
 /* #undef NEED_XPG4_2_BEFORE_SOCKET_H */
 
index 6328aece5ccf6e8b65364e6e30ab55cd944c2a92..5bb378a9de9252edd14efece6af6fb84dcc5b2e8 100755 (executable)
--- a/configure
+++ b/configure
 
 
 
-#
-# NLS
-#
-for ac_func in catgets
-do :
-  ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
-if test "x$ac_cv_func_catgets" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_CATGETS 1
-_ACEOF
-
-fi
-done
-
-
 #
 # -lxnet buys us one big porting headache...  standards, gotta love 'em.
 #
@@ -21556,7 +21541,7 @@ ac_config_commands="$ac_config_commands chmod"
 # elsewhere if there's a good reason for doing so.
 #
 
-ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/unittest.sh fuzz/Makefile"
+ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/unittest.sh fuzz/Makefile"
 
 
 #
@@ -22657,7 +22642,6 @@ do
     "lib/isc/include/pk11/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/pk11/Makefile" ;;
     "lib/isc/include/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/pkcs11/Makefile" ;;
     "lib/isc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/tests/Makefile" ;;
-    "lib/isc/nls/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/nls/Makefile" ;;
     "lib/isc/unix/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/Makefile" ;;
     "lib/isc/unix/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/Makefile" ;;
     "lib/isc/unix/include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/isc/Makefile" ;;
index df4e281490e878f60b599230ce85186013e4d346..c2f0103d69c8fcf94dc8732bc3557c8457d01c12 100644 (file)
@@ -1526,11 +1526,6 @@ AC_SUBST(MKDEPCC)
 AC_SUBST(MKDEPCFLAGS)
 AC_SUBST(MKDEPPROG)
 
-#
-# NLS
-#
-AC_CHECK_FUNCS([catgets])
-
 #
 # -lxnet buys us one big porting headache...  standards, gotta love 'em.
 #
@@ -3062,7 +3057,6 @@ AC_CONFIG_FILES([
        lib/isc/include/pk11/Makefile
        lib/isc/include/pkcs11/Makefile
        lib/isc/tests/Makefile
-       lib/isc/nls/Makefile
        lib/isc/unix/Makefile
        lib/isc/unix/include/Makefile
        lib/isc/unix/include/isc/Makefile
index 1f50c1951dd424c001cf1d4328968438ce081d40..c67bf005f397311ff763a9ce8cbb5446bb4b7c3c 100644 (file)
@@ -30,8 +30,6 @@
 #include <isc/log.h>
 #include <isc/lib.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/msgcat.h>
 #include <isc/region.h>
 #include <isc/result.h>
 #include <isc/types.h>
@@ -65,32 +63,25 @@ bdb_create(const char *zone, int argc, char **argv,
                return ISC_R_FAILURE;   /* database path must be given */
 
        if (db_create((DB **)dbdata, NULL, 0) != 0) {
-               /*
-                * XXX Should use dns_msgcat et al
-                * but seems to be unavailable.
-                */
-               isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                              DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL, isc_msgcat,
-                              ISC_MSGSET_GENERAL, ISC_MSG_FATALERROR,
-                              "db_create");
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
+                             "db_create");
                return ISC_R_FAILURE;
        }
 
        if (isc_file_exists(*argv) != true) {
-               isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                              DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL, isc_msgcat,
-                              ISC_MSGSET_GENERAL, ISC_MSG_FATALERROR,
-                              "isc_file_exists: %s", *argv);
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
+                             "isc_file_exists: %s", *argv);
                return ISC_R_FAILURE;
        }
 
        if ((ret = (*(DB **)dbdata)->open(*(DB **)dbdata, *argv, NULL, DB_HASH,
            DB_RDONLY, 0)) != 0) {
-                       isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                                      DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
-                                      isc_msgcat, ISC_MSGSET_GENERAL,
-                                      ISC_MSG_FATALERROR, "DB->open: %s",
-                                      db_strerror(ret));
+                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                                     DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL,
+                                     "DB->open: %s",
+                                     db_strerror(ret));
                        return ISC_R_FAILURE;
        }
        return ISC_R_SUCCESS;
@@ -121,11 +112,10 @@ bdb_lookup(const char *zone, const char *name, void *dbdata,
 #endif /* DNS_CLIENTINFO_VERSION */
 
        if ((ret = ((DB *)dbdata)->cursor((DB *)dbdata, NULL, &c, 0)) != 0) {
-               isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                              DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
-                              isc_msgcat, ISC_MSGSET_GENERAL,
-                              ISC_MSG_FAILED, "DB->cursor: %s",
-                              db_strerror(ret));
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+                             "DB->cursor: %s",
+                             db_strerror(ret));
                return ISC_R_FAILURE;
        }
 
@@ -146,11 +136,10 @@ bdb_lookup(const char *zone, const char *name, void *dbdata,
                rdata = type + strlen(type) + 1;
 
                if (dns_sdb_putrr(l, type, ttl, rdata) != ISC_R_SUCCESS) {
-                       isc_log_iwrite(dns_lctx,
-                                      DNS_LOGCATEGORY_DATABASE,
-                                      DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
-                                      isc_msgcat, ISC_MSGSET_GENERAL,
-                                      ISC_MSG_FAILED, "dns_sdb_putrr");
+                       isc_log_write(dns_lctx,
+                                     DNS_LOGCATEGORY_DATABASE,
+                                     DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+                                     "dns_sdb_putrr");
                        return ISC_R_FAILURE;
                }
                ret = c->c_get(c, &key, &data, DB_NEXT_DUP);
@@ -173,11 +162,10 @@ bdb_allnodes(const char *zone, void *dbdata, dns_sdballnodes_t *n)
        UNUSED(zone);
 
        if ((ret = ((DB *)dbdata)->cursor((DB *)dbdata, NULL, &c, 0)) != 0) {
-               isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                              DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
-                              isc_msgcat, ISC_MSGSET_GENERAL,
-                              ISC_MSG_FAILED, "DB->cursor: %s",
-                              db_strerror(ret));
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+                             "DB->cursor: %s",
+                             db_strerror(ret));
                return ISC_R_FAILURE;
        }
 
@@ -196,11 +184,10 @@ bdb_allnodes(const char *zone, void *dbdata, dns_sdballnodes_t *n)
 
                if (dns_sdb_putnamedrr(n, key.data, type, ttl, rdata) !=
                    ISC_R_SUCCESS) {
-                       isc_log_iwrite(dns_lctx,
-                                      DNS_LOGCATEGORY_DATABASE,
-                                      DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
-                                      isc_msgcat, ISC_MSGSET_GENERAL,
-                                      ISC_MSG_FAILED, "dns_sdb_putnamedrr");
+                       isc_log_write(dns_lctx,
+                                     DNS_LOGCATEGORY_DATABASE,
+                                     DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
+                                     "dns_sdb_putnamedrr");
                        return ISC_R_FAILURE;
                }
 
index e8ab447fd621489f9eef1b4cf86a45be6b534ca4..7a182f143d9fc0bf4bb37c33dd7a6dc610a1eefe 100644 (file)
@@ -42,7 +42,7 @@ LIBS =                @LIBS@
 # Alphabetically
 
 DSTOBJS =      @DST_EXTRA_OBJS@ \
-               dst_api.@O@ dst_lib.@O@ dst_parse.@O@ dst_result.@O@ \
+               dst_api.@O@ dst_parse.@O@ dst_result.@O@ \
                gssapi_link.@O@ gssapictx.@O@ hmac_link.@O@ \
                openssl_link.@O@ openssldh_link.@O@ \
                opensslecdsa_link.@O@ openssleddsa_link.@O@ opensslrsa_link.@O@ \
@@ -80,7 +80,7 @@ OBJS=         @DNSTAPOBJS@ ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS} \
                ${PORTDNSOBJS} @GEOIPLINKOBJS@
 
 DSTSRCS =      @DST_EXTRA_SRCS@ @PKCS11LINKSRCS@ \
-               dst_api.c dst_lib.c dst_parse.c \
+               dst_api.c dst_parse.c \
                dst_result.c gssapi_link.c gssapictx.c hmac_link.c \
                openssl_link.c openssldh_link.c \
                opensslecdsa_link.c openssleddsa_link.c opensslrsa_link.c \
diff --git a/lib/dns/dst_lib.c b/lib/dns/dst_lib.c
deleted file mode 100644 (file)
index 4edf728..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * 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 http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/once.h>
-#include <isc/msgcat.h>
-#include <isc/util.h>
-
-#include <dst/lib.h>
-
-/***
- *** Globals
- ***/
-
-LIBDNS_EXTERNAL_DATA isc_msgcat_t *            dst_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t              msgcat_once = ISC_ONCE_INIT;
-
-
-/***
- *** Functions
- ***/
-
-static void
-open_msgcat(void) {
-       isc_msgcat_open("libdst.cat", &dst_msgcat);
-}
-
-void
-dst_lib_initmsgcat(void) {
-
-       /*
-        * Initialize the DST library's message catalog, dst_msgcat, if it
-        * has not already been initialized.
-        */
-
-       RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
index caee5f09eaec136cd4f62704ba2104959232cb29..77f837bcaac4b9b90b6afb6d19efece3785a5f01 100644 (file)
@@ -15,7 +15,6 @@
 #include <isc/util.h>
 
 #include <dst/result.h>
-#include <dst/lib.h>
 
 static const char *text[DST_R_NRESULTS] = {
        "algorithm is unsupported",             /*%< 0 */
@@ -78,12 +77,12 @@ initialize_action(void) {
        isc_result_t result;
 
        result = isc_result_register(ISC_RESULTCLASS_DST, DST_R_NRESULTS,
-                                    text, dst_msgcat, DST_RESULT_RESULTSET);
+                                    text, DST_RESULT_RESULTSET);
        if (result != ISC_R_SUCCESS)
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_result_register() failed: %u", result);
        result = isc_result_registerids(ISC_RESULTCLASS_DST, DST_R_NRESULTS,
-                                       ids, dst_msgcat, DST_RESULT_RESULTSET);
+                                       ids, DST_RESULT_RESULTSET);
        if (result != ISC_R_SUCCESS)
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_result_registerids() failed: %u", result);
@@ -91,7 +90,6 @@ initialize_action(void) {
 
 static void
 initialize(void) {
-       dst_lib_initmsgcat();
        RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
 }
 
index bfbfb936c9612b8a907d72238cc6010dfd90a716..bb507a4e0e5ee5c8eaa6451b43be29e5a271770d 100644 (file)
@@ -24,14 +24,6 @@ ISC_LANG_BEGINDECLS
  * Tuning: external query load in packets per seconds.
  */
 LIBDNS_EXTERNAL_DATA extern unsigned int dns_pps;
-LIBDNS_EXTERNAL_DATA extern isc_msgcat_t *dns_msgcat;
-
-void
-dns_lib_initmsgcat(void);
-/*%<
- * Initialize the DNS library's message catalog, dns_msgcat, if it
- * has not already been initialized.
- */
 
 isc_result_t
 dns_lib_init(void);
index 04727f73e4038f83b51d56c8647ce94629e63454..a60d4a93ece4555753149e22b71ce09ebcb9a2b0 100644 (file)
@@ -13,7 +13,7 @@ top_srcdir =  @top_srcdir@
 
 VERSION=@BIND9_VERSION@
 
-HEADERS =      dst.h gssapi.h lib.h result.h
+HEADERS =      dst.h gssapi.h result.h
 
 SUBDIRS =
 TARGETS =
diff --git a/lib/dns/include/dst/lib.h b/lib/dns/include/dst/lib.h
deleted file mode 100644 (file)
index 508439f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * 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 http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-#ifndef DST_LIB_H
-#define DST_LIB_H 1
-
-/*! \file dst/lib.h */
-
-#include <isc/types.h>
-#include <isc/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-LIBDNS_EXTERNAL_DATA extern isc_msgcat_t *dst_msgcat;
-
-void
-dst_lib_initmsgcat(void);
-/*
- * Initialize the DST library's message catalog, dst_msgcat, if it
- * has not already been initialized.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* DST_LIB_H */
index a58b0912dbb97d6d5c9a399ea1956f2043f0fb12..5fccb576dac16364f81d09217629f1a039ed9d44 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <isc/hash.h>
 #include <isc/mem.h>
-#include <isc/msgcat.h>
 #include <isc/mutex.h>
 #include <isc/once.h>
 #include <isc/util.h>
  ***/
 
 LIBDNS_EXTERNAL_DATA unsigned int                      dns_pps = 0U;
-LIBDNS_EXTERNAL_DATA isc_msgcat_t *                    dns_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t              msgcat_once = ISC_ONCE_INIT;
 
 
 /***
  *** Functions
  ***/
 
-static void
-open_msgcat(void) {
-       isc_msgcat_open("libdns.cat", &dns_msgcat);
-}
-
-void
-dns_lib_initmsgcat(void) {
-
-       /*
-        * Initialize the DNS library's message catalog, dns_msgcat, if it
-        * has not already been initialized.
-        */
-
-       RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
-
 static isc_once_t init_once = ISC_ONCE_INIT;
 static isc_mem_t *dns_g_mctx = NULL;
 static dns_dbimplementation_t *dbimp = NULL;
index 69b7eec91e771a06975cad1ab16a2b694b06db61..b45ea3a3e4311f987e4c81e35efb168c04ec8bfc 100644 (file)
@@ -347,22 +347,22 @@ initialize_action(void) {
        isc_result_t result;
 
        result = isc_result_register(ISC_RESULTCLASS_DNS, DNS_R_NRESULTS,
-                                    text, dns_msgcat, DNS_RESULT_RESULTSET);
+                                    text, DNS_RESULT_RESULTSET);
        if (result == ISC_R_SUCCESS)
                result = isc_result_register(ISC_RESULTCLASS_DNSRCODE,
                                             DNS_R_NRCODERESULTS,
-                                            rcode_text, dns_msgcat,
+                                            rcode_text,
                                             DNS_RESULT_RCODERESULTSET);
        if (result != ISC_R_SUCCESS)
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_result_register() failed: %u", result);
 
        result = isc_result_registerids(ISC_RESULTCLASS_DNS, DNS_R_NRESULTS,
-                                       ids, dns_msgcat, DNS_RESULT_RESULTSET);
+                                       ids, DNS_RESULT_RESULTSET);
        if (result == ISC_R_SUCCESS)
                result = isc_result_registerids(ISC_RESULTCLASS_DNSRCODE,
                                                DNS_R_NRCODERESULTS,
-                                               rcode_ids, dns_msgcat,
+                                               rcode_ids,
                                                DNS_RESULT_RCODERESULTSET);
        if (result != ISC_R_SUCCESS)
                UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -371,7 +371,6 @@ initialize_action(void) {
 
 static void
 initialize(void) {
-       dns_lib_initmsgcat();
        RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
 }
 
index 16e8bbae66a927b374f9dc731bab8b39d5c2c7e5..57f48e28fe6b231cef6ec7f56c6dcd62ccc78d98 100644 (file)
@@ -28,7 +28,6 @@
 #include <isc/result.h>
 #include <isc/serial.h>
 #include <isc/stdtime.h>
-#include <isc/msgcat.h>
 #include <isc/string.h>
 #include <isc/util.h>
 
index 72a93d225fc754fd9709da5135efb028430fced8..9c2e459b5dec80eb9a09a22e99284dfe6c770e0a 100644 (file)
@@ -444,7 +444,6 @@ dns_keytable_marksecure
 dns_keytable_nextkeynode
 dns_keytable_totext
 dns_lib_init
-dns_lib_initmsgcat
 dns_lib_shutdown
 dns_loadctx_attach
 dns_loadctx_cancel
@@ -1421,7 +1420,6 @@ dst_key_unsetnum
 dst_key_unsettime
 dst_lib_destroy
 dst_lib_init
-dst_lib_initmsgcat
 dst_region_computeid
 dst_region_computerid
 dst_result_register
@@ -1433,10 +1431,8 @@ 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_msgcat             DATA
 @END NOLONGER
index b387ba1a0756bb47cc2a7ff663050d4a759138e4..4f2a2e8463e127e8c7ccdeeaf870135a24e28c93 100644 (file)
     <ClCompile Include="..\dst_api.c">
       <Filter>Dst Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\dst_lib.c">
-      <Filter>Dst Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\dst_parse.c">
       <Filter>Dst Source Files</Filter>
     </ClCompile>
     <ClInclude Include="..\include\dst\gssapi.h">
       <Filter>Dst Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\include\dst\lib.h">
-      <Filter>Dst Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\include\dst\result.h">
       <Filter>Dst Header Files</Filter>
     </ClInclude>
index bba2ad3eff812e7b92d80011bfcb2a6a5894d17b..1b17a5f96e9230e226455691c4498936c446d976 100644 (file)
     <ClCompile Include="..\dnssec.c" />
     <ClCompile Include="..\ds.c" />
     <ClCompile Include="..\dst_api.c" />
-    <ClCompile Include="..\dst_lib.c" />
     <ClCompile Include="..\dst_parse.c" />
     <ClCompile Include="..\dst_result.c" />
     <ClCompile Include="..\dyndb.c" />
     <ClInclude Include="..\include\dns\zt.h" />
     <ClInclude Include="..\include\dst\dst.h" />
     <ClInclude Include="..\include\dst\gssapi.h" />
-    <ClInclude Include="..\include\dst\lib.h" />
     <ClInclude Include="..\include\dst\result.h" />
     <ClInclude Include="..\rbtdb.h" />
     <ClInclude Include="..\rdatalist_p.h" />
index d242757cf116764620781e8c29b6478c3b2cd424..ed87279e7f321e3f87f60aec218d0673046dfd7c 100644 (file)
@@ -33,8 +33,6 @@ UNIXOBJS =    unix/pk11_api.@O@ \
                unix/stdio.@O@ unix/stdtime.@O@ \
                unix/syslog.@O@ unix/time.@O@
 
-NLSOBJS =      nls/msgcat.@O@
-
 THREADOBJS =   pthreads/condition.@O@ pthreads/mutex.@O@ pthreads/thread.@O@
 
 WIN32OBJS =    win32/condition.@O@ win32/dir.@O@ win32/errno.@O@ \
@@ -58,7 +56,7 @@ OBJS =                pk11.@O@ pk11_result.@O@ \
                serial.@O@ sockaddr.@O@ stats.@O@ \
                string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
                tm.@O@ timer.@O@ version.@O@ \
-               ${UNIXOBJS} ${NLSOBJS} ${THREADOBJS}
+               ${UNIXOBJS} ${THREADOBJS}
 SYMTBLOBJS =   backtrace-emptytbl.@O@
 
 # Alphabetically
@@ -82,7 +80,7 @@ LIBS =                @OPENSSL_LIBS@ @LIBS@
 # Attempt to disable parallel processing.
 .NOTPARALLEL:
 .NO_PARALLEL:
-SUBDIRS =      include unix nls pthreads
+SUBDIRS =      include unix pthreads
 TARGETS =      timestamp
 TESTDIRS =     @UNITTESTS@
 
index b52342eb61348c11f1f0d1349599e2afb67c5750..8594f1dfc55f688f0daf656e0db1124c25c53bd4 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <isc/assertions.h>
 #include <isc/backtrace.h>
-#include <isc/msgs.h>
 #include <isc/print.h>
 #include <isc/result.h>
 
@@ -106,13 +105,13 @@ default_callback(const char *file, int line, isc_assertiontype_t type,
        isc_result_t result;
 
        result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes);
-               if (result == ISC_R_SUCCESS && nframes > 0)
-                       logsuffix = ", back trace";
+       if (result == ISC_R_SUCCESS && nframes > 0) {
+               logsuffix = ", back trace";
+       }
+
+       fprintf(stderr, "%s:%d: %s(%s) failed%s\n",
+               file, line, isc_assertion_typetotext(type), cond, logsuffix);
 
-       fprintf(stderr, "%s:%d: %s(%s) %s%s\n",
-               file, line, isc_assertion_typetotext(type), cond,
-               isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                              ISC_MSG_FAILED, "failed"), logsuffix);
        if (result == ISC_R_SUCCESS) {
                for (i = 0; i < nframes; i++) {
                        unsigned long offset;
index efee967aa621d13eda8659bf48445d01fb13e00f..6f2569282a5a90f70be3a98cf8dafb36d053a389 100644 (file)
@@ -54,7 +54,6 @@
 
 #include <isc/commandline.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/print.h>
 #include <isc/string.h>
 #include <isc/util.h>
@@ -135,12 +134,8 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) {
                        isc_commandline_index++;
 
                if (isc_commandline_errprint && *options != ':')
-                       fprintf(stderr, "%s: %s -- %c\n",
+                       fprintf(stderr, "%s: illegal option -- %c\n",
                                isc_commandline_progname,
-                               isc_msgcat_get(isc_msgcat,
-                                              ISC_MSGSET_COMMANDLINE,
-                                              ISC_MSG_ILLEGALOPT,
-                                              "illegal option"),
                                isc_commandline_option);
 
                return (BADOPT);
@@ -188,13 +183,8 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) {
                                return (BADARG);
 
                        if (isc_commandline_errprint)
-                               fprintf(stderr, "%s: %s -- %c\n",
+                               fprintf(stderr, "%s: option requires an argument -- %c\n",
                                        isc_commandline_progname,
-                                       isc_msgcat_get(isc_msgcat,
-                                                      ISC_MSGSET_COMMANDLINE,
-                                                      ISC_MSG_OPTNEEDARG,
-                                                      "option requires "
-                                                      "an argument"),
                                        isc_commandline_option);
 
                        return (BADOPT);
index b0fe500a418bd21ecd1f40c7d110b0284c37263f..438a8af148ff984ee21d8f143c4264158a05d4e0 100644 (file)
@@ -18,7 +18,6 @@
 #include <stdlib.h>
 
 #include <isc/error.h>
-#include <isc/msgs.h>
 #include <isc/print.h>
 
 /*% Default unexpected callback. */
@@ -72,9 +71,7 @@ isc_error_fatal(const char *file, int line, const char *format, ...) {
 
 void
 isc_error_runtimecheck(const char *file, int line, const char *expression) {
-       isc_error_fatal(file, line, "RUNTIME_CHECK(%s) %s", expression,
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                      ISC_MSG_FAILED, "failed"));
+       isc_error_fatal(file, line, "RUNTIME_CHECK(%s) failed", expression);
 }
 
 static void
@@ -91,9 +88,7 @@ static void
 default_fatal_callback(const char *file, int line, const char *format,
                       va_list args)
 {
-       fprintf(stderr, "%s:%d: %s: ", file, line,
-               isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                              ISC_MSG_FATALERROR, "fatal error"));
+       fprintf(stderr, "%s:%d: fatal error: ", file, line);
        vfprintf(stderr, format, args);
        fprintf(stderr, "\n");
        fflush(stderr);
index ece66dc50678ee21f1cb4ef8cb687c6f673caaa4..513f9923abd4f0f73e7ece861e37b2e9e5718efb 100644 (file)
@@ -26,7 +26,7 @@ HEADERS =     aes.h app.h assertions.h atomic.h backtrace.h \
                hash.h heap.h hex.h hmac.h ht.h httpd.h \
                interfaceiter.h iterated_hash.h \
                json.h lang.h lex.h lfsr.h lib.h likely.h list.h log.h \
-               magic.h md.h mem.h meminfo.h msgcat.h msgs.h mutexblock.h \
+               magic.h md.h mem.h meminfo.h mutexblock.h \
                netaddr.h netscope.h nonce.h os.h parseint.h \
                pool.h portset.h print.h queue.h quota.h \
                radix.h random.h ratelimiter.h refcount.h regex.h \
index 55ef20a457795aaeeb9ae5bddcfb3319f260aa5b..6ff8914f3b3f07a55784d61278929a93240ac95e 100644 (file)
 
 ISC_LANG_BEGINDECLS
 
-LIBISC_EXTERNAL_DATA extern isc_msgcat_t *isc_msgcat;
-
-void
-isc_lib_initmsgcat(void);
-/*!<
- * \brief Initialize the ISC library's message catalog, isc_msgcat, if it
- * has not already been initialized.
- */
-
 void
 isc_lib_register(void);
 /*!<
index 595b2b49ded25beca5e00c61f7f4377be7e48d0a..d2d28861618c5486141f9d00172c0c51e435faf2 100644 (file)
@@ -544,9 +544,6 @@ isc_log_usechannel(isc_logconfig_t *lcfg, const char *name,
  * Write a message to the log channels.
  *
  * Notes:
- *\li  Log messages containing natural language text should be logged with
- *     isc_log_iwrite() to allow for localization.
- *
  *\li  lctx can be NULL; this is allowed so that programs which use
  *     libraries that use the ISC logging system are not required to
  *     also use it.
@@ -644,50 +641,6 @@ isc_log_vwrite1(isc_log_t *lctx, isc_logcategory_t *category,
 
 ISC_FORMAT_PRINTF(5, 0);
 
-/*%
- * These are four internationalized versions of the isc_log_[v]write[1]
- * functions.
- *
- * The only difference is that they take arguments for a message
- * catalog, message set, and message number, all immediately preceding the
- * format argument.  The format argument becomes the default text, a la
- * isc_msgcat_get.  If the message catalog is NULL, no lookup is attempted
- * for a message -- which makes the message set and message number irrelevant,
- * and the non-internationalized call should have probably been used instead.
- *
- * Yes, that means there are now *eight* interfaces to logging a message.
- * Sheesh.   Make the madness stop!
- */
-/*@{*/
-void
-isc_log_iwrite(isc_log_t *lctx, isc_logcategory_t *category,
-             isc_logmodule_t *module, int level,
-             isc_msgcat_t *msgcat, int msgset, int message,
-             const char *format, ...)
-ISC_FORMAT_PRINTF(8, 9);
-
-void
-isc_log_ivwrite(isc_log_t *lctx, isc_logcategory_t *category,
-               isc_logmodule_t *module, int level,
-               isc_msgcat_t *msgcat, int msgset, int message,
-               const char *format, va_list args)
-ISC_FORMAT_PRINTF(8, 0);
-
-void
-isc_log_iwrite1(isc_log_t *lctx, isc_logcategory_t *category,
-               isc_logmodule_t *module, int level,
-               isc_msgcat_t *msgcat, int msgset, int message,
-               const char *format, ...)
-ISC_FORMAT_PRINTF(8, 9);
-
-void
-isc_log_ivwrite1(isc_log_t *lctx, isc_logcategory_t *category,
-                isc_logmodule_t *module, int level,
-                isc_msgcat_t *msgcat, int msgset, int message,
-                const char *format, va_list args)
-ISC_FORMAT_PRINTF(8, 0);
-/*@}*/
-
 void
 isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level);
 /*%<
diff --git a/lib/isc/include/isc/msgcat.h b/lib/isc/include/isc/msgcat.h
deleted file mode 100644 (file)
index 3b533d6..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * 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 http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-#ifndef ISC_MSGCAT_H
-#define ISC_MSGCAT_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/msgcat.h
- * \brief The ISC Message Catalog
- * aids internationalization of applications by allowing
- * messages to be retrieved from locale-specific files instead of
- * hardwiring them into the application.  This allows translations of
- * messages appropriate to the locale to be supplied without recompiling
- * the application.
- *
- * Notes:
- *\li  It's very important that message catalogs work, even if only the
- *     default_text can be used.
- *
- * MP:
- *\li  The caller must ensure appropriate synchronization of
- *     isc_msgcat_open() and isc_msgcat_close().  isc_msgcat_get()
- *     ensures appropriate synchronization.
- *
- * Reliability:
- *\li  No anticipated impact.
- *
- * Resources:
- *\li  TBS
- *
- * \li Security:
- *     No anticipated impact.
- *
- * \li Standards:
- *     None.
- */
-
-/*****
- ***** Imports
- *****/
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/*****
- ***** Methods
- *****/
-
-void
-isc_msgcat_open(const char *name, isc_msgcat_t **msgcatp);
-/*%<
- * Open a message catalog.
- *
- * Notes:
- *
- *\li  If memory cannot be allocated or other failures occur, *msgcatp
- *     will be set to NULL.  If a NULL msgcat is given to isc_msgcat_get(),
- *     the default_text will be returned, ensuring that some message text
- *     will be available, no matter what's going wrong.
- *
- * Requires:
- *
- *\li  'name' is a valid string.
- *
- *\li  msgcatp != NULL && *msgcatp == NULL
- */
-
-void
-isc_msgcat_close(isc_msgcat_t **msgcatp);
-/*%<
- * Close a message catalog.
- *
- * Notes:
- *
- *\li  Any string pointers returned by prior calls to isc_msgcat_get() are
- *     invalid after isc_msgcat_close() has been called and must not be
- *     used.
- *
- * Requires:
- *
- *\li  *msgcatp is a valid message catalog or is NULL.
- *
- * Ensures:
- *
- *\li  All resources associated with the message catalog are released.
- *
- *\li  *msgcatp == NULL
- */
-
-const char *
-isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
-              const char *default_text);
-/*%<
- * Get message 'message' from message set 'set' in 'msgcat'.  If it
- * is not available, use 'default_text'.
- *
- * Requires:
- *
- *\li  'msgcat' is a valid message catalog or is NULL.
- *
- *\li  set > 0
- *
- *\li  message > 0
- *
- *\li  'default_text' is a valid string.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_MSGCAT_H */
diff --git a/lib/isc/include/isc/msgs.h b/lib/isc/include/isc/msgs.h
deleted file mode 100644 (file)
index 01e3b48..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * 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 http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-#ifndef ISC_MSGS_H
-#define ISC_MSGS_H 1
-
-/*! \file isc/msgs.h */
-
-#include <isc/lib.h>           /* Provide isc_msgcat global variable. */
-#include <isc/msgcat.h>                /* Provide isc_msgcat_*() functions. */
-
-/*@{*/
-/*!
- * \brief Message sets, named per source file, excepting "GENERAL".
- *
- * IMPORTANT: The original list is alphabetical, but any new sets must
- * be added to the end.
- */
-#define ISC_MSGSET_GENERAL     1
-/*     ISC_RESULT_RESULTSET    2 */     /* XXX */
-/*     ISC_RESULT_UNAVAILABLESET 3 */   /* XXX */
-#define ISC_MSGSET_APP         4
-#define ISC_MSGSET_COMMANDLINE 5
-#define ISC_MSGSET_ENTROPY     6
-#define ISC_MSGSET_IFITERIOCTL 7
-#define ISC_MSGSET_IFITERSYSCTL        8
-#define ISC_MSGSET_LEX         9
-#define ISC_MSGSET_LOG         10
-#define ISC_MSGSET_MEM         11
-#define ISC_MSGSET_NETADDR     12
-#define ISC_MSGSET_PRINT       13
-#define ISC_MSGSET_RESULT      14
-#define ISC_MSGSET_RWLOCK      15
-#define ISC_MSGSET_SOCKADDR    16
-#define ISC_MSGSET_SOCKET      17
-#define ISC_MSGSET_TASK                18
-#define ISC_MSGSET_TIMER       19
-#define ISC_MSGSET_UTIL                20
-#define ISC_MSGSET_IFITERGETIFADDRS 21
-/*@}*/
-
-/*@{*/
-/*!
- * Message numbers
- * are only required to be unique per message set,
- * but are unique throughout the entire catalog to not be as confusing when
- * debugging.
- *
- * The initial numbering was done by multiply by 100 the set number the
- * message appears in then adding the incremental message number.
- */
-#define ISC_MSG_FAILED         101 /*%< "failed" */
-#define ISC_MSG_SUCCEEDED      102 /*%< Compatible with "failed" */
-#define ISC_MSG_SUCCESS                103 /*%< More usual way to say "success" */
-#define ISC_MSG_STARTING       104 /*%< As in "daemon: starting" */
-#define ISC_MSG_STOPING                105 /*%< As in "daemon: stopping" */
-#define ISC_MSG_ENTERING       106 /*%< As in "some_subr: entering" */
-#define ISC_MSG_EXITING                107 /*%< As in "some_subr: exiting" */
-#define ISC_MSG_CALLING                108 /*%< As in "calling some_subr()" */
-#define ISC_MSG_RETURNED       109 /*%< As in "some_subr: returned <foo>" */
-#define ISC_MSG_FATALERROR     110 /*%< "fatal error" */
-#define ISC_MSG_SHUTTINGDOWN   111 /*%< "shutting down" */
-#define ISC_MSG_RUNNING                112 /*%< "running" */
-#define ISC_MSG_WAIT           113 /*%< "wait" */
-#define ISC_MSG_WAITUNTIL      114 /*%< "waituntil" */
-
-#define ISC_MSG_SIGNALSETUP    201 /*%< "handle_signal() %d setup: %s" */
-
-#define ISC_MSG_ILLEGALOPT     301 /*%< "illegal option" */
-#define ISC_MSG_OPTNEEDARG     302 /*%< "option requires an argument" */
-
-#define ISC_MSG_ENTROPYSTATS   401 /*%< "Entropy pool %p:  refcnt %u ..." */
-
-#define ISC_MSG_MAKESCANSOCKET 501 /*%< "making interface scan socket: %s" */
-#define ISC_MSG_GETIFCONFIG    502 /*%< "get interface configuration: %s" */
-#define ISC_MSG_BUFFERMAX      503 /*%< "... maximum buffer size exceeded" */
-#define ISC_MSG_GETDESTADDR    504 /*%< "%s: getting destination address: %s" */
-#define ISC_MSG_GETNETMASK     505 /*%< "%s: getting netmask: %s" */
-
-#define ISC_MSG_GETIFLISTSIZE  601 /*%< "getting interface list size: ..." */
-#define ISC_MSG_GETIFLIST      602 /*%< "getting interface list: ..." */
-#define ISC_MSG_UNEXPECTEDTYPE 603 /*%< "... unexpected ... message type" */
-
-#define ISC_MSG_UNEXPECTEDSTATE        701 /*%< "Unexpected state %d" */
-
-#define ISC_MSG_BADTIME                801 /*%< "Bad 00 99:99:99.999 " */
-#define ISC_MSG_LEVEL          802 /*%< "level %d: " */
-
-#define ISC_MSG_ADDTRACE       901 /*%< "add %p size %u " */
-#define ISC_MSG_DELTRACE       902 /*%< "del %p size %u " */
-#define ISC_MSG_POOLSTATS      903 /*%< "[Pool statistics]\n" */
-#define ISC_MSG_POOLNAME       904 /*%< "name" */
-#define ISC_MSG_POOLSIZE       905 /*%< "size" */
-#define ISC_MSG_POOLMAXALLOC   906 /*%< "maxalloc" */
-#define ISC_MSG_POOLALLOCATED  907 /*%< "allocated" */
-#define ISC_MSG_POOLFREECOUNT  908 /*%< "freecount" */
-#define ISC_MSG_POOLFREEMAX    909 /*%< "freemax" */
-#define ISC_MSG_POOLFILLCOUNT  910 /*%< "fillcount" */
-#define ISC_MSG_POOLGETS       911 /*%< "gets" */
-#define ISC_MSG_DUMPALLOC      912 /*%< "DUMP OF ALL OUTSTANDING MEMORY ..." */
-#define ISC_MSG_NONE           913 /*%< "\tNone.\n" */
-#define ISC_MSG_PTRFILELINE    914 /*%< "\tptr %p file %s line %u\n" */
-
-#define ISC_MSG_UNKNOWNADDR    1001 /*%< "<unknown address, family %u>" */
-
-#define ISC_MSG_NOLONGDBL      1104 /*%< "long doubles are not supported" */
-
-#define ISC_MSG_PRINTLOCK      1201 /*%< "rwlock %p thread %lu ..." */
-#define ISC_MSG_READ          1202 /*%< "read" */
-#define ISC_MSG_WRITE         1203 /*%< "write" */
-#define ISC_MSG_READING               1204 /*%< "reading" */
-#define ISC_MSG_WRITING               1205 /*%< "writing" */
-#define ISC_MSG_PRELOCK               1206 /*%< "prelock" */
-#define ISC_MSG_POSTLOCK       1207 /*%< "postlock" */
-#define ISC_MSG_PREUNLOCK      1208 /*%< "preunlock" */
-#define ISC_MSG_POSTUNLOCK     1209 /*%< "postunlock" */
-#define ISC_MSG_PRINTLOCK2     1210 /*%< "rwlock %p thread %lu ..." w/ atomic */
-
-#define ISC_MSG_UNKNOWNFAMILY  1301 /*%< "unknown address family: %d" */
-
-#define ISC_MSG_WRITEFAILED    1401 /*%< "write() failed during watcher ..." */
-#define ISC_MSG_READFAILED     1402 /*%< "read() failed during watcher ... " */
-#define ISC_MSG_PROCESSCMSG    1403 /*%< "processing cmsg %p" */
-#define ISC_MSG_IFRECEIVED     1404 /*%< "interface received on ifindex %u" */
-#define ISC_MSG_SENDTODATA     1405 /*%< "sendto pktinfo data, ifindex %u" */
-#define ISC_MSG_DOIORECV       1406 /*%< "doio_recv: recvmsg(%d) %d bytes ..." */
-#define ISC_MSG_PKTRECV               1407 /*%< "packet received correctly" */
-#define ISC_MSG_DESTROYING     1408 /*%< "destroying" */
-#define ISC_MSG_CREATED               1409 /*%< "created" */
-#define ISC_MSG_ACCEPTLOCK     1410 /*%< "internal_accept called, locked ..." */
-#define ISC_MSG_ACCEPTEDCXN    1411 /*%< "accepted connection, new socket %p" */
-#define ISC_MSG_INTERNALRECV   1412 /*%< "internal_recv: task %p got event %p" */
-#define ISC_MSG_INTERNALSEND   1413 /*%< "internal_send: task %p got event %p" */
-#define ISC_MSG_WATCHERMSG     1414 /*%< "watcher got message %d" */
-#define ISC_MSG_SOCKETSREMAIN  1415 /*%< "sockets exist" */
-#define ISC_MSG_PKTINFOPROVIDED        1416 /*%< "pktinfo structure provided, ..." */
-#define ISC_MSG_BOUND         1417 /*%< "bound" */
-#define ISC_MSG_ACCEPTRETURNED 1418 /*%< accept() returned %d/%s */
-#define ISC_MSG_TOOMANYFDS     1419 /*%< %s: too many open file descriptors */
-#define ISC_MSG_ZEROPORT       1420 /*%< dropping source port zero packet */
-#define ISC_MSG_FILTER        1421 /*%< setsockopt(SO_ACCEPTFILTER): %s */
-
-#define ISC_MSG_TOOMANYHANDLES 1422 /*%< %s: too many open WSA event handles: %s */
-#define ISC_MSG_POKED          1423 /*%< "poked flags: %d" */
-
-#define ISC_MSG_AWAKE         1502 /*%< "awake" */
-#define ISC_MSG_WORKING               1503 /*%< "working" */
-#define ISC_MSG_EXECUTE               1504 /*%< "execute action" */
-#define ISC_MSG_EMPTY         1505 /*%< "empty" */
-#define ISC_MSG_DONE          1506 /*%< "done" */
-#define ISC_MSG_QUANTUM               1507 /*%< "quantum" */
-
-#define ISC_MSG_SCHEDULE       1601 /*%< "schedule" */
-#define ISC_MSG_SIGNALSCHED    1602 /*%< "signal (schedule)" */
-#define ISC_MSG_SIGNALDESCHED  1603 /*%< "signal (deschedule)" */
-#define ISC_MSG_SIGNALDESTROY  1604 /*%< "signal (destroy)" */
-#define ISC_MSG_IDLERESCHED    1605 /*%< "idle reschedule" */
-#define ISC_MSG_EVENTNOTALLOC  1606 /*%< "couldn't allocate event" */
-#define ISC_MSG_SCHEDFAIL      1607 /*%< "couldn't schedule timer: %u" */
-#define ISC_MSG_POSTING               1608 /*%< "posting" */
-#define ISC_MSG_WAKEUP        1609 /*%< "wakeup" */
-
-#define ISC_MSG_LOCK          1701 /*%< "LOCK" */
-#define ISC_MSG_LOCKING               1702 /*%< "LOCKING" */
-#define ISC_MSG_LOCKED        1703 /*%< "LOCKED" */
-#define ISC_MSG_UNLOCKED       1704 /*%< "UNLOCKED" */
-#define ISC_MSG_RWLOCK        1705 /*%< "RWLOCK" */
-#define ISC_MSG_RWLOCKED       1706 /*%< "RWLOCKED" */
-#define ISC_MSG_RWUNLOCK       1707 /*%< "RWUNLOCK" */
-#define ISC_MSG_BROADCAST      1708 /*%< "BROADCAST" */
-#define ISC_MSG_SIGNAL        1709 /*%< "SIGNAL" */
-#define ISC_MSG_UTILWAIT       1710 /*%< "WAIT" */
-#define ISC_MSG_WAITED        1711 /*%< "WAITED" */
-
-#define ISC_MSG_GETIFADDRS     1801 /*%< "getting interface addresses: ..." */
-
-/*@}*/
-
-#endif /* ISC_MSGS_H */
index b54df56acf768ee47a2fd8420995fb90f0b67523..d0ece05570d1208efef7716aa559563e43b5f5ee 100644 (file)
@@ -106,11 +106,11 @@ isc_result_toid(isc_result_t);
 
 isc_result_t
 isc_result_register(unsigned int base, unsigned int nresults,
-                   const char **text, isc_msgcat_t *msgcat, int set);
+                   const char **text, int set);
 
 isc_result_t
 isc_result_registerids(unsigned int base, unsigned int nresults,
-                      const char **ids, isc_msgcat_t *msgcat, int set);
+                      const char **ids, int set);
 
 ISC_LANG_ENDDECLS
 
index fbd71d9d669837ae893ea3cead73478fe1d30c52..f8e5ae6a9a09099bd12362ca181a1d83d7fd9d6b 100644 (file)
@@ -58,7 +58,6 @@ typedef struct isc_logconfig          isc_logconfig_t;        /*%< Log Configuration */
 typedef struct isc_logmodule           isc_logmodule_t;        /*%< Log Module */
 typedef struct isc_mem                 isc_mem_t;              /*%< Memory */
 typedef struct isc_mempool             isc_mempool_t;          /*%< Memory Pool */
-typedef struct isc_msgcat              isc_msgcat_t;           /*%< Message Catalog */
 typedef struct isc_netaddr             isc_netaddr_t;          /*%< Net Address */
 typedef struct isc_portset             isc_portset_t;          /*%< Port Set */
 typedef struct isc_quota               isc_quota_t;            /*%< Quota */
index ae40079b0813513fba79b4af8e8532b34381b50f..ed55e057271ed091bfd83a34c47939f347073494 100644 (file)
@@ -81,7 +81,6 @@
 #ifdef ISC_UTIL_TRACEON
 #define ISC_UTIL_TRACE(a) a
 #include <stdio.h>             /* Required for fprintf/stderr when tracing. */
-#include <isc/msgs.h>          /* Required for isc_msgcat when tracing. */
 #else
 #define ISC_UTIL_TRACE(a)
 #endif
 #include <isc/result.h>                /* Contractual promise. */
 
 #define LOCK(lp) do { \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_LOCKING, "LOCKING"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "LOCKING %p %s %d\n", \
                               (lp), __FILE__, __LINE__)); \
        RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_LOCKED, "LOCKED"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "LOCKED %p %s %d\n", \
                               (lp), __FILE__, __LINE__)); \
        } while (0)
 #define UNLOCK(lp) do { \
        RUNTIME_CHECK(isc_mutex_unlock((lp)) == ISC_R_SUCCESS); \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_UNLOCKED, "UNLOCKED"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "UNLOCKED %p %s %d\n", \
                               (lp), __FILE__, __LINE__)); \
        } while (0)
 
 #define BROADCAST(cvp) do { \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_BROADCAST, "BROADCAST"),\
+       ISC_UTIL_TRACE(fprintf(stderr, "BROADCAST %p %s %d\n", \
                               (cvp), __FILE__, __LINE__)); \
        RUNTIME_CHECK(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS); \
        } while (0)
 #define SIGNAL(cvp) do { \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_SIGNAL, "SIGNAL"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "SIGNAL %p %s %d\n", \
                               (cvp), __FILE__, __LINE__)); \
        RUNTIME_CHECK(isc_condition_signal((cvp)) == ISC_R_SUCCESS); \
        } while (0)
 #define WAIT(cvp, lp) do { \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %p %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_UTILWAIT, "WAIT"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "WAIT %p LOCK %p %s %d\n", \
                               (cvp), \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_LOCK, "LOCK"), \
                               (lp), __FILE__, __LINE__)); \
        RUNTIME_CHECK(isc_condition_wait((cvp), (lp)) == ISC_R_SUCCESS); \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %p %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_WAITED, "WAITED"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "WAITED %p LOCKED %p %s %d\n", \
                               (cvp), \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_LOCKED, "LOCKED"), \
                               (lp), __FILE__, __LINE__)); \
        } while (0)
 
        isc_condition_waituntil((cvp), (lp), (tp))
 
 #define RWLOCK(lp, t) do { \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_RWLOCK, "RWLOCK"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "RWLOCK %p, %d %s %d\n", \
                               (lp), (t), __FILE__, __LINE__)); \
        RUNTIME_CHECK(isc_rwlock_lock((lp), (t)) == ISC_R_SUCCESS); \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_RWLOCKED, "RWLOCKED"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "RWLOCKED %p, %d %s %d\n", \
                               (lp), (t), __FILE__, __LINE__)); \
        } while (0)
 #define RWUNLOCK(lp, t) do { \
-       ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
-                              isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
-                                             ISC_MSG_RWUNLOCK, "RWUNLOCK"), \
+       ISC_UTIL_TRACE(fprintf(stderr, "RWUNLOCK %p, %d %s %d\n", \
                               (lp), (t), __FILE__, __LINE__)); \
        RUNTIME_CHECK(isc_rwlock_unlock((lp), (t)) == ISC_R_SUCCESS); \
        } while (0)
index cce915032174a728b65059d429888a924c439bf9..21f4a37529733eacda4060b6a4242fc423cc20f0 100644 (file)
 
 ISC_LANG_BEGINDECLS
 
-LIBISC_EXTERNAL_DATA extern isc_msgcat_t *pk11_msgcat;
-
-void
-pk11_initmsgcat(void);
-
 const char *
 pk11_result_totext(isc_result_t);
 
index c9758872a6b5d8e118eeded4317d707b56d3d09e..dce944b6ca98ca18b1f35690e5f2feb8b4807a2b 100644 (file)
@@ -24,7 +24,6 @@
 #include <isc/file.h>
 #include <isc/lex.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/parseint.h>
 #include <isc/print.h>
 #include <isc/stdio.h>
@@ -854,11 +853,9 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                        break;
                default:
                        FATAL_ERROR(__FILE__, __LINE__,
-                                   isc_msgcat_get(isc_msgcat, ISC_MSGSET_LEX,
-                                                  ISC_MSG_UNEXPECTEDSTATE,
-                                                  "Unexpected state %d"),
+                                   "Unexpected state %d",
                                    state);
-                       /* Does not return. */
+                       ISC_UNREACHABLE();
                }
 
        } while (!done);
index 0dcc27701dda99e947569aba2cdd34d8fb22be7e..45198be395ee98577201b290425150ad085f456e 100644 (file)
 
 #include <config.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <openssl/evp.h>
-
-#include <isc/app.h>
+#include <isc/bind9.h>
 #include <isc/lib.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/once.h>
-#include <isc/print.h>
-#include <isc/socket.h>
-#include <isc/task.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-/***
- *** Globals
- ***/
-
-LIBISC_EXTERNAL_DATA isc_msgcat_t *            isc_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t              msgcat_once = ISC_ONCE_INIT;
 
 /***
  *** Functions
  ***/
 
-static void
-open_msgcat(void) {
-       isc_msgcat_open("libisc.cat", &isc_msgcat);
-}
-
-void
-isc_lib_initmsgcat(void) {
-       isc_result_t result;
-
-       /*!
-        * Initialize the ISC library's message catalog, isc_msgcat, if it
-        * has not already been initialized.
-        */
-
-       result = isc_once_do(&msgcat_once, open_msgcat);
-       if (result != ISC_R_SUCCESS) {
-               /*
-                * Normally we'd use RUNTIME_CHECK() or FATAL_ERROR(), but
-                * we can't do that here, since they might call us!
-                * (Note that the catalog might be open anyway, so we might
-                * as well try to  provide an internationalized message.)
-                */
-               fprintf(stderr, "%s:%d: %s: isc_once_do() %s.\n",
-                       __FILE__, __LINE__,
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                      ISC_MSG_FATALERROR, "fatal error"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                      ISC_MSG_FAILED, "failed"));
-               abort();
-       }
-}
-
 void
 isc_lib_register(void) {
        isc_bind9 = false;
index c2a98a1713105098dcdac4b765150f9fca8fd047..2312ff0a9dc4b666128e8362ec66f8d9690362af 100644 (file)
@@ -27,7 +27,6 @@
 #include <isc/log.h>
 #include <isc/magic.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/print.h>
 #include <isc/stat.h>
 #include <isc/stdio.h>
@@ -230,9 +229,8 @@ greatest_version(isc_logfile_t *file, int versions, int *greatest);
 static void
 isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
             isc_logmodule_t *module, int level, bool write_once,
-            isc_msgcat_t *msgcat, int msgset, int msg,
             const char *format, va_list args)
-     ISC_FORMAT_PRINTF(9, 0);
+     ISC_FORMAT_PRINTF(6, 0);
 
 /*@{*/
 /*!
@@ -833,7 +831,7 @@ isc_log_write(isc_log_t *lctx, isc_logcategory_t *category,
 
        va_start(args, format);
        isc_log_doit(lctx, category, module, level, false,
-                    NULL, 0, 0, format, args);
+                    format, args);
        va_end(args);
 }
 
@@ -846,7 +844,7 @@ isc_log_vwrite(isc_log_t *lctx, isc_logcategory_t *category,
         * Contract checking is done in isc_log_doit().
         */
        isc_log_doit(lctx, category, module, level, false,
-                    NULL, 0, 0, format, args);
+                    format, args);
 }
 
 void
@@ -861,7 +859,7 @@ isc_log_write1(isc_log_t *lctx, isc_logcategory_t *category,
 
        va_start(args, format);
        isc_log_doit(lctx, category, module, level, true,
-                    NULL, 0, 0, format, args);
+                    format, args);
        va_end(args);
 }
 
@@ -874,69 +872,7 @@ isc_log_vwrite1(isc_log_t *lctx, isc_logcategory_t *category,
         * Contract checking is done in isc_log_doit().
         */
        isc_log_doit(lctx, category, module, level, true,
-                    NULL, 0, 0, format, args);
-}
-
-void
-isc_log_iwrite(isc_log_t *lctx, isc_logcategory_t *category,
-              isc_logmodule_t *module, int level,
-              isc_msgcat_t *msgcat, int msgset, int msg,
-              const char *format, ...)
-{
-       va_list args;
-
-       /*
-        * Contract checking is done in isc_log_doit().
-        */
-
-       va_start(args, format);
-       isc_log_doit(lctx, category, module, level, false,
-                    msgcat, msgset, msg, format, args);
-       va_end(args);
-}
-
-void
-isc_log_ivwrite(isc_log_t *lctx, isc_logcategory_t *category,
-              isc_logmodule_t *module, int level,
-              isc_msgcat_t *msgcat, int msgset, int msg,
-              const char *format, va_list args)
-{
-       /*
-        * Contract checking is done in isc_log_doit().
-        */
-       isc_log_doit(lctx, category, module, level, false,
-                    msgcat, msgset, msg, format, args);
-}
-
-void
-isc_log_iwrite1(isc_log_t *lctx, isc_logcategory_t *category,
-               isc_logmodule_t *module, int level,
-               isc_msgcat_t *msgcat, int msgset, int msg,
-               const char *format, ...)
-{
-       va_list args;
-
-       /*
-        * Contract checking is done in isc_log_doit().
-        */
-
-       va_start(args, format);
-       isc_log_doit(lctx, category, module, level, true,
-                    msgcat, msgset, msg, format, args);
-       va_end(args);
-}
-
-void
-isc_log_ivwrite1(isc_log_t *lctx, isc_logcategory_t *category,
-                isc_logmodule_t *module, int level,
-                isc_msgcat_t *msgcat, int msgset, int msg,
-                const char *format, va_list args)
-{
-       /*
-        * Contract checking is done in isc_log_doit().
-        */
-       isc_log_doit(lctx, category, module, level, true,
-                    msgcat, msgset, msg, format, args);
+                    format, args);
 }
 
 void
@@ -1577,7 +1513,6 @@ isc_log_wouldlog(isc_log_t *lctx, int level) {
 static void
 isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
             isc_logmodule_t *module, int level, bool write_once,
-            isc_msgcat_t *msgcat, int msgset, int msg,
             const char *format, va_list args)
 {
        int syslog_level;
@@ -1585,8 +1520,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
        char local_time[64];
        char iso8601z_string[64];
        char iso8601l_string[64];
-       char level_string[24];
-       const char *iformat;
+       char level_string[24] = { 0 };
        struct stat statbuf;
        bool matched = false;
        bool printtime, iso8601, utc, printtag, printcolon;
@@ -1616,15 +1550,9 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
        if (! isc_log_wouldlog(lctx, level))
                return;
 
-       if (msgcat != NULL)
-               iformat = isc_msgcat_get(msgcat, msgset, msg, format);
-       else
-               iformat = format;
-
        local_time[0] = '\0';
        iso8601l_string[0] = '\0';
        iso8601z_string[0] = '\0';
-       level_string[0] = '\0';
 
        LOCK(&lctx->lock);
 
@@ -1705,20 +1633,17 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
 
                if ((channel->flags & ISC_LOG_PRINTLEVEL) != 0 &&
                    level_string[0] == '\0') {
-                       if (level < ISC_LOG_CRITICAL)
+                       if (level < ISC_LOG_CRITICAL) {
                                snprintf(level_string, sizeof(level_string),
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_LOG,
-                                                       ISC_MSG_LEVEL,
-                                                       "level %d: "),
-                                        level);
-                       else if (level > ISC_LOG_DYNAMIC)
+                                        "level %d: ", level);
+                       } else if (level > ISC_LOG_DYNAMIC) {
                                snprintf(level_string, sizeof(level_string),
                                         "%s %d: ", log_level_strings[0],
                                         level);
-                       else
+                       } else {
                                snprintf(level_string, sizeof(level_string),
                                         "%s: ", log_level_strings[-level]);
+                       }
                }
 
                /*
@@ -1726,7 +1651,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
                 */
                if (lctx->buffer[0] == '\0') {
                        (void)vsnprintf(lctx->buffer, sizeof(lctx->buffer),
-                                       iformat, args);
+                                       format, args);
 
                        /*
                         * Check for duplicates.
index 9bee9702644cf0b89abbd9efe4a83ffcf7b095ee..01a42a4e256847ee72cde5fd946ddd81f8302e41 100644 (file)
@@ -26,7 +26,6 @@
 #include <isc/json.h>
 #include <isc/magic.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/mutex.h>
 #include <isc/once.h>
 #include <isc/print.h>
@@ -256,12 +255,10 @@ add_trace_entry(isc__mem_t *mctx, const void *ptr, size_t size FLARG) {
        uint32_t hash;
        uint32_t idx;
 
-       if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0)
-               fprintf(stderr, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                              ISC_MSG_ADDTRACE,
-                                              "add %p size %u "
-                                              "file %s line %u mctx %p\n"),
+       if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0) {
+               fprintf(stderr, "add %p size %zu file %s line %u mctx %p\n",
                        ptr, size, file, line, mctx);
+       }
 
        if (mctx->debuglist == NULL)
                return;
@@ -293,12 +290,10 @@ delete_trace_entry(isc__mem_t *mctx, const void *ptr, size_t size,
        uint32_t hash;
        uint32_t idx;
 
-       if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0)
-               fprintf(stderr, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                              ISC_MSG_DELTRACE,
-                                              "del %p size %u "
-                                              "file %s line %u mctx %p\n"),
+       if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0) {
+               fprintf(stderr, "del %p size %zu file %s line %u mctx %p\n",
                        ptr, size, file, line, mctx);
+       }
 
        if (mctx->debuglist == NULL)
                return;
@@ -1139,35 +1134,31 @@ print_active(isc__mem_t *mctx, FILE *out) {
        if (mctx->debuglist != NULL) {
                debuglink_t *dl;
                unsigned int i;
-               const char *format;
                bool found;
 
-               fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                           ISC_MSG_DUMPALLOC,
-                                           "Dump of all outstanding "
-                                           "memory allocations:\n"));
+               fputs("Dump of all outstanding memory allocations:\n", out);
                found = false;
-               format = isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                       ISC_MSG_PTRFILELINE,
-                                       "\tptr %p size %u file %s line %u\n");
                for (i = 0; i < DEBUG_TABLE_COUNT; i++) {
                        dl = ISC_LIST_HEAD(mctx->debuglist[i]);
 
-                       if (dl != NULL)
+                       if (dl != NULL) {
                                found = true;
+                       }
 
                        while (dl != NULL) {
-                               if (dl->ptr != NULL)
-                                       fprintf(out, format,
+                               if (dl->ptr != NULL) {
+                                       fprintf(out,
+                                               "\tptr %p size %zu file %s line %u\n",
                                                dl->ptr, dl->size,
                                                dl->file, dl->line);
+                               }
                                dl = ISC_LIST_NEXT(dl, link);
                        }
                }
 
-               if (!found)
-                       fputs(isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                            ISC_MSG_NONE, "\tNone.\n"), out);
+               if (!found) {
+                       fputs("\tNone.\n", out);
+               }
        }
 }
 #endif
@@ -1209,27 +1200,10 @@ isc_mem_stats(isc_mem_t *ctx0, FILE *out) {
         */
        pool = ISC_LIST_HEAD(ctx->pools);
        if (pool != NULL) {
-               fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                           ISC_MSG_POOLSTATS,
-                                           "[Pool statistics]\n"));
+               fputs("[Pool statistics]\n", out);
                fprintf(out, "%15s %10s %10s %10s %10s %10s %10s %10s %1s\n",
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLNAME, "name"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLSIZE, "size"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLMAXALLOC, "maxalloc"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLALLOCATED, "allocated"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLFREECOUNT, "freecount"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLFREEMAX, "freemax"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLFILLCOUNT, "fillcount"),
-                       isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
-                                      ISC_MSG_POOLGETS, "gets"),
-                       "L");
+                       "name", "size", "maxalloc", "allocated", "freecount",
+                       "freemax", "fillcount", "gets", "L");
        }
        while (pool != NULL) {
                fprintf(out, "%15s %10lu %10u %10u %10u %10u %10u %10u %s\n",
index be4e708e6af4ae499d673ae29d325f341765333a..7d94697a3179666abff6e9121dda1f70370ada8f 100644 (file)
@@ -19,7 +19,6 @@
 #include <inttypes.h>
 
 #include <isc/buffer.h>
-#include <isc/msgs.h>
 #include <isc/net.h>
 #include <isc/netaddr.h>
 #include <isc/print.h>
@@ -196,9 +195,7 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size) {
 
        if (result != ISC_R_SUCCESS) {
                snprintf(array, size,
-                        isc_msgcat_get(isc_msgcat, ISC_MSGSET_NETADDR,
-                                       ISC_MSG_UNKNOWNADDR,
-                                       "<unknown address, family %u>"),
+                        "<unknown address, family %u>",
                         na->family);
                array[size - 1] = '\0';
        }
diff --git a/lib/isc/nls/Makefile.in b/lib/isc/nls/Makefile.in
deleted file mode 100644 (file)
index 704dead..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-#
-# 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 http://mozilla.org/MPL/2.0/.
-#
-# See the COPYRIGHT file distributed with this work for additional
-# information regarding copyright ownership.
-
-srcdir =       @srcdir@
-VPATH =                @srcdir@
-top_srcdir =   @top_srcdir@
-
-CINCLUDES =    -I../unix/include \
-               -I${srcdir}/../unix/include \
-               -I../include \
-               -I${srcdir}/../include
-
-CDEFINES =
-CWARNINGS =
-
-OBJS =         msgcat.@O@
-
-SRCS =         msgcat.c
-
-SUBDIRS =
-TARGETS =      ${OBJS}
-
-@BIND9_MAKE_RULES@
diff --git a/lib/isc/nls/msgcat.c b/lib/isc/nls/msgcat.c
deleted file mode 100644 (file)
index ab09b94..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * 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 http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-/*! \file msgcat.c */
-
-#include <config.h>
-
-#include <stddef.h>
-#include <stdlib.h>
-
-#include <isc/magic.h>
-#include <isc/msgcat.h>
-#include <isc/util.h>
-
-#ifdef HAVE_CATGETS
-#include <nl_types.h>          /* Required for nl_catd. */
-#endif
-
-/*
- * Implementation Notes:
- *
- *     We use malloc() and free() instead of isc_mem_get() and isc_mem_put()
- *     because we don't want to require a memory context to be specified
- *     in order to use a message catalog.
- */
-
-struct isc_msgcat {
-       unsigned int    magic;
-#ifdef HAVE_CATGETS
-       nl_catd         catalog;
-#endif
-};
-
-#define MSGCAT_MAGIC                   ISC_MAGIC('M', 'C', 'a', 't')
-#define VALID_MSGCAT(m)                        ISC_MAGIC_VALID(m, MSGCAT_MAGIC)
-
-void
-isc_msgcat_open(const char *name, isc_msgcat_t **msgcatp) {
-       isc_msgcat_t *msgcat;
-
-       /*
-        * Open a message catalog.
-        */
-
-       REQUIRE(name != NULL);
-       REQUIRE(msgcatp != NULL && *msgcatp == NULL);
-
-       msgcat = malloc(sizeof(*msgcat));
-       if (msgcat == NULL) {
-               *msgcatp = NULL;
-               return;
-       }
-
-#ifdef HAVE_CATGETS
-       /*
-        * We don't check if catopen() fails because we don't care.
-        * If it does fail, then when we call catgets(), it will use
-        * the default string.
-        */
-       msgcat->catalog = catopen(name, 0);
-#endif
-       msgcat->magic = MSGCAT_MAGIC;
-
-       *msgcatp = msgcat;
-}
-
-void
-isc_msgcat_close(isc_msgcat_t **msgcatp) {
-       isc_msgcat_t *msgcat;
-
-       /*
-        * Close a message catalog.
-        */
-
-       REQUIRE(msgcatp != NULL);
-       msgcat = *msgcatp;
-       REQUIRE(VALID_MSGCAT(msgcat) || msgcat == NULL);
-
-       if (msgcat != NULL) {
-#ifdef HAVE_CATGETS
-               if (msgcat->catalog != (nl_catd)(-1))
-                       (void)catclose(msgcat->catalog);
-#endif
-               msgcat->magic = 0;
-               free(msgcat);
-       }
-
-       *msgcatp = NULL;
-}
-
-const char *
-isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
-              const char *default_text)
-{
-       /*
-        * Get message 'message' from message set 'set' in 'msgcat'.  If it
-        * is not available, use 'default'.
-        */
-
-       REQUIRE(VALID_MSGCAT(msgcat) || msgcat == NULL);
-       REQUIRE(set > 0);
-       REQUIRE(message > 0);
-       REQUIRE(default_text != NULL);
-
-#ifdef HAVE_CATGETS
-       if (msgcat == NULL)
-               return (default_text);
-       return (catgets(msgcat->catalog, set, message, default_text));
-#else
-       return (default_text);
-#endif
-}
index 650cf78ca21d7c4a9194c8895bab17e27a15a46f..0aaccf65aef0453d5b635e87a14a8e30c7bf88bb 100644 (file)
 #include <stddef.h>
 
 #include <isc/once.h>
-#include <isc/msgcat.h>
 #include <isc/util.h>
 
 #include <pk11/result.h>
 
-LIBISC_EXTERNAL_DATA isc_msgcat_t *            pk11_msgcat = NULL;
-
-static isc_once_t              msgcat_once = ISC_ONCE_INIT;
-
 static const char *text[PK11_R_NRESULTS] = {
        "PKCS#11 initialization failed",                /*%< 0 */
        "no PKCS#11 provider",                          /*%< 1 */
@@ -42,36 +37,19 @@ static const char *ids[PK11_R_NRESULTS] = {
 
 static isc_once_t              once = ISC_ONCE_INIT;
 
-static void
-open_msgcat(void) {
-       isc_msgcat_open("libpk11.cat", &pk11_msgcat);
-}
-
-void
-pk11_initmsgcat(void) {
-
-       /*
-        * Initialize the PKCS#11 support's message catalog,
-        * pk11_msgcat, if it has not already been initialized.
-        */
-
-       RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
-
 static void
 initialize_action(void) {
        isc_result_t result;
 
        result = isc_result_register(ISC_RESULTCLASS_PK11, PK11_R_NRESULTS,
-                                    text, pk11_msgcat, PK11_RESULT_RESULTSET);
+                                    text, PK11_RESULT_RESULTSET);
        if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_result_register() failed: %u", result);
        }
 
        result = isc_result_registerids(ISC_RESULTCLASS_PK11, PK11_R_NRESULTS,
-                                       ids, pk11_msgcat,
-                                       PK11_RESULT_RESULTSET);
+                                       ids, PK11_RESULT_RESULTSET);
        if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_result_registerids() failed: %u", result);
@@ -80,7 +58,6 @@ initialize_action(void) {
 
 static void
 initialize(void) {
-       pk11_initmsgcat();
        RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
 }
 
index 4a9fa9499a43127c59de664aa2ba247d0642d1f2..0f9c70f9165196aaad8da67750903027ea22afca 100644 (file)
@@ -17,7 +17,6 @@
 #include <errno.h>
 
 #include <isc/condition.h>
-#include <isc/msgs.h>
 #include <isc/strerr.h>
 #include <isc/string.h>
 #include <isc/time.h>
@@ -66,9 +65,7 @@ isc_condition_waituntil(isc_condition_t *c, isc_mutex_t *m, isc_time_t *t) {
 
        strerror_r(presult, strbuf, sizeof(strbuf));
        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                        "pthread_cond_timedwait() %s %s",
-                        isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                       ISC_MSG_RETURNED, "returned"),
+                        "pthread_cond_timedwait() returned %s",
                         strbuf);
        return (ISC_R_UNEXPECTED);
 }
index 417533d18c8ad5aa50db80d61be935bd922bbe07..67a01187030c8b08017b6320592e2ec7e2edce65 100644 (file)
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 
 #include <isc/lib.h>
-#include <isc/msgs.h>
 #include <isc/mutex.h>
 #include <isc/once.h>
 #include <isc/resultclass.h>
@@ -27,7 +26,6 @@ typedef struct resulttable {
        unsigned int                            base;
        unsigned int                            last;
        const char **                           text;
-       isc_msgcat_t *                          msgcat;
        int                                     set;
        ISC_LINK(struct resulttable)            link;
 } resulttable;
@@ -183,7 +181,7 @@ static isc_mutex_t          lock;
 static isc_result_t
 register_table(resulttable_list_t *tables, unsigned int base,
               unsigned int nresults, const char **text,
-              isc_msgcat_t *msgcat, int set)
+              int set)
 {
        resulttable *table;
 
@@ -201,7 +199,6 @@ register_table(resulttable_list_t *tables, unsigned int base,
        table->base = base;
        table->last = base + nresults - 1;
        table->text = text;
-       table->msgcat = msgcat;
        table->set = set;
        ISC_LINK_INIT(table, link);
 
@@ -224,35 +221,32 @@ initialize_action(void) {
 
        result = register_table(&description_tables,
                                ISC_RESULTCLASS_ISC, ISC_R_NRESULTS,
-                               description, isc_msgcat, ISC_RESULT_RESULTSET);
-       if (result != ISC_R_SUCCESS)
+                               description, ISC_RESULT_RESULTSET);
+       if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "register_table() %s: %u",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "register_table() failed: %u",
                                 result);
+       }
 
        result = register_table(&identifier_tables,
                                ISC_RESULTCLASS_ISC, ISC_R_NRESULTS,
-                               identifier, isc_msgcat, ISC_RESULT_RESULTSET);
-       if (result != ISC_R_SUCCESS)
+                               identifier, ISC_RESULT_RESULTSET);
+       if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "register_table() %s: %u",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "register_table() failed: %u",
                                 result);
+       }
 }
 
 static void
 initialize(void) {
-       isc_lib_initmsgcat();
        RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
 }
 
 static const char *
 isc_result_tomany_helper(resulttable_list_t *tables, isc_result_t result) {
        resulttable *table;
-       const char *text, *default_text;
+       const char *text;
        int index;
 
        initialize();
@@ -265,20 +259,13 @@ isc_result_tomany_helper(resulttable_list_t *tables, isc_result_t result) {
             table = ISC_LIST_NEXT(table, link)) {
                if (result >= table->base && result <= table->last) {
                        index = (int)(result - table->base);
-                       default_text = table->text[index];
-                       /*
-                        * Note: we use 'index + 1' as the message number
-                        * instead of index because isc_msgcat_get() requires
-                        * the message number to be > 0.
-                        */
-                       text = isc_msgcat_get(table->msgcat, table->set,
-                                             index + 1, default_text);
+                       text = table->text[index];
                        break;
                }
        }
-       if (text == NULL)
-               text = isc_msgcat_get(isc_msgcat, ISC_RESULT_UNAVAILABLESET,
-                                     1, "(result code text not available)");
+       if (text == NULL) {
+               text = "(result code text not available)";
+       }
 
        UNLOCK(&lock);
 
@@ -297,20 +284,20 @@ isc_result_toid(isc_result_t result) {
 
 isc_result_t
 isc_result_register(unsigned int base, unsigned int nresults,
-                   const char **text, isc_msgcat_t *msgcat, int set)
+                   const char **text, int set)
 {
        initialize();
 
        return (register_table(&description_tables, base, nresults, text,
-                              msgcat, set));
+                              set));
 }
 
 isc_result_t
 isc_result_registerids(unsigned int base, unsigned int nresults,
-                      const char **ids, isc_msgcat_t *msgcat, int set)
+                      const char **ids, int set)
 {
        initialize();
 
        return (register_table(&identifier_tables, base, nresults, ids,
-                              msgcat, set));
+                              set));
 }
index a914ba4ceea4fc13da2cecda4524823c634939c2..8b3f2b5988be3c17d30310ce92d29d33974644c4 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <isc/atomic.h>
 #include <isc/magic.h>
-#include <isc/msgs.h>
 #include <isc/platform.h>
 #include <isc/print.h>
 #include <isc/rwlock.h>
@@ -72,18 +71,12 @@ isc__rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type);
 static void
 print_lock(const char *operation, isc_rwlock_t *rwl, isc_rwlocktype_t type) {
        fprintf(stderr,
-               isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                              ISC_MSG_PRINTLOCK2,
-                              "rwlock %p thread %lu %s(%s): "
-                              "write_requests=%u, write_completions=%u, "
-                              "cnt_and_flag=0x%x, readers_waiting=%u, "
-                              "write_granted=%u, write_quota=%u\n"),
+               "rwlock %p thread %lu %s(%s): "
+               "write_requests=%u, write_completions=%u, "
+               "cnt_and_flag=0x%x, readers_waiting=%u, "
+               "write_granted=%u, write_quota=%u\n",
                rwl, isc_thread_self(), operation,
-               (type == isc_rwlocktype_read ?
-                isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                               ISC_MSG_READ, "read") :
-                isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                               ISC_MSG_WRITE, "write")),
+               (type == isc_rwlocktype_read ? "read" : "write"),
                atomic_load_explicit(&rwl->write_requests, memory_order_relaxed),
                atomic_load_explicit(&rwl->write_completions, memory_order_relaxed),
                atomic_load_explicit(&rwl->cnt_and_flag, memory_order_relaxed),
@@ -214,8 +207,7 @@ isc__rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
        REQUIRE(VALID_RWLOCK(rwl));
 
 #ifdef ISC_RWLOCK_TRACE
-       print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                                 ISC_MSG_PRELOCK, "prelock"), rwl, type);
+       print_lock("prelock", rwl, type);
 #endif
 
        if (type == isc_rwlocktype_read) {
@@ -321,8 +313,7 @@ isc__rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
        }
 
 #ifdef ISC_RWLOCK_TRACE
-       print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                                 ISC_MSG_POSTLOCK, "postlock"), rwl, type);
+       print_lock("postlock", rwl, type);
 #endif
 
        return (ISC_R_SUCCESS);
@@ -357,8 +348,7 @@ isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
        REQUIRE(VALID_RWLOCK(rwl));
 
 #ifdef ISC_RWLOCK_TRACE
-       print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                                 ISC_MSG_PRELOCK, "prelock"), rwl, type);
+       print_lock("prelock", rwl, type);
 #endif
 
        if (type == isc_rwlocktype_read) {
@@ -414,8 +404,7 @@ isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
        }
 
 #ifdef ISC_RWLOCK_TRACE
-       print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                                 ISC_MSG_POSTLOCK, "postlock"), rwl, type);
+       print_lock("postlock", rwl, type);
 #endif
 
        return (ISC_R_SUCCESS);
@@ -489,8 +478,7 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
        REQUIRE(VALID_RWLOCK(rwl));
 
 #ifdef ISC_RWLOCK_TRACE
-       print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                                 ISC_MSG_PREUNLOCK, "preunlock"), rwl, type);
+       print_lock("preunlock", rwl, type);
 #endif
 
        if (type == isc_rwlocktype_read) {
@@ -551,8 +539,7 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
        }
 
 #ifdef ISC_RWLOCK_TRACE
-       print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
-                                 ISC_MSG_POSTUNLOCK, "postunlock"),
+       print_lock("postunlock",
                   rwl, type);
 #endif
 
index aa64071213f59d9c7d3d2808a1b214b45d3a9bc8..a417c252e00e1e7929cfbe0327e5b4e29118f871 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <isc/buffer.h>
 #include <isc/hash.h>
-#include <isc/msgs.h>
 #include <isc/netaddr.h>
 #include <isc/print.h>
 #include <isc/region.h>
@@ -184,9 +183,7 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size) {
                 * The message is the same as in netaddr.c.
                 */
                snprintf(array, size,
-                        isc_msgcat_get(isc_msgcat, ISC_MSGSET_NETADDR,
-                                       ISC_MSG_UNKNOWNADDR,
-                                       "<unknown address, family %u>"),
+                        "<unknown address, family %u>",
                         sa->type.sa.sa_family);
                array[size - 1] = '\0';
        }
@@ -220,11 +217,8 @@ isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, bool address_only) {
                break;
        default:
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_SOCKADDR,
-                                               ISC_MSG_UNKNOWNFAMILY,
-                                               "unknown address family: %d"),
-                                            (int)sockaddr->type.sa.sa_family);
+                                "unknown address family: %d",
+                                (int)sockaddr->type.sa.sa_family);
                s = (const unsigned char *)&sockaddr->type;
                length = sockaddr->length;
                p = 0;
@@ -332,9 +326,7 @@ isc_sockaddr_pf(const isc_sockaddr_t *sockaddr) {
                return (PF_INET6);
        default:
                FATAL_ERROR(__FILE__, __LINE__,
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
-                                          ISC_MSG_UNKNOWNFAMILY,
-                                          "unknown address family: %d"),
+                           "unknown address family: %d",
                            (int)sockaddr->type.sa.sa_family);
        }
 #endif
@@ -376,9 +368,7 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port) {
                break;
        default:
                FATAL_ERROR(__FILE__, __LINE__,
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
-                                          ISC_MSG_UNKNOWNFAMILY,
-                                          "unknown address family: %d"),
+                           "unknown address family: %d",
                            (int)sockaddr->type.sa.sa_family);
        }
 }
@@ -396,9 +386,7 @@ isc_sockaddr_getport(const isc_sockaddr_t *sockaddr) {
                break;
        default:
                FATAL_ERROR(__FILE__, __LINE__,
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
-                                          ISC_MSG_UNKNOWNFAMILY,
-                                          "unknown address family: %d"),
+                           "unknown address family: %d",
                            (int)sockaddr->type.sa.sa_family);
        }
 
index a51d3359abfcc42137126362420c4bc8ea46b898..21c3d177caf5912cc0a37ec12333a235de291255 100644 (file)
@@ -27,7 +27,6 @@
 #include <isc/json.h>
 #include <isc/magic.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/once.h>
 #include <isc/platform.h>
 #include <isc/print.h>
@@ -356,8 +355,7 @@ task_shutdown(isc__task_t *task) {
        XTRACE("task_shutdown");
 
        if (! TASK_SHUTTINGDOWN(task)) {
-               XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                     ISC_MSG_SHUTTINGDOWN, "shutting down"));
+               XTRACE("shutting down");
                task->flags |= TASK_F_SHUTTINGDOWN;
                if (task->state == task_state_idle) {
                        INSIST(EMPTY(task->events));
@@ -1035,32 +1033,22 @@ dispatch(isc__taskmgr_t *manager, unsigned int threadid) {
                        !manager->exclusive_requested) &&
                       !FINISHED(manager))
                {
-                       XTHREADTRACE(isc_msgcat_get(isc_msgcat,
-                                                   ISC_MSGSET_GENERAL,
-                                                   ISC_MSG_WAIT, "wait"));
-                       XTHREADTRACE(isc_msgcat_get(isc_msgcat,
-                                                   ISC_MSGSET_GENERAL,
-                                                   ISC_MSG_WAIT,
-                                                   manager->pause_requested
-                                                    ? "paused" : "notpaused"));
-                       XTHREADTRACE(isc_msgcat_get(isc_msgcat,
-                                                   ISC_MSGSET_GENERAL,
-                                                   ISC_MSG_WAIT,
-                                                   manager->exclusive_requested
-                                                    ? "excreq" : "notexcreq"));
+                       XTHREADTRACE("wait");
+                       XTHREADTRACE(manager->pause_requested
+                                    ? "paused"
+                                    : "notpaused");
+                       XTHREADTRACE(manager->exclusive_requested
+                                    ? "excreq"
+                                    : "notexcreq");
                        WAIT(&manager->queues[threadid].work_available,
                             &manager->queues[threadid].lock);
-                       XTHREADTRACE(isc_msgcat_get(isc_msgcat,
-                                                   ISC_MSGSET_TASK,
-                                                   ISC_MSG_AWAKE, "awake"));
+                       XTHREADTRACE("awake");
                }
-               XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TASK,
-                                           ISC_MSG_WORKING, "working"));
+               XTHREADTRACE("working");
 
                if (manager->pause_requested || manager->exclusive_requested) {
                        UNLOCK(&manager->queues[threadid].lock);
-                       XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TASK,
-                                           ISC_MSG_WORKING, "halting"));
+                       XTHREADTRACE("halting");
 
                        /*
                         * Switching to exclusive mode is done as a
@@ -1117,8 +1105,7 @@ dispatch(isc__taskmgr_t *manager, unsigned int threadid) {
                        LOCK(&task->lock);
                        INSIST(task->state == task_state_ready);
                        task->state = task_state_running;
-                       XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                             ISC_MSG_RUNNING, "running"));
+                       XTRACE("running");
                        XTRACE(task->name);
                        TIME_NOW(&task->tnow);
                        task->now = isc_time_seconds(&task->tnow);
@@ -1131,10 +1118,7 @@ dispatch(isc__taskmgr_t *manager, unsigned int threadid) {
                                        /*
                                         * Execute the event action.
                                         */
-                                       XTRACE(isc_msgcat_get(isc_msgcat,
-                                                           ISC_MSGSET_TASK,
-                                                           ISC_MSG_EXECUTE,
-                                                           "execute action"));
+                                       XTRACE("execute action");
                                        XTRACE(task->name);
                                        if (event->ev_action != NULL) {
                                                UNLOCK(&task->lock);
@@ -1182,20 +1166,13 @@ dispatch(isc__taskmgr_t *manager, unsigned int threadid) {
                                         * Nothing else to do for this task
                                         * right now.
                                         */
-                                       XTRACE(isc_msgcat_get(isc_msgcat,
-                                                             ISC_MSGSET_TASK,
-                                                             ISC_MSG_EMPTY,
-                                                             "empty"));
+                                       XTRACE("empty");
                                        if (task->references == 0 &&
                                            TASK_SHUTTINGDOWN(task)) {
                                                /*
                                                 * The task is done.
                                                 */
-                                               XTRACE(isc_msgcat_get(
-                                                              isc_msgcat,
-                                                              ISC_MSGSET_TASK,
-                                                              ISC_MSG_DONE,
-                                                              "done"));
+                                               XTRACE("done");
                                                finished = true;
                                                task->state = task_state_done;
                                        } else
@@ -1212,10 +1189,7 @@ dispatch(isc__taskmgr_t *manager, unsigned int threadid) {
                                         * dispatching at least one event,
                                         * so the minimum quantum is one.
                                         */
-                                       XTRACE(isc_msgcat_get(isc_msgcat,
-                                                             ISC_MSGSET_TASK,
-                                                             ISC_MSG_QUANTUM,
-                                                             "quantum"));
+                                       XTRACE("quantum");
                                        task->state = task_state_ready;
                                        requeue = true;
                                        done = true;
@@ -1312,13 +1286,11 @@ run(void *queuep) {
        int threadid = tq->threadid;
        isc_thread_setaffinity(threadid);
 
-       XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                   ISC_MSG_STARTING, "starting"));
+       XTHREADTRACE("starting");
 
        dispatch(manager, threadid);
 
-       XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                   ISC_MSG_EXITING, "exiting"));
+       XTHREADTRACE("exiting");
 
 #ifdef OPENSSL_LEAKS
        ERR_remove_state(0);
index 94c55fbb43398fda655698ba80f36455ba972059..bd8a1c4ea56653a6f994f9dcd50fb8ba296940b0 100644 (file)
@@ -22,7 +22,6 @@
 #include <isc/log.h>
 #include <isc/magic.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/once.h>
 #include <isc/platform.h>
 #include <isc/print.h>
@@ -167,8 +166,7 @@ schedule(isc__timer_t *timer, isc_time_t *now, bool signal_ok) {
                manager->nscheduled++;
        }
 
-       XTRACETIMER(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
-                                  ISC_MSG_SCHEDULE, "schedule"), timer, due);
+       XTRACETIMER("schedule", timer, due);
 
        /*
         * If this timer is at the head of the queue, we need to ensure
@@ -178,9 +176,7 @@ schedule(isc__timer_t *timer, isc_time_t *now, bool signal_ok) {
         */
 
        if (timer->index == 1 && signal_ok) {
-               XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
-                                     ISC_MSG_SIGNALSCHED,
-                                     "signal (schedule)"));
+               XTRACE("signal (schedule)");
                SIGNAL(&manager->wakeup);
        }
 
@@ -205,9 +201,7 @@ deschedule(isc__timer_t *timer) {
                INSIST(manager->nscheduled > 0);
                manager->nscheduled--;
                if (need_wakeup) {
-                       XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
-                                             ISC_MSG_SIGNALDESCHED,
-                                             "signal (deschedule)"));
+                       XTRACE("signal (deschedule)");
                        SIGNAL(&manager->wakeup);
                }
        }
@@ -579,21 +573,14 @@ dispatch(isc__timermgr_t *manager, isc_time_t *now) {
                                         * Idle timer has been touched;
                                         * reschedule.
                                         */
-                                       XTRACEID(isc_msgcat_get(isc_msgcat,
-                                                               ISC_MSGSET_TIMER,
-                                                               ISC_MSG_IDLERESCHED,
-                                                               "idle reschedule"),
-                                                timer);
+                                       XTRACEID("idle reschedule", timer);
                                        post_event = false;
                                        need_schedule = true;
                                }
                        }
 
                        if (post_event) {
-                               XTRACEID(isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_TIMER,
-                                                       ISC_MSG_POSTING,
-                                                       "posting"), timer);
+                               XTRACEID("posting", timer);
                                /*
                                 * XXX We could preallocate this event.
                                 */
@@ -610,11 +597,7 @@ dispatch(isc__timermgr_t *manager, isc_time_t *now) {
                                                      ISC_EVENT_PTR(&event));
                                } else
                                        UNEXPECTED_ERROR(__FILE__, __LINE__, "%s",
-                                                isc_msgcat_get(isc_msgcat,
-                                                        ISC_MSGSET_TIMER,
-                                                        ISC_MSG_EVENTNOTALLOC,
-                                                        "couldn't "
-                                                        "allocate event"));
+                                                        "couldn't allocate event");
                        }
 
                        timer->index = 0;
@@ -626,11 +609,7 @@ dispatch(isc__timermgr_t *manager, isc_time_t *now) {
                                if (result != ISC_R_SUCCESS)
                                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                         "%s: %u",
-                                               isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_TIMER,
-                                                       ISC_MSG_SCHEDFAIL,
-                                                       "couldn't schedule "
-                                                       "timer"),
+                                                        "couldn't schedule timer",
                                                         result);
                        }
                } else {
@@ -653,28 +632,20 @@ run(void *uap) {
        while (!manager->done) {
                TIME_NOW(&now);
 
-               XTRACETIME(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                         ISC_MSG_RUNNING,
-                                         "running"), now);
+               XTRACETIME("running", now);
 
                dispatch(manager, &now);
 
                if (manager->nscheduled > 0) {
-                       XTRACETIME2(isc_msgcat_get(isc_msgcat,
-                                                  ISC_MSGSET_GENERAL,
-                                                  ISC_MSG_WAITUNTIL,
-                                                  "waituntil"),
-                                   manager->due, now);
+                       XTRACETIME2("waituntil", manager->due, now);
                        result = WAITUNTIL(&manager->wakeup, &manager->lock, &manager->due);
                        INSIST(result == ISC_R_SUCCESS ||
                               result == ISC_R_TIMEDOUT);
                } else {
-                       XTRACETIME(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                                 ISC_MSG_WAIT, "wait"), now);
+                       XTRACETIME("wait", now);
                        WAIT(&manager->wakeup, &manager->lock);
                }
-               XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
-                                     ISC_MSG_WAKEUP, "wakeup"));
+               XTRACE("wakeup");
        }
        UNLOCK(&manager->lock);
 
@@ -748,10 +719,8 @@ isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
                isc_mutex_destroy(&manager->lock);
                isc_heap_destroy(&manager->heap);
                isc_mem_put(mctx, manager, sizeof(*manager));
-               UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "isc_thread_create() %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+               UNEXPECTED_ERROR(__FILE__, __LINE__, "%s",
+                                "isc_thread_create() failed");
                return (ISC_R_UNEXPECTED);
        }
        isc_thread_setname(manager->thread, "isc-timer");
@@ -788,8 +757,7 @@ isc_timermgr_destroy(isc_timermgr_t **managerp) {
        REQUIRE(EMPTY(manager->timers));
        manager->done = true;
 
-       XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
-                             ISC_MSG_SIGNALDESTROY, "signal (destroy)"));
+       XTRACE("signal (destroy)");
        SIGNAL(&manager->wakeup);
 
        UNLOCK(&manager->lock);
@@ -798,10 +766,8 @@ isc_timermgr_destroy(isc_timermgr_t **managerp) {
         * Wait for thread to exit.
         */
        if (isc_thread_join(manager->thread, NULL) != ISC_R_SUCCESS)
-               UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "isc_thread_join() %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+               UNEXPECTED_ERROR(__FILE__, __LINE__, "%s",
+                                "isc_thread_join() failed");
 
        /*
         * Clean up.
index c248672ac33eb55b0a6ec6571e987f76ec227c0e..6b5756cf8eaf8238ae191bc60eff94ee6aad1144 100644 (file)
@@ -32,7 +32,6 @@
 #include <isc/app.h>
 #include <isc/condition.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/mutex.h>
 #include <isc/event.h>
 #include <isc/platform.h>
@@ -114,9 +113,7 @@ handle_signal(int sig, void (*handler)(int)) {
            sigaction(sig, &sa, NULL) < 0) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_APP,
-                                              ISC_MSG_SIGNALSETUP,
-                                              "handle_signal() %d setup: %s"),
+                                "handle_signal() %d setup: %s",
                                 sig, strbuf);
                return (ISC_R_UNEXPECTED);
        }
index 7f10a9ac38d4802197603f2c1fe3342917ec7e05..28f9edf9b632c7d4ba604cb7effd1855f7b37a40 100644 (file)
@@ -81,11 +81,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
        if (getifaddrs(&iter->ifaddrs) < 0) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_IFITERGETIFADDRS,
-                                               ISC_MSG_GETIFADDRS,
-                                               "getting interface "
-                                               "addresses: getifaddrs: %s"),
+                                "getting interface addresses: getifaddrs: %s",
                                 strbuf);
                result = ISC_R_UNEXPECTED;
                goto failure;
index acfd65f0a09bb311afbc934ca63940790171f5e4..897b3bbf83b1ddda1da851d0b6c78d9c230100aa 100644 (file)
@@ -30,7 +30,6 @@
 #include <isc/log.h>
 #include <isc/magic.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/net.h>
 #include <isc/print.h>
 #include <isc/result.h>
index 907579413dec37e29996d511b5f1f2fe5aeec573..98abab507782cb42ddc50545b3e7ac895c63af39 100644 (file)
@@ -28,7 +28,6 @@
 #include <fcntl.h>
 
 #include <isc/log.h>
-#include <isc/msgs.h>
 #include <isc/net.h>
 #include <isc/netdb.h>
 #include <isc/once.h>
@@ -139,11 +138,7 @@ try_proto(int domain) {
                default:
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "socket() %s: %s",
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
+                                        "socket() failed: %s",
                                         strbuf);
                        return (ISC_R_UNEXPECTED);
                }
@@ -247,11 +242,7 @@ try_ipv6only(void) {
        if (s == -1) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "socket() %s: %s",
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
+                                "socket() failed: %s",
                                 strbuf);
                ipv6only_result = ISC_R_UNEXPECTED;
                return;
@@ -270,11 +261,7 @@ try_ipv6only(void) {
        if (s == -1) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "socket() %s: %s",
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
+                                "socket() failed: %s",
                                 strbuf);
                ipv6only_result = ISC_R_UNEXPECTED;
                return;
@@ -318,11 +305,7 @@ try_ipv6pktinfo(void) {
        if (s == -1) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "socket() %s: %s",
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
+                                "socket() failed: %s",
                                 strbuf);
                ipv6pktinfo_result = ISC_R_UNEXPECTED;
                return;
@@ -519,7 +502,6 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
        if (sendmsg(s, &msg, 0) < 0) {
                int debug = ISC_LOG_DEBUG(10);
                const char *typestr;
-               const char *msgstr;
                switch (errno) {
 #ifdef ENOPROTOOPT
                case ENOPROTOOPT:
@@ -540,11 +522,9 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
                                      "sendmsg: %s", strbuf);
                } else {
                        typestr = (type == IP_TOS) ? "IP_TOS" : "IPV6_TCLASS";
-                       msgstr = isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed");
                        UNEXPECTED_ERROR(__FILE__, __LINE__, "probing "
-                                        "sendmsg() with %s=%02x %s: %s",
-                                        typestr, dscp, msgstr, strbuf);
+                                        "sendmsg() with %s=%02x failed: %s",
+                                        typestr, dscp, strbuf);
                }
                return (false);
        }
index 2ef71b68c847ec1d055b3c8525ad3e3fbb3a5662..fd627ccb994b77bc773039a1948ac3a424e16e35 100644 (file)
@@ -45,7 +45,6 @@
 #include <isc/list.h>
 #include <isc/log.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/mutex.h>
 #include <isc/net.h>
 #include <isc/once.h>
@@ -627,12 +626,10 @@ thread_log(isc__socketthread_t *thread,
 static void
 socket_log(isc__socket_t *sock, const isc_sockaddr_t *address,
           isc_logcategory_t *category, isc_logmodule_t *module, int level,
-          isc_msgcat_t *msgcat, int msgset, int message,
-          const char *fmt, ...) ISC_FORMAT_PRINTF(9, 10);
+          const char *fmt, ...) ISC_FORMAT_PRINTF(6, 7);
 static void
 socket_log(isc__socket_t *sock, const isc_sockaddr_t *address,
           isc_logcategory_t *category, isc_logmodule_t *module, int level,
-          isc_msgcat_t *msgcat, int msgset, int message,
           const char *fmt, ...)
 {
        char msgbuf[2048];
@@ -647,14 +644,12 @@ socket_log(isc__socket_t *sock, const isc_sockaddr_t *address,
        va_end(ap);
 
        if (address == NULL) {
-               isc_log_iwrite(isc_lctx, category, module, level,
-                              msgcat, msgset, message,
-                              "socket %p: %s", sock, msgbuf);
+               isc_log_write(isc_lctx, category, module, level,
+                             "socket %p: %s", sock, msgbuf);
        } else {
                isc_sockaddr_format(address, peerbuf, sizeof(peerbuf));
-               isc_log_iwrite(isc_lctx, category, module, level,
-                              msgcat, msgset, message,
-                              "socket %p %s: %s", sock, peerbuf, msgbuf);
+               isc_log_write(isc_lctx, category, module, level,
+                             "socket %p %s: %s", sock, peerbuf, msgbuf);
        }
 }
 
@@ -962,10 +957,7 @@ select_poke(isc__socketmgr_t *mgr, int threadid, int fd, int msg) {
        if (cc < 0) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                                          ISC_MSG_WRITEFAILED,
-                                          "write() failed "
-                                          "during watcher poke: %s"),
+                           "write() failed during watcher poke: %s",
                            strbuf);
        }
 
@@ -990,10 +982,7 @@ select_readmsg(isc__socketthread_t *thread, int *fd, int *msg) {
 
                strerror_r(errno, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                                          ISC_MSG_READFAILED,
-                                          "read() failed "
-                                          "during watcher poke: %s"),
+                           "read() failed during watcher poke: %s",
                            strbuf);
        }
        INSIST(cc == sizeof(buf));
@@ -1141,7 +1130,6 @@ process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
        cmsgp = CMSG_FIRSTHDR(msg);
        while (cmsgp != NULL) {
                socket_log(sock, NULL, TRACE,
-                          isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PROCESSCMSG,
                           "processing cmsg %p", cmsgp);
 
                if (cmsgp->cmsg_level == IPPROTO_IPV6
@@ -1152,8 +1140,6 @@ process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
                                sizeof(struct in6_pktinfo));
                        dev->attributes |= ISC_SOCKEVENTATTR_PKTINFO;
                        socket_log(sock, NULL, TRACE,
-                                  isc_msgcat, ISC_MSGSET_SOCKET,
-                                  ISC_MSG_IFRECEIVED,
                                   "interface received on ifindex %u",
                                   dev->pktinfo.ipi6_ifindex);
                        if (IN6_IS_ADDR_MULTICAST(&pktinfop->ipi6_addr))
@@ -1254,7 +1240,6 @@ build_msghdr_send(isc__socket_t *sock, char* cmsgbuf, isc_socketevent_t *dev,
                struct in6_pktinfo *pktinfop;
 
                socket_log(sock, NULL, TRACE,
-                          isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_SENDTODATA,
                           "sendto pktinfo data, ifindex %u",
                           dev->pktinfo.ipi6_ifindex);
 
@@ -1324,12 +1309,8 @@ build_msghdr_send(isc__socket_t *sock, char* cmsgbuf, isc_socketevent_t *dev,
                                strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "setsockopt(%d, IP_TOS, %.02x)"
-                                                " %s: %s",
+                                                " failed: %s",
                                                 sock->fd, dscp >> 2,
-                                                isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
                                                 strbuf);
                        } else
                                sock->dscp = dscp;
@@ -1354,12 +1335,8 @@ build_msghdr_send(isc__socket_t *sock, char* cmsgbuf, isc_socketevent_t *dev,
                                strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "setsockopt(%d, IPV6_TCLASS, "
-                                                "%.02x) %s: %s",
+                                                "%.02x) failed: %s",
                                                 sock->fd, dscp >> 2,
-                                                isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
                                                 strbuf);
                        } else
                                sock->dscp = dscp;
@@ -1548,8 +1525,6 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
                if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
                        strerror_r(recv_errno, strbuf, sizeof(strbuf));
                        socket_log(sock, NULL, IOEVENT,
-                                  isc_msgcat, ISC_MSGSET_SOCKET,
-                                  ISC_MSG_DOIORECV,
                                  "doio_recv: recvmsg(%d) %d bytes, err %d/%s",
                                   sock->fd, cc, recv_errno, strbuf);
                }
@@ -1616,8 +1591,6 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
                if (isc_sockaddr_getport(&dev->address) == 0) {
                        if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
                                socket_log(sock, &dev->address, IOEVENT,
-                                          isc_msgcat, ISC_MSGSET_SOCKET,
-                                          ISC_MSG_ZEROPORT,
                                           "dropping source port zero packet");
                        }
                        return (DOIO_SOFT);
@@ -1631,7 +1604,6 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
        }
 
        socket_log(sock, &dev->address, IOEVENT,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PKTRECV,
                   "packet received correctly");
 
        /*
@@ -1778,9 +1750,7 @@ doio_send(isc__socket_t *sock, isc_socketevent_t *dev) {
                inc_stats(sock->manager->stats,
                          sock->statsindex[STATID_SENDFAIL]);
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "doio_send: send() %s 0",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_RETURNED, "returned"));
+                                "doio_send: send() returned 0");
        }
 
        /*
@@ -1861,8 +1831,7 @@ destroy(isc__socket_t **sockp) {
        isc__socketmgr_t *manager = sock->manager;
        isc__socketthread_t *thread;
 
-       socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
-                  ISC_MSG_DESTROYING, "destroying");
+       socket_log(sock, NULL, CREATION, "destroying");
 
        INSIST(ISC_LIST_EMPTY(sock->connect_list));
        INSIST(ISC_LIST_EMPTY(sock->accept_list));
@@ -2258,12 +2227,10 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
 
        if (sock->fd >= (int)manager->maxsocks) {
                (void)close(sock->fd);
-               isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                              ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
-                              isc_msgcat, ISC_MSGSET_SOCKET,
-                              ISC_MSG_TOOMANYFDS,
-                              "socket: file descriptor exceeds limit (%d/%u)",
-                              sock->fd, manager->maxsocks);
+               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                             ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+                             "socket: file descriptor exceeds limit (%d/%u)",
+                             sock->fd, manager->maxsocks);
                inc_stats(manager->stats, sock->statsindex[STATID_OPENFAIL]);
                return (ISC_R_NORESOURCES);
        }
@@ -2273,11 +2240,9 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                case EMFILE:
                case ENFILE:
                        strerror_r(errno, strbuf, sizeof(strbuf));
-                       isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                                      ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
-                                      isc_msgcat, ISC_MSGSET_SOCKET,
-                                      ISC_MSG_TOOMANYFDS,
-                                      "%s: %s", err, strbuf);
+                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                                     ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+                                     "%s: %s", err, strbuf);
                        /* fallthrough */
                case ENOBUFS:
                        inc_stats(manager->stats,
@@ -2299,11 +2264,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                default:
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "%s() %s: %s", err,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
+                                        "%s() failed: %s", err,
                                         strbuf);
                        inc_stats(manager->stats,
                                  sock->statsindex[STATID_OPENFAIL]);
@@ -2329,10 +2290,8 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                       (void *)&on, sizeof(on)) < 0) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "setsockopt(%d, SO_BSDCOMPAT) %s: %s",
+                                "setsockopt(%d, SO_BSDCOMPAT) failed: %s",
                                 sock->fd,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
                                 strbuf);
                /* Press on... */
        }
@@ -2343,10 +2302,8 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                       (void *)&on, sizeof(on)) < 0) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "setsockopt(%d, SO_NOSIGPIPE) %s: %s",
+                                "setsockopt(%d, SO_NOSIGPIPE) failed: %s",
                                 sock->fd,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
                                 strbuf);
                /* Press on... */
        }
@@ -2370,12 +2327,8 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                    && errno != ENOPROTOOPT) {
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "setsockopt(%d, SO_TIMESTAMP) %s: %s",
+                                        "setsockopt(%d, SO_TIMESTAMP) failed: %s",
                                         sock->fd,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
                                         strbuf);
                        /* Press on... */
                }
@@ -2389,11 +2342,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_RECVPKTINFO) "
-                                        "%s: %s", sock->fd,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
+                                        "failed: %s", sock->fd,
                                         strbuf);
                }
 #else
@@ -2403,12 +2352,8 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                                   (void *)&on, sizeof(on)) < 0)) {
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "setsockopt(%d, IPV6_PKTINFO) %s: %s",
+                                        "setsockopt(%d, IPV6_PKTINFO) failed: %s",
                                         sock->fd,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
                                         strbuf);
                }
 #endif /* IPV6_RECVPKTINFO */
@@ -2469,12 +2414,8 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                               (void *)&rcvbuf, sizeof(rcvbuf)) == -1) {
                                strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                       "setsockopt(%d, SO_RCVBUF, %d) %s: %s",
+                                       "setsockopt(%d, SO_RCVBUF, %d) failed: %s",
                                        sock->fd, rcvbuf,
-                                       isc_msgcat_get(isc_msgcat,
-                                                      ISC_MSGSET_GENERAL,
-                                                      ISC_MSG_FAILED,
-                                                      "failed"),
                                        strbuf);
                        }
                }
@@ -2490,12 +2431,8 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                               (void *)&sndbuf, sizeof(sndbuf)) == -1) {
                                strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                       "setsockopt(%d, SO_SNDBUF, %d) %s: %s",
+                                       "setsockopt(%d, SO_SNDBUF, %d) failed: %s",
                                        sock->fd, sndbuf,
-                                       isc_msgcat_get(isc_msgcat,
-                                                      ISC_MSGSET_GENERAL,
-                                                      ISC_MSG_FAILED,
-                                                      "failed"),
                                        strbuf);
                        }
                }
@@ -2508,9 +2445,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, IPV6_RECVTCLASS) "
-                                "%s: %s", sock->fd,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "failed: %s", sock->fd,
                                 strbuf);
        }
 #endif
@@ -2521,9 +2456,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, IP_RECVTOS) "
-                                "%s: %s", sock->fd,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "failed: %s", sock->fd,
                                 strbuf);
        }
 #endif
@@ -2627,8 +2560,8 @@ socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
 #endif
        UNLOCK(&manager->lock);
 
-       socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
-                  ISC_MSG_CREATED, dup_socket != NULL ? "dupped" : "created");
+       socket_log(sock, NULL, CREATION,
+                  dup_socket != NULL ? "dupped" : "created");
 
        return (ISC_R_SUCCESS);
 }
@@ -2889,7 +2822,6 @@ internal_accept(isc__socket_t *sock) {
 
        LOCK(&sock->lock);
        socket_log(sock, NULL, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
                   "internal_accept called, locked socket");
 
        manager = sock->manager;
@@ -2946,12 +2878,10 @@ internal_accept(isc__socket_t *sock) {
                switch (errno) {
                case ENFILE:
                case EMFILE:
-                       isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                                      ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
-                                      isc_msgcat, ISC_MSGSET_SOCKET,
-                                      ISC_MSG_TOOMANYFDS,
-                                      "%s: too many open file descriptors",
-                                      err);
+                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                                     ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+                                     "%s: too many open file descriptors",
+                                     err);
                        goto soft_error;
 
                case ENOBUFS:
@@ -2975,11 +2905,7 @@ internal_accept(isc__socket_t *sock) {
                }
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "internal_accept: %s() %s: %s", err,
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
+                                "internal_accept: %s() failed: %s", err,
                                 strbuf);
                fd = -1;
                result = ISC_R_UNEXPECTED;
@@ -3005,13 +2931,10 @@ internal_accept(isc__socket_t *sock) {
                        (void)close(fd);
                        goto soft_error;
                } else if (fd >= (int)manager->maxsocks) {
-                       isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                                      ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
-                                      isc_msgcat, ISC_MSGSET_SOCKET,
-                                      ISC_MSG_TOOMANYFDS,
-                                      "accept: "
-                                      "file descriptor exceeds limit (%d/%u)",
-                                      fd, manager->maxsocks);
+                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                                     ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+                                     "accept: file descriptor exceeds limit (%d/%u)",
+                                     fd, manager->maxsocks);
                        (void)close(fd);
                        goto soft_error;
                }
@@ -3094,7 +3017,6 @@ internal_accept(isc__socket_t *sock) {
 #endif
 
                socket_log(sock, &NEWCONNSOCK(dev)->peer_address, CREATION,
-                          isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
                           "accepted connection, new socket %p",
                           dev->newsocket);
 
@@ -3140,7 +3062,6 @@ internal_recv(isc__socket_t *sock) {
        }
 
        socket_log(sock, NULL, IOEVENT,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
                   "internal_recv: event %p -> task %p", dev, dev->ev_sender);
 
        /*
@@ -3193,8 +3114,8 @@ internal_send(isc__socket_t *sock) {
        if (dev == NULL) {
                goto finish;
        }
-       socket_log(sock, NULL, EVENT, NULL, 0, 0,
-                  "internal_send:  event %p -> task %p",
+       socket_log(sock, NULL, EVENT,
+                  "internal_send: event %p -> task %p",
                   dev, dev->ev_sender);
 
        /*
@@ -3427,10 +3348,7 @@ process_ctlfd(isc__socketthread_t *thread) {
                select_readmsg(thread, &fd, &msg);
 
                thread_log(thread, IOEVENT,
-                          isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                                         ISC_MSG_WATCHERMSG,
-                                         "watcher got message %d "
-                                         "for socket %d"), msg, fd);
+                          "watcher got message %d for socket %d", msg, fd);
 
                /*
                 * Nothing to read?
@@ -3576,11 +3494,7 @@ netthread(void *uap) {
                        if (cc < 0 && !SOFT_ERROR(errno)) {
                                strerror_r(errno, strbuf, sizeof(strbuf));
                                FATAL_ERROR(__FILE__, __LINE__,
-                                           "%s %s: %s", fnname,
-                                           isc_msgcat_get(isc_msgcat,
-                                                          ISC_MSGSET_GENERAL,
-                                                          ISC_MSG_FAILED,
-                                                          "failed"), strbuf);
+                                           "%s failed: %s", fnname, strbuf);
                        }
 
 #if defined(USE_DEVPOLL) && defined(ISC_SOCKET_USE_POLLWATCH)
@@ -3626,9 +3540,7 @@ netthread(void *uap) {
 #endif
        }
 
-       thread_log(thread, TRACE, "%s",
-                  isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                 ISC_MSG_EXITING, "watcher exiting"));
+       thread_log(thread, TRACE, "watcher exiting");
        return ((isc_threadresult_t)0);
 }
 
@@ -3687,9 +3599,7 @@ setup_thread(isc__socketthread_t *thread) {
        if (pipe(thread->pipe_fds) != 0) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "pipe() %s: %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "pipe() failed: %s",
                                 strbuf);
                return (ISC_R_UNEXPECTED);
        }
@@ -3705,9 +3615,7 @@ setup_thread(isc__socketthread_t *thread) {
                result = isc__errno2result(errno);
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "kqueue %s: %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "kqueue failed: %s",
                                 strbuf);
                isc_mem_put(thread->manager->mctx, thread->events,
                            sizeof(struct kevent) * thread->nevents);
@@ -3740,9 +3648,7 @@ setup_thread(isc__socketthread_t *thread) {
                result = isc__errno2result(errno);
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "epoll_create %s: %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "epoll_create failed: %s",
                                                strbuf);
                return (result);
 
@@ -3775,9 +3681,7 @@ setup_thread(isc__socketthread_t *thread) {
                result = isc__errno2result(errno);
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "open(/dev/poll) %s: %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"),
+                                "open(/dev/poll) failed: %s",
                                 strbuf);
                isc_mem_put(thread->manager->mctx, thread->events,
                            sizeof(struct pollfd) * thread->nevents);
@@ -3837,9 +3741,7 @@ cleanup_thread(isc_mem_t *mctx, isc__socketthread_t *thread) {
        result = unwatch_fd(thread, thread->pipe_fds[0], SELECT_POKE_READ);
        if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "epoll_ctl(DEL) %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+                                "epoll_ctl(DEL) failed");
        }
 #ifdef USE_KQUEUE
        close(thread->kqueue_fd);
@@ -4000,10 +3902,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
         * Wait for all sockets to be destroyed.
         */
        while (!ISC_LIST_EMPTY(manager->socklist)) {
-               manager_log(manager, CREATION, "%s",
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                                          ISC_MSG_SOCKETSREMAIN,
-                                          "sockets exist"));
+               manager_log(manager, CREATION, "sockets exist");
                WAIT(&manager->shutdown_ok, &manager->lock);
        }
 
@@ -4026,11 +3925,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
                result = isc_thread_join(manager->threads[i].thread, NULL);
                if (result != ISC_R_SUCCESS) {
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "isc_thread_join() %s",
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"));
+                                        "isc_thread_join() failed");
                }
                cleanup_thread(manager->mctx, &manager->threads[i]);
        }
@@ -4107,7 +4002,7 @@ socket_recv(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
                                    SELECT_POKE_READ);
                }
 
-               socket_log(sock, NULL, EVENT, NULL, 0, 0,
+               socket_log(sock, NULL, EVENT,
                           "socket_recv: event %p -> task %p",
                           dev, ntask);
 
@@ -4208,10 +4103,9 @@ socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
 
                if (!isc_sockaddr_issitelocal(&dev->address) &&
                    !isc_sockaddr_islinklocal(&dev->address)) {
-                       socket_log(sock, NULL, TRACE, isc_msgcat,
-                                  ISC_MSGSET_SOCKET, ISC_MSG_PKTINFOPROVIDED,
-                                  "pktinfo structure provided, ifindex %u "
-                                  "(set to 0)", pktinfo->ipi6_ifindex);
+                       socket_log(sock, NULL, TRACE,
+                                  "pktinfo structure provided, ifindex %u (set to 0)",
+                                  pktinfo->ipi6_ifindex);
 
                        /*
                         * Set the pktinfo index to 0 here, to let the
@@ -4261,7 +4155,7 @@ socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
                                            sock->fd,
                                            SELECT_POKE_WRITE);
                        }
-                       socket_log(sock, NULL, EVENT, NULL, 0, 0,
+                       socket_log(sock, NULL, EVENT,
                                   "socket_send: event %p -> task %p",
                                   dev, ntask);
 
@@ -4571,17 +4465,13 @@ isc_socket_bind(isc_socket_t *sock0, const isc_sockaddr_t *sockaddr,
                               (void *)&on, sizeof(on)) < 0)
                {
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "setsockopt(%d) %s", sock->fd,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+                                        "setsockopt(%d) failed", sock->fd);
                }
                if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEPORT,
                               (void *)&on, sizeof(on)) < 0)
                {
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "setsockopt(%d) %s", sock->fd,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+                                        "setsockopt(%d) failed", sock->fd);
                }
                /* Press on... */
        }
@@ -4610,8 +4500,7 @@ isc_socket_bind(isc_socket_t *sock0, const isc_sockaddr_t *sockaddr,
                }
        }
 
-       socket_log(sock, sockaddr, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "bound");
+       socket_log(sock, sockaddr, TRACE, "bound");
        sock->bound = 1;
 
        UNLOCK(&sock->lock);
@@ -4644,9 +4533,8 @@ isc_socket_filter(isc_socket_t *sock0, const char *filter) {
        if (setsockopt(sock->fd, SOL_SOCKET, SO_ACCEPTFILTER,
                         &afa, sizeof(afa)) == -1) {
                strerror_r(errno, strbuf, sizeof(strbuf));
-               socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
-                          ISC_MSG_FILTER, "setsockopt(SO_ACCEPTFILTER): %s",
-                          strbuf);
+               socket_log(sock, NULL, CREATION,
+                          "setsockopt(SO_ACCEPTFILTER): %s", strbuf);
                return (ISC_R_FAILURE);
        }
        return (ISC_R_SUCCESS);
@@ -5311,13 +5199,8 @@ isc_socket_ipv6only(isc_socket_t *sock0, bool yes) {
                        char strbuf[ISC_STRERRORSIZE];
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "setsockopt(%d, IPV6_V6ONLY) "
-                                        "%s: %s", sock->fd,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
-                                        strbuf);
+                                        "setsockopt(%d, IPV6_V6ONLY) failed: %s",
+                                        sock->fd, strbuf);
                }
        }
 #endif
@@ -5338,12 +5221,8 @@ setdscp(isc__socket_t *sock, isc_dscp_t dscp) {
                        char strbuf[ISC_STRERRORSIZE];
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "setsockopt(%d, IP_TOS, %.02x) "
-                                        "%s: %s", sock->fd, value >> 2,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
+                                        "setsockopt(%d, IP_TOS, %.02x) failed: %s",
+                                        sock->fd, value >> 2,
                                         strbuf);
                }
        }
@@ -5355,13 +5234,8 @@ setdscp(isc__socket_t *sock, isc_dscp_t dscp) {
                        char strbuf[ISC_STRERRORSIZE];
                        strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "setsockopt(%d, IPV6_TCLASS, %.02x) "
-                                        "%s: %s", sock->fd, dscp >> 2,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
-                                        strbuf);
+                                        "setsockopt(%d, IPV6_TCLASS, %.02x) failed: %s",
+                                        sock->fd, dscp >> 2, strbuf);
                }
        }
 #endif
index 156c8ff7f8c0501912c9b3bdda6014fd27be72d6..7ab08007997b73279b2c58ff8afcaa2578127a7d 100644 (file)
@@ -24,7 +24,6 @@
 #include <isc/app.h>
 #include <isc/condition.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/mutex.h>
 #include <isc/event.h>
 #include <isc/platform.h>
index 435038f367ad697f2be63944b775deaa4103faac..5f78edae652da53ab4cef53e14221991d710d372 100644 (file)
@@ -312,7 +312,6 @@ isc_lfsr_generate
 isc_lfsr_generate32
 isc_lfsr_init
 isc_lfsr_skip
-isc_lib_initmsgcat
 isc_lib_register
 isc_log_categorybyname
 isc_log_closefilelogs
@@ -322,10 +321,6 @@ isc_log_destroy
 isc_log_getdebuglevel
 isc_log_getduplicateinterval
 isc_log_gettag
-isc_log_ivwrite
-isc_log_ivwrite1
-isc_log_iwrite
-isc_log_iwrite1
 isc_log_modulebyname
 isc_log_opensyslog
 isc_log_registercategories
@@ -394,9 +389,6 @@ isc_mempool_setfillcount
 isc_mempool_setfreemax
 isc_mempool_setmaxalloc
 isc_mempool_setname
-isc_msgcat_close
-isc_msgcat_get
-isc_msgcat_open
 isc_mutexblock_destroy
 isc_mutexblock_init
 isc_net_disableipv4
@@ -658,7 +650,6 @@ pk11_get_lib_name
 pk11_get_load_error_message
 pk11_get_session
 pk11_initialize
-pk11_initmsgcat
 pk11_mem_get
 pk11_mem_put
 pk11_numbits
@@ -723,9 +714,7 @@ 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
index 48b317c8dcee35b4f51658f9b9ecca547c0e1267..b58ff4f1a17a3dda20eb12326d9f8ff239ac1c70 100644 (file)
     <ClInclude Include="..\include\isc\meminfo.h">
       <Filter>Win32 Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\include\isc\msgcat.h">
-      <Filter>Library Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\include\isc\msgs.h">
-      <Filter>Library Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\include\isc\mutexblock.h">
       <Filter>Library Header Files</Filter>
     </ClInclude>
     <ClCompile Include="..\mem.c">
       <Filter>Library Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\nls\msgcat.c">
-      <Filter>Library Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\mutexblock.c">
       <Filter>Library Source Files</Filter>
     </ClCompile>
index 3ee764556215ca4cf856429f21139c344f727678..a49f76baffb0dccf7a7ce3b0e42a561fd76dbe43 100644 (file)
@@ -330,8 +330,6 @@ copy InstallFiles ..\Build\Release\
     <ClInclude Include="..\include\isc\md.h" />
     <ClInclude Include="..\include\isc\mem.h" />
     <ClInclude Include="..\include\isc\meminfo.h" />
-    <ClInclude Include="..\include\isc\msgcat.h" />
-    <ClInclude Include="..\include\isc\msgs.h" />
     <ClInclude Include="..\include\isc\mutexblock.h" />
     <ClInclude Include="..\include\isc\netaddr.h" />
     <ClInclude Include="..\include\isc\netscope.h" />
@@ -444,7 +442,6 @@ copy InstallFiles ..\Build\Release\
     <ClCompile Include="..\netaddr.c" />
     <ClCompile Include="..\netscope.c" />
     <ClCompile Include="..\nonce.c" />
-    <ClCompile Include="..\nls\msgcat.c" />
     <ClCompile Include="..\openssl_shim.c" />
     <ClCompile Include="..\parseint.c" />
     <ClCompile Include="..\pool.c" />
index 3ae2e4c3e6fefba7d23fc8683d155bac8a903b95..120eb149e60a1c4f158c70d5e61c88ee61997eb8 100644 (file)
@@ -16,7 +16,6 @@
 #include <unistd.h>
 
 #include <isc/log.h>
-#include <isc/msgs.h>
 #include <isc/net.h>
 #include <isc/once.h>
 #include <isc/strerr.h>
@@ -67,11 +66,7 @@ try_proto(int domain) {
                default:
                        strerror_r(errval, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "socket() %s: %s",
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
+                                        "socket() failed: %s",
                                         strbuf);
                        return (ISC_R_UNEXPECTED);
                }
@@ -135,11 +130,7 @@ try_ipv6only(void) {
        if (s == INVALID_SOCKET) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "socket() %s: %s",
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
+                                "socket() failed: %s",
                                 strbuf);
                ipv6only_result = ISC_R_UNEXPECTED;
                return;
@@ -159,11 +150,7 @@ try_ipv6only(void) {
        if (s == INVALID_SOCKET) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "socket() %s: %s",
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
+                                "socket() failed: %s",
                                 strbuf);
                ipv6only_result = ISC_R_UNEXPECTED;
                return;
@@ -215,11 +202,7 @@ try_ipv6pktinfo(void) {
        if (s == INVALID_SOCKET) {
                strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "socket() %s: %s",
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
+                                "socket() failed: %s",
                                 strbuf);
                ipv6pktinfo_result = ISC_R_UNEXPECTED;
                return;
index 9e5969bbfaac5867bbe8dbca831b4b568b83c867..2dd9579827825d8eaec14f2c149007ab2f5b00f1 100644 (file)
@@ -51,7 +51,6 @@
 #include <isc/list.h>
 #include <isc/log.h>
 #include <isc/mem.h>
-#include <isc/msgs.h>
 #include <isc/mutex.h>
 #include <isc/net.h>
 #include <isc/once.h>
@@ -426,7 +425,6 @@ sock_dump(isc_socket_t *sock) {
 static void
 socket_log(int lineno, isc_socket_t *sock, const isc_sockaddr_t *address,
           isc_logcategory_t *category, isc_logmodule_t *module, int level,
-          isc_msgcat_t *msgcat, int msgset, int message,
           const char *fmt, ...) ISC_FORMAT_PRINTF(10, 11);
 
 /*  This function will add an entry to the I/O completion port
@@ -445,10 +443,8 @@ signal_iocompletionport_exit(isc_socketmgr_t *manager) {
                        errval = GetLastError();
                        strerror_r(errval, strbuf, sizeof(strbuf));
                        FATAL_ERROR(__FILE__, __LINE__,
-                               isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                               ISC_MSG_FAILED,
-                               "Can't request service thread to exit: %s"),
-                               strbuf);
+                                   "Can't request service thread to exit: %s",
+                                   strbuf);
                }
        }
 }
@@ -475,9 +471,7 @@ iocompletionport_createthreads(int total_threads, isc_socketmgr_t *manager) {
                        errval = GetLastError();
                        strerror_r(errval, strbuf, sizeof(strbuf));
                        FATAL_ERROR(__FILE__, __LINE__,
-                               isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                               ISC_MSG_FAILED,
-                               "Can't create IOCP thread: %s"),
+                               "Can't create IOCP thread: %s",
                                strbuf);
                }
        }
@@ -501,10 +495,7 @@ iocompletionport_init(isc_socketmgr_t *manager) {
                errval = GetLastError();
                strerror_r(errval, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                                          ISC_MSG_FAILED,
-                                          "HeapCreate() failed during "
-                                          "initialization: %s"),
+                           "HeapCreate() failed during initialization: %s",
                            strbuf);
        }
 
@@ -516,10 +507,7 @@ iocompletionport_init(isc_socketmgr_t *manager) {
                errval = GetLastError();
                strerror_r(errval, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
-                               isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                               ISC_MSG_FAILED,
-                               "CreateIoCompletionPort() failed "
-                               "during initialization: %s"),
+                               "CreateIoCompletionPort() failed during initialization: %s",
                                strbuf);
        }
 
@@ -546,25 +534,19 @@ iocompletionport_update(isc_socket_t *sock) {
        if (hiocp == NULL) {
                DWORD errval = GetLastError();
                strerror_r(errval, strbuf, sizeof(strbuf));
-               isc_log_iwrite(isc_lctx,
-                               ISC_LOGCATEGORY_GENERAL,
-                               ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
-                               isc_msgcat, ISC_MSGSET_SOCKET,
-                               ISC_MSG_TOOMANYHANDLES,
-                               "iocompletionport_update: failed to open"
-                               " io completion port: %s",
-                               strbuf);
+               isc_log_write(isc_lctx,
+                             ISC_LOGCATEGORY_GENERAL,
+                             ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+                             "iocompletionport_update: failed to open io completion port: %s",
+                             strbuf);
 
                /* XXXMLG temporary hack to make failures detected.
                 * This function should return errors to the caller, not
                 * exit here.
                 */
                FATAL_ERROR(__FILE__, __LINE__,
-                               isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                               ISC_MSG_FAILED,
-                               "CreateIoCompletionPort() failed "
-                               "during initialization: %s"),
-                               strbuf);
+                           "CreateIoCompletionPort() failed during initialization: %s",
+                           strbuf);
        }
 
        InterlockedIncrement(&sock->manager->iocp_total);
@@ -612,9 +594,7 @@ initialise(void) {
        if (err != 0) {
                char strbuf[ISC_STRERRORSIZE];
                strerror_r(err, strbuf, sizeof(strbuf));
-               FATAL_ERROR(__FILE__, __LINE__, "WSAStartup() %s: %s",
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                          ISC_MSG_FAILED, "failed"),
+               FATAL_ERROR(__FILE__, __LINE__, "WSAStartup() failed: %s",
                            strbuf);
        }
        /*
@@ -804,8 +784,6 @@ queue_receive_request(isc_socket_t *sock) {
        }
 
        socket_log(__LINE__, sock, NULL, IOEVENT,
-                  isc_msgcat, ISC_MSGSET_SOCKET,
-                  ISC_MSG_DOIORECV,
                   "queue_io_request: fd %d result %d error %d",
                   sock->fd, Result, Error);
 
@@ -836,7 +814,6 @@ manager_log(isc_socketmgr_t *sockmgr, isc_logcategory_t *category,
 static void
 socket_log(int lineno, isc_socket_t *sock, const isc_sockaddr_t *address,
           isc_logcategory_t *category, isc_logmodule_t *module, int level,
-          isc_msgcat_t *msgcat, int msgset, int message,
           const char *fmt, ...)
 {
        char msgbuf[2048];
@@ -852,15 +829,13 @@ socket_log(int lineno, isc_socket_t *sock, const isc_sockaddr_t *address,
        va_end(ap);
 
        if (address == NULL) {
-               isc_log_iwrite(isc_lctx, category, module, level,
-                              msgcat, msgset, message,
-                              "socket %p line %d: %s", sock, lineno, msgbuf);
+               isc_log_write(isc_lctx, category, module, level,
+                             "socket %p line %d: %s", sock, lineno, msgbuf);
        } else {
                isc_sockaddr_format(address, peerbuf, sizeof(peerbuf));
-               isc_log_iwrite(isc_lctx, category, module, level,
-                              msgcat, msgset, message,
-                                  "socket %p line %d %s: %s", sock, lineno,
-                                  peerbuf, msgbuf);
+               isc_log_write(isc_lctx, category, module, level,
+                             "socket %p line %d %s: %s", sock, lineno,
+                             peerbuf, msgbuf);
        }
 
 }
@@ -916,9 +891,7 @@ connection_reset_fix(SOCKET fd) {
                return (ISC_R_SUCCESS);
        else {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "WSAIoctl(SIO_UDP_CONNRESET, oldBehaviour) %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+                                "WSAIoctl(SIO_UDP_CONNRESET, oldBehaviour) failed");
                return (ISC_R_UNEXPECTED);
        }
 }
@@ -956,8 +929,7 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
        RUNTIME_CHECK(lpo->buf != NULL);
 
        socket_log(__LINE__, sock, NULL, TRACE,
-          isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
-          "alloc_buffer %p %d", lpo->buf, write_count);
+                  "alloc_buffer %p %d", lpo->buf, write_count);
 
        memmove(lpo->buf,(dev->region.base + dev->n), write_count);
        lpo->buflen = (unsigned int)write_count;
@@ -1155,8 +1127,6 @@ fill_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
                if (isc_sockaddr_getport(&dev->address) == 0) {
                        if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
                                socket_log(__LINE__, sock, &dev->address, IOEVENT,
-                                          isc_msgcat, ISC_MSGSET_SOCKET,
-                                          ISC_MSG_ZEROPORT,
                                           "dropping source port zero packet");
                        }
                        sock->recvbuf.remaining = 0;
@@ -1304,10 +1274,7 @@ startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
                if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
                        strerror_r(*send_errno, strbuf, sizeof(strbuf));
                        socket_log(__LINE__, sock, NULL, IOEVENT,
-                                  isc_msgcat, ISC_MSGSET_SOCKET,
-                                  ISC_MSG_INTERNALSEND,
-                                  "startio_send: internal_sendmsg(%d) %d "
-                                  "bytes, err %d/%s",
+                                  "startio_send: internal_sendmsg(%d) %d bytes, err %d/%s",
                                   sock->fd, *nbytes, *send_errno, strbuf);
                }
                status = DOIO_HARD;
@@ -1387,7 +1354,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
         */
        isc_mutex_init(&sock->lock);
 
-       socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+       socket_log(__LINE__, sock, NULL, EVENT,
                   "allocated");
 
        sock->magic = SOCKET_MAGIC;
@@ -1441,9 +1408,8 @@ consistent(isc_socket_t *sock) {
        }
 
        if (crash) {
-               socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
-                          ISC_MSG_DESTROYING, "SOCKET INCONSISTENT: %s",
-                          crash_reason);
+               socket_log(__LINE__, sock, NULL, CREATION,
+                          "SOCKET INCONSISTENT: %s", crash_reason);
                sock_dump(sock);
                INSIST(crash == false);
        }
@@ -1501,8 +1467,7 @@ free_socket(isc_socket_t **sockp, int lineno) {
         * Seems we can free the socket after all.
         */
        manager = sock->manager;
-       socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat,
-                  ISC_MSGSET_SOCKET, ISC_MSG_DESTROYING,
+       socket_log(__LINE__, sock, NULL, CREATION,
                   "freeing socket line %d fd %d lock %p semaphore %p",
                   lineno, sock->fd, &sock->lock, sock->lock.LockSemaphore);
 
@@ -1565,7 +1530,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
                        result = connection_reset_fix(sock->fd);
                        if (result != ISC_R_SUCCESS) {
                                socket_log(__LINE__, sock,
-                                       NULL, EVENT, NULL, 0, 0,
+                                       NULL, EVENT,
                                        "closed %d %d %d "
                                        "con_reset_fix_failed",
                                        sock->pending_recv,
@@ -1610,11 +1575,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
                default:
                        strerror_r(socket_errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "socket() %s: %s",
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
+                                        "socket() failed: %s",
                                         strbuf);
                        return (ISC_R_UNEXPECTED);
                }
@@ -1622,7 +1583,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
 
        result = make_nonblock(sock->fd);
        if (result != ISC_R_SUCCESS) {
-               socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+               socket_log(__LINE__, sock, NULL, EVENT,
                        "closed %d %d %d make_nonblock_failed",
                        sock->pending_recv, sock->pending_send,
                        sock->references);
@@ -1648,13 +1609,8 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
                                   (char *)&on, sizeof(on)) < 0)) {
                        strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                        "setsockopt(%d, IPV6_RECVPKTINFO) "
-                                        "%s: %s", sock->fd,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
-                                        strbuf);
+                                        "setsockopt(%d, IPV6_RECVPKTINFO) failed: %s",
+                                        sock->fd, strbuf);
                }
 #else
                /* 2292 */
@@ -1664,12 +1620,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
                        strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_PKTINFO) %s: %s",
-                                        sock->fd,
-                                        isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_GENERAL,
-                                                       ISC_MSG_FAILED,
-                                                       "failed"),
-                                        strbuf);
+                                        sock->fd, strbuf);
                }
 #endif /* IPV6_RECVPKTINFO */
 #endif /* defined(USE_CMSG) */
@@ -1726,8 +1677,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
        InterlockedIncrement(&manager->totalSockets);
        UNLOCK(&manager->lock);
 
-       socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat,
-                  ISC_MSGSET_SOCKET, ISC_MSG_CREATED,
+       socket_log(__LINE__, sock, NULL, CREATION,
                   "created %u type %u", sock->fd, type);
 
        return (ISC_R_SUCCESS);
@@ -1789,7 +1739,7 @@ isc_socket_detach(isc_socket_t **socketp) {
        REQUIRE(sock->references > 0);
        sock->references--;
 
-       socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+       socket_log(__LINE__, sock, NULL, EVENT,
                "detach_socket %d %d %d",
                sock->pending_recv, sock->pending_send,
                sock->references);
@@ -1928,7 +1878,6 @@ internal_accept(isc_socket_t *sock, IoCompletionInfo *lpo, int accept_errno) {
        CONSISTENT(sock);
 
        socket_log(__LINE__, sock, NULL, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
                   "internal_accept called");
 
        INSIST(sock->listener);
@@ -1967,7 +1916,6 @@ internal_accept(isc_socket_t *sock, IoCompletionInfo *lpo, int accept_errno) {
        nsock->pf = adev->address.type.sa.sa_family;
 
        socket_log(__LINE__, nsock, &nsock->address, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
                   "internal_accept parent %p", sock);
 
        result = make_nonblock(adev->newsocket->fd);
@@ -1994,7 +1942,6 @@ internal_accept(isc_socket_t *sock, IoCompletionInfo *lpo, int accept_errno) {
        UNLOCK(&nsock->manager->lock);
 
        socket_log(__LINE__, sock, &nsock->address, CREATION,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
                   "accepted_connection new_socket %p fd %d",
                   nsock, nsock->fd);
 
@@ -2091,7 +2038,6 @@ internal_connect(isc_socket_t *sock, IoCompletionInfo *lpo, int connect_errno) {
                result = ISC_R_SUCCESS;
                sock->connected = 1;
                socket_log(__LINE__, sock, &sock->address, IOEVENT,
-                          isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
                           "internal_connect: success");
        }
 
@@ -2148,7 +2094,6 @@ internal_recv(isc_socket_t *sock, int nbytes)
        CONSISTENT(sock);
 
        socket_log(__LINE__, sock, NULL, IOEVENT,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
                   "internal_recv: %d bytes received", nbytes);
 
        /*
@@ -2204,13 +2149,11 @@ internal_send(isc_socket_t *sock, isc_socketevent_t *dev,
        CONSISTENT(sock);
 
        socket_log(__LINE__, sock, NULL, IOEVENT,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALSEND,
                   "internal_send: task got socket event %p", dev);
 
        if (lpo->buf != NULL) {
                socket_log(__LINE__, sock, NULL, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
-                  "free_buffer %p", lpo->buf);
+                          "free_buffer %p", lpo->buf);
 
                HeapFree(hHeapHandle, 0, lpo->buf);
                lpo->buf = NULL;
@@ -2369,10 +2312,8 @@ SocketIoThread(LPVOID ThreadContext) {
                errval = GetLastError();
                strerror_r(errval, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
-                               isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                               ISC_MSG_FAILED,
-                               "Can't set thread priority: %s"),
-                               strbuf);
+                           "Can't set thread priority: %s",
+                           strbuf);
        }
 
        /*
@@ -2435,7 +2376,7 @@ SocketIoThread(LPVOID ThreadContext) {
                                sock->pending_send--;
                                if (senddone_is_active(sock, lpo->dev)) {
                                        lpo->dev->result = isc_result;
-                                       socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+                                       socket_log(__LINE__, sock, NULL, EVENT,
                                                "canceled_send");
                                        send_senddone_event(sock, &lpo->dev);
                                }
@@ -2445,8 +2386,9 @@ SocketIoThread(LPVOID ThreadContext) {
                                INSIST(sock->pending_iocp > 0);
                                INSIST(sock->pending_accept > 0);
 
-                               socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
-                                       "Accept: errstatus=%d isc_result=%d", errstatus, isc_result);
+                               socket_log(__LINE__, sock, NULL, EVENT,
+                                       "Accept: errstatus=%d isc_result=%d",
+                                          errstatus, isc_result);
 
                                if (acceptdone_is_active(sock, lpo->adev)) {
                                        if (restart_accept(sock, lpo) == ISC_R_SUCCESS) {
@@ -2455,7 +2397,7 @@ SocketIoThread(LPVOID ThreadContext) {
                                        } else {
                                                errstatus = GetLastError();
                                                isc_result = isc__errno2result(errstatus);
-                                               socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+                                               socket_log(__LINE__, sock, NULL, EVENT,
                                                        "restart_accept() failed: errstatus=%d isc_result=%d",
                                                        errstatus, isc_result);
                                        }
@@ -2469,7 +2411,7 @@ SocketIoThread(LPVOID ThreadContext) {
                                        lpo->adev->newsocket->references--;
                                        free_socket(&lpo->adev->newsocket, __LINE__);
                                        lpo->adev->result = isc_result;
-                                       socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+                                       socket_log(__LINE__, sock, NULL, EVENT,
                                                "canceled_accept");
                                        send_acceptdone_event(sock, &lpo->adev);
                                }
@@ -2481,7 +2423,7 @@ SocketIoThread(LPVOID ThreadContext) {
                                INSIST(sock->pending_connect == 1);
                                sock->pending_connect = 0;
                                if (connectdone_is_active(sock, lpo->cdev)) {
-                                       socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+                                       socket_log(__LINE__, sock, NULL, EVENT,
                                                "canceled_connect");
                                        send_connectdone_abort(sock, isc_result);
                                }
@@ -2518,9 +2460,7 @@ SocketIoThread(LPVOID ThreadContext) {
        /*
         * Exit Completion Port Thread
         */
-       manager_log(manager, TRACE,
-                   isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                  ISC_MSG_EXITING, "SocketIoThread exiting"));
+       manager_log(manager, TRACE, "SocketIoThread exiting");
        return ((isc_threadresult_t)0);
 }
 
@@ -2612,10 +2552,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
         * Wait for all sockets to be destroyed.
         */
        while (!ISC_LIST_EMPTY(manager->socklist)) {
-               manager_log(manager, CREATION,
-                           isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
-                                          ISC_MSG_SOCKETSREMAIN,
-                                          "sockets exist"));
+               manager_log(manager, CREATION, "sockets exist");
                WAIT(&manager->shutdown_ok, &manager->lock);
        }
 
@@ -2635,9 +2572,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
                if (isc_thread_join((isc_thread_t) manager->hIOCPThreads[i],
                        NULL) != ISC_R_SUCCESS)
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "isc_thread_join() for Completion Port %s",
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+                                        "isc_thread_join() for Completion Port failed");
        }
        /*
         * Clean up.
@@ -2673,7 +2608,7 @@ queue_receive_event(isc_socket_t *sock, isc_task_t *task, isc_socketevent_t *dev
        INSIST(!ISC_LINK_LINKED(dev, ev_link));
        ISC_LIST_ENQUEUE(sock->recv_list, dev, ev_link);
 
-       socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+       socket_log(__LINE__, sock, NULL, EVENT,
                   "queue_receive_event: event %p -> task %p",
                   dev, ntask);
 }
@@ -2817,8 +2752,7 @@ socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
 
        set_dev_address(address, sock, dev);
        if (pktinfo != NULL) {
-               socket_log(__LINE__, sock, NULL, TRACE, isc_msgcat, ISC_MSGSET_SOCKET,
-                          ISC_MSG_PKTINFOPROVIDED,
+               socket_log(__LINE__, sock, NULL, TRACE,
                           "pktinfo structure provided, ifindex %u (set to 0)",
                           pktinfo->ipi6_ifindex);
 
@@ -2850,7 +2784,7 @@ socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
                        INSIST(!ISC_LINK_LINKED(dev, ev_link));
                        ISC_LIST_ENQUEUE(sock->send_list, dev, ev_link);
 
-                       socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+                       socket_log(__LINE__, sock, NULL, EVENT,
                                   "socket_send: event %p -> task %p",
                                   dev, ntask);
 
@@ -2986,11 +2920,10 @@ isc_socket_bind(isc_socket_t *sock, const isc_sockaddr_t *sockaddr,
        if ((options & ISC_SOCKET_REUSEADDRESS) != 0 &&
            isc_sockaddr_getport(sockaddr) != (in_port_t)0 &&
            setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
-                      sizeof(on)) < 0) {
+                      sizeof(on)) < 0)
+       {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "setsockopt(%d) %s", sock->fd,
-                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED, "failed"));
+                                "setsockopt(%d) failed", sock->fd);
                /* Press on... */
        }
        if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) {
@@ -3013,8 +2946,7 @@ isc_socket_bind(isc_socket_t *sock, const isc_sockaddr_t *sockaddr,
                }
        }
 
-       socket_log(__LINE__, sock, sockaddr, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "bound");
+       socket_log(__LINE__, sock, sockaddr, TRACE, "bound");
        sock->bound = 1;
 
        UNLOCK(&sock->lock);
@@ -3087,8 +3019,7 @@ isc_socket_listen(isc_socket_t *sock, unsigned int backlog) {
        }
 #endif
 
-       socket_log(__LINE__, sock, NULL, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "listening");
+       socket_log(__LINE__, sock, NULL, TRACE, "listening");
        sock->listener = 1;
        _set_state(sock, SOCK_LISTEN);
 
@@ -3203,7 +3134,6 @@ isc_socket_accept(isc_socket_t *sock,
        iocompletionport_update(nsock);
 
        socket_log(__LINE__, sock, NULL, TRACE,
-                  isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND,
                   "accepting for nsock %p fd %d", nsock, nsock->fd);
 
        /*
index 01d01abd3c6fdef1d3d7f0d8b4854d7406bee13a..81b362534dae94ebad33c6d190b3514262098ccd 100644 (file)
@@ -35,12 +35,10 @@ SUBDIRS =   include
 
 # Alphabetically
 OBJS =         alist.@O@ base64.@O@ cc.@O@ ccmsg.@O@ \
-               lib.@O@ \
                result.@O@ sexpr.@O@ symtab.@O@ version.@O@
 
 # Alphabetically
 SRCS =         alist.c base64.c cc.c ccmsg.c \
-               lib.c \
                result.c sexpr.c symtab.c version.c
 
 
index 23903db87aee56dd8741c3505419fd979cbaa4fe..d15e7ddb5286dbc27e5e793ffd13e89a0423f21d 100644 (file)
@@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@
 # machine generated.  The latter are handled specially in the
 # install target below.
 #
-HEADERS =      alist.h base64.h cc.h ccmsg.h events.h lib.h result.h \
+HEADERS =      alist.h base64.h cc.h ccmsg.h events.h result.h \
                sexpr.h symtab.h symtype.h types.h util.h version.h
 SUBDIRS =
 TARGETS =
diff --git a/lib/isccc/include/isccc/lib.h b/lib/isccc/include/isccc/lib.h
deleted file mode 100644 (file)
index 408dee4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * 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 http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * Portions Copyright (C) 2001 Nominum, Inc.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#ifndef ISCCC_LIB_H
-#define ISCCC_LIB_H 1
-
-/*! \file isccc/lib.h */
-
-#include <isc/types.h>
-#include <isc/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-LIBISCCC_EXTERNAL_DATA extern isc_msgcat_t *isccc_msgcat;
-
-void
-isccc_lib_initmsgcat(void);
-/*%
- * Initialize the ISCCC library's message catalog, isccc_msgcat, if it
- * has not already been initialized.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISCCC_LIB_H */
diff --git a/lib/isccc/lib.c b/lib/isccc/lib.c
deleted file mode 100644 (file)
index 1222bbe..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * 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 http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * Portions Copyright (C) 2001 Nominum, Inc.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/once.h>
-#include <isc/msgcat.h>
-#include <isc/util.h>
-
-#include <isccc/lib.h>
-
-/***
- *** Globals
- ***/
-
-LIBISCCC_EXTERNAL_DATA isc_msgcat_t *          isccc_msgcat = NULL;
-
-
-/***
- *** Private
- ***/
-
-static isc_once_t              msgcat_once = ISC_ONCE_INIT;
-
-
-/***
- *** Functions
- ***/
-
-static void
-open_msgcat(void) {
-       isc_msgcat_open("libisccc.cat", &isccc_msgcat);
-}
-
-void
-isccc_lib_initmsgcat(void) {
-
-       /*
-        * Initialize the DNS library's message catalog, isccc_msgcat, if it
-        * has not already been initialized.
-        */
-
-       RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
-}
index 75f5ade7f69d7e3d8eae6c6095b6960783309834..3e7640b35b59f20ca2268053569dd92621d49cb3 100644 (file)
@@ -32,7 +32,6 @@
 #include <isc/util.h>
 
 #include <isccc/result.h>
-#include <isccc/lib.h>
 
 static const char *text[ISCCC_R_NRESULTS] = {
        "unknown version",                      /* 1 */
@@ -61,15 +60,13 @@ initialize_action(void) {
        isc_result_t result;
 
        result = isc_result_register(ISC_RESULTCLASS_ISCCC, ISCCC_R_NRESULTS,
-                                    text, isccc_msgcat,
-                                    ISCCC_RESULT_RESULTSET);
+                                    text, ISCCC_RESULT_RESULTSET);
        if (result != ISC_R_SUCCESS)
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_result_register() failed: %u", result);
 
        result = isc_result_registerids(ISC_RESULTCLASS_ISCCC, ISCCC_R_NRESULTS,
-                                       ids, isccc_msgcat,
-                                       ISCCC_RESULT_RESULTSET);
+                                       ids, ISCCC_RESULT_RESULTSET);
        if (result != ISC_R_SUCCESS)
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_result_registerids() failed: %u", result);
@@ -77,7 +74,6 @@ initialize_action(void) {
 
 static void
 initialize(void) {
-       isccc_lib_initmsgcat();
        RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
 }
 
index 5c81522869de704388553f45dd51293f836001ca..1f29d0121d17dade937c0ec7f184108c16e8ce96 100644 (file)
@@ -24,7 +24,6 @@
 #include <isc/result.h>
 #include <isc/util.h>
 
-#include <isccc/lib.h>
 #include <isccc/result.h>
 
 /*
index 7a06b9a4470bb8dc9cd561d1f7ef2e1837974e41..5cb5662b0c68a3a6df9a2ad45731534fb221a6b1 100644 (file)
@@ -37,7 +37,6 @@ isccc_ccmsg_setmaxsize
 isccc_ccmsg_readmessage
 isccc_ccmsg_cancelread
 isccc_ccmsg_invalidate
-isccc_lib_initmsgcat
 isccc_result_totext
 isccc_result_register
 isccc_sexpr_cons
@@ -64,7 +63,3 @@ isccc_symtab_lookup
 isccc_symtab_define
 isccc_symtab_undefine
 isccc_symtab_foreach
-
-; Exported Data
-
-;isccc_msgcat
index b17d13c0785920b57e753e07a80127ce8199a314..1d1ff1037254ebff4bfc682e7df46b104ba015f8 100644 (file)
@@ -36,9 +36,6 @@
     <ClCompile Include="..\ccmsg.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\lib.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\result.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -65,9 +62,6 @@
     <ClInclude Include="..\include\isccc\events.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\include\isccc\lib.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\include\isccc\result.h">
       <Filter>Header Files</Filter>
     </ClInclude>
@@ -90,4 +84,4 @@
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
index f4c0e55daef1457b7cbe1c5b735a85f6f64eebb1..71fd918b983460c81b600298749c62bb8b4c18f0 100644 (file)
     <ClCompile Include="..\base64.c" />
     <ClCompile Include="..\cc.c" />
     <ClCompile Include="..\ccmsg.c" />
-    <ClCompile Include="..\lib.c" />
     <ClCompile Include="..\result.c" />
     <ClCompile Include="..\sexpr.c" />
     <ClCompile Include="..\symtab.c" />
     <ClInclude Include="..\include\isccc\cc.h" />
     <ClInclude Include="..\include\isccc\ccmsg.h" />
     <ClInclude Include="..\include\isccc\events.h" />
-    <ClInclude Include="..\include\isccc\lib.h" />
     <ClInclude Include="..\include\isccc\result.h" />
     <ClInclude Include="..\include\isccc\sexpr.h" />
     <ClInclude Include="..\include\isccc\symtab.h" />
index 7671117d2353f31276b08c03cbfd462f40fed4de..6f0d91634aefd3075f43d40fe3c30015694438ed 100644 (file)
@@ -9,8 +9,7 @@
  * information regarding copyright ownership.
  */
 
-#ifndef NS_LIB_H
-#define NS_LIB_H 1
+#pragma once
 
 /*! \file include/ns/lib.h */
 
@@ -20,7 +19,6 @@
 ISC_LANG_BEGINDECLS
 
 LIBNS_EXTERNAL_DATA extern unsigned int ns_pps;
-LIBNS_EXTERNAL_DATA extern isc_msgcat_t *ns_msgcat;
 
 isc_result_t
 ns_lib_init(void);
@@ -35,5 +33,3 @@ ns_lib_shutdown(void);
  */
 
 ISC_LANG_ENDDECLS
-
-#endif /* NS_LIB_H */
index 6c41521de6b0e688b9d220fe70636551ceedeca1..0fbf1cba81d397e4ecab4f9dc095d3af3bcbc5d6 100644 (file)
@@ -17,7 +17,6 @@
 #include <stddef.h>
 
 #include <isc/mem.h>
-#include <isc/msgcat.h>
 #include <isc/mutex.h>
 #include <isc/once.h>
 #include <isc/util.h>
index 3da3d4113eaffe0cf548cb6e38b02080bb23aab7..bd7bf0a289414ce23f86542404802811acf43d0a 100644 (file)
 ./lib/dns/ds.c                                 C       2002,2003,2004,2005,2006,2007,2010,2012,2014,2016,2018,2019
 ./lib/dns/dst_api.c                            C.NAI   1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
 ./lib/dns/dst_internal.h                       C.NAI   2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2016,2017,2018,2019
-./lib/dns/dst_lib.c                            C       1999,2000,2001,2004,2005,2007,2016,2018,2019
 ./lib/dns/dst_openssl.h                                C       2002,2004,2005,2007,2008,2009,2011,2012,2015,2016,2018,2019
 ./lib/dns/dst_parse.c                          C.NAI   1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
 ./lib/dns/dst_parse.h                          C.NAI   2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2012,2014,2016,2017,2018,2019
 ./lib/dns/include/dns/zt.h                     C       1999,2000,2001,2002,2004,2005,2006,2007,2011,2016,2017,2018,2019
 ./lib/dns/include/dst/dst.h                    C       2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
 ./lib/dns/include/dst/gssapi.h                 C       2000,2001,2004,2005,2006,2007,2009,2010,2011,2013,2016,2017,2018,2019
-./lib/dns/include/dst/lib.h                    C       1999,2000,2001,2004,2005,2006,2007,2016,2018,2019
 ./lib/dns/include/dst/result.h                 C       1999,2000,2001,2004,2005,2006,2007,2008,2012,2014,2016,2018,2019
 ./lib/dns/ipkeylist.c                          C       2016,2018,2019
 ./lib/dns/iptable.c                            C       2007,2008,2009,2013,2014,2016,2017,2018,2019
 ./lib/isc/include/isc/md.h                     C       2018,2019
 ./lib/isc/include/isc/mem.h                    C       1997,1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2015,2016,2017,2018,2019
 ./lib/isc/include/isc/meminfo.h                        C       2015,2016,2018,2019
-./lib/isc/include/isc/msgcat.h                 C       1999,2000,2001,2004,2005,2007,2016,2018,2019
-./lib/isc/include/isc/msgs.h                   C       2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2016,2017,2018,2019
 ./lib/isc/include/isc/mutexblock.h             C       1999,2000,2001,2004,2005,2006,2007,2016,2018,2019
 ./lib/isc/include/isc/netaddr.h                        C       1998,1999,2000,2001,2002,2004,2005,2006,2007,2009,2015,2016,2017,2018,2019
 ./lib/isc/include/isc/netscope.h               C       2002,2004,2005,2006,2007,2009,2016,2018,2019
 ./lib/isc/mutexblock.c                         C       1999,2000,2001,2004,2005,2007,2011,2012,2016,2018,2019
 ./lib/isc/netaddr.c                            C       1999,2000,2001,2002,2004,2005,2007,2010,2011,2012,2014,2015,2016,2017,2018,2019
 ./lib/isc/netscope.c                           C       2002,2004,2005,2006,2007,2016,2018,2019
-./lib/isc/nls/msgcat.c                         C       1999,2000,2001,2004,2005,2007,2016,2018,2019
 ./lib/isc/nonce.c                              C       2018,2019
 ./lib/isc/openssl_shim.c                       C       2018,2019
 ./lib/isc/openssl_shim.h                       C       2018,2019
 ./lib/isccc/include/isccc/cc.h                 C.NOM   2001,2004,2005,2006,2007,2013,2014,2016,2018,2019
 ./lib/isccc/include/isccc/ccmsg.h              C.NOM   2001,2004,2005,2006,2007,2016,2018,2019
 ./lib/isccc/include/isccc/events.h             C.NOM   2001,2004,2005,2006,2007,2016,2018,2019
-./lib/isccc/include/isccc/lib.h                        C.NOM   2001,2004,2005,2006,2007,2016,2018,2019
 ./lib/isccc/include/isccc/result.h             C.NOM   2001,2003,2004,2005,2006,2007,2016,2018,2019
 ./lib/isccc/include/isccc/sexpr.h              C.NOM   2001,2004,2005,2006,2007,2016,2018,2019
 ./lib/isccc/include/isccc/symtab.h             C.NOM   2001,2004,2005,2006,2007,2016,2018,2019
 ./lib/isccc/include/isccc/types.h              C.NOM   2001,2004,2005,2006,2007,2016,2018,2019
 ./lib/isccc/include/isccc/util.h               C.NOM   2001,2004,2005,2006,2007,2014,2016,2018,2019
 ./lib/isccc/include/isccc/version.h            C       2001,2004,2005,2006,2007,2016,2018,2019
-./lib/isccc/lib.c                              C.NOM   2001,2004,2005,2007,2016,2018,2019
 ./lib/isccc/result.c                           C.NOM   2001,2003,2004,2005,2007,2015,2016,2018,2019
 ./lib/isccc/sexpr.c                            C.NOM   2001,2004,2005,2007,2014,2015,2016,2018,2019
 ./lib/isccc/symtab.c                           C.NOM   2001,2004,2005,2007,2016,2018,2019