]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use strerror_r from POSIX.1-2001 (strerror_s on Windows) instead of custom isc__strer...
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 13:27:42 +0000 (15:27 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:48 +0000 (10:31 +0200)
28 files changed:
bin/named/unix/os.c
bin/named/win32/os.c
configure.in
lib/dns/ssu_external.c
lib/dns/zone.c
lib/isc/Makefile.in
lib/isc/include/isc/platform.h.in
lib/isc/pthreads/condition.c
lib/isc/pthreads/mutex.c
lib/isc/unix/Makefile.in
lib/isc/unix/app.c
lib/isc/unix/errno2result.c
lib/isc/unix/ifiter_getifaddrs.c
lib/isc/unix/include/isc/strerror.h [deleted file]
lib/isc/unix/interfaceiter.c
lib/isc/unix/net.c
lib/isc/unix/socket.c
lib/isc/unix/strerror.c [deleted file]
lib/isc/unix/time.c
lib/isc/win32/errno2result.c
lib/isc/win32/include/isc/platform.h.in
lib/isc/win32/include/isc/strerror.h [deleted file]
lib/isc/win32/interfaceiter.c
lib/isc/win32/libisc.def.in
lib/isc/win32/net.c
lib/isc/win32/socket.c
lib/isc/win32/strerror.c [deleted file]
util/copyrights

index d462a225eb1d1075f34993c57beb833b26a7d78f..0cff5fa4033cd8b998f4e68eff6844236b2eb5d1 100644 (file)
@@ -40,7 +40,6 @@
 #include <isc/print.h>
 #include <isc/resource.h>
 #include <isc/result.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 
 #include <named/globals.h>
@@ -130,7 +129,7 @@ linux_setcaps(cap_t caps) {
                return;
        }
        if (cap_set_proc(caps) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlyfatal("cap_set_proc() failed: %s:"
                                      " please ensure that the capset kernel"
                                      " module is loaded.  see insmod(8)",
@@ -146,13 +145,13 @@ linux_setcaps(cap_t caps) {
                if (err != -1 && curval) { \
                        err = cap_set_flag(caps, CAP_EFFECTIVE, 1, &capval, CAP_SET); \
                        if (err == -1) { \
-                               isc__strerror(errno, strbuf, sizeof(strbuf)); \
+                               strerror_r(errno, strbuf, sizeof(strbuf)); \
                                named_main_earlyfatal("cap_set_proc failed: %s", strbuf); \
                        } \
                        \
                        err = cap_set_flag(caps, CAP_PERMITTED, 1, &capval, CAP_SET); \
                        if (err == -1) { \
-                               isc__strerror(errno, strbuf, sizeof(strbuf)); \
+                               strerror_r(errno, strbuf, sizeof(strbuf)); \
                                named_main_earlyfatal("cap_set_proc failed: %s", strbuf); \
                        } \
                } \
@@ -161,12 +160,12 @@ linux_setcaps(cap_t caps) {
        do { \
                caps = cap_init(); \
                if (caps == NULL) { \
-                       isc__strerror(errno, strbuf, sizeof(strbuf)); \
+                       strerror_r(errno, strbuf, sizeof(strbuf)); \
                        named_main_earlyfatal("cap_init failed: %s", strbuf); \
                } \
                curcaps = cap_get_proc(); \
                if (curcaps == NULL) { \
-                       isc__strerror(errno, strbuf, sizeof(strbuf)); \
+                       strerror_r(errno, strbuf, sizeof(strbuf)); \
                        named_main_earlyfatal("cap_get_proc failed: %s", strbuf); \
                } \
        } while (0)
@@ -286,7 +285,7 @@ linux_keepcaps(void) {
 
        if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) {
                if (errno != EINVAL) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        named_main_earlyfatal("prctl() failed: %s", strbuf);
                }
        } else {
@@ -331,13 +330,13 @@ named_os_daemonize(void) {
        char strbuf[ISC_STRERRORSIZE];
 
        if (pipe(dfd) == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlyfatal("pipe(): %s", strbuf);
        }
 
        pid = fork();
        if (pid == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlyfatal("fork(): %s", strbuf);
        }
        if (pid != 0) {
@@ -367,7 +366,7 @@ named_os_daemonize(void) {
 #endif
 
        if (setsid() == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlyfatal("setsid(): %s", strbuf);
        }
 
@@ -450,14 +449,14 @@ named_os_chroot(const char *root) {
        if (root != NULL) {
 #ifdef HAVE_CHROOT
                if (chroot(root) < 0) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        named_main_earlyfatal("chroot(): %s", strbuf);
                }
 #else
                named_main_earlyfatal("chroot(): disabled");
 #endif
                if (chdir("/") < 0) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        named_main_earlyfatal("chdir(/): %s", strbuf);
                }
 #ifdef HAVE_LIBSCF
@@ -484,7 +483,7 @@ named_os_inituserinfo(const char *username) {
 
        if (getuid() == 0) {
                if (initgroups(runas_pw->pw_name, runas_pw->pw_gid) < 0) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        named_main_earlyfatal("initgroups(): %s", strbuf);
                }
        }
@@ -514,12 +513,12 @@ named_os_changeuser(void) {
 #endif
 
        if (setgid(runas_pw->pw_gid) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlyfatal("setgid(): %s", strbuf);
        }
 
        if (setuid(runas_pw->pw_uid) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlyfatal("setuid(): %s", strbuf);
        }
 
@@ -529,7 +528,7 @@ named_os_changeuser(void) {
         * call has disabled it.
         */
        if (prctl(PR_SET_DUMPABLE,1,0,0,0) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlywarning("prctl(PR_SET_DUMPABLE) failed: %s",
                                        strbuf);
        }
@@ -648,7 +647,7 @@ mkdirpath(char *filename, void (*report)(const char *, ...)) {
 
                if (stat(filename, &sb) == -1) {
                        if (errno != ENOENT) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                (*report)("couldn't stat '%s': %s", filename,
                                          strbuf);
                                goto error;
@@ -668,7 +667,7 @@ mkdirpath(char *filename, void (*report)(const char *, ...)) {
                        mode |= S_IRGRP | S_IXGRP;              /* g=rx */
                        mode |= S_IROTH | S_IXOTH;              /* o=rx */
                        if (mkdir(filename, mode) == -1) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                (*report)("couldn't mkdir '%s': %s", filename,
                                          strbuf);
                                goto error;
@@ -676,7 +675,7 @@ mkdirpath(char *filename, void (*report)(const char *, ...)) {
                        if (runas_pw != NULL &&
                            chown(filename, runas_pw->pw_uid,
                                  runas_pw->pw_gid) == -1) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                (*report)("couldn't chown '%s': %s", filename,
                                          strbuf);
                        }
@@ -703,7 +702,7 @@ setperms(uid_t uid, gid_t gid) {
 #endif
 #if defined(HAVE_SETEGID)
        if (getegid() != gid && setegid(gid) == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlywarning("unable to set effective "
                                        "gid to %ld: %s",
                                        (long)gid, strbuf);
@@ -711,7 +710,7 @@ setperms(uid_t uid, gid_t gid) {
 #elif defined(HAVE_SETRESGID)
        if (getresgid(&tmpg, &oldgid, &tmpg) == -1 || oldgid != gid) {
                if (setresgid(-1, gid, -1) == -1) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        named_main_earlywarning("unable to set effective "
                                                "gid to %d: %s", gid, strbuf);
                }
@@ -720,7 +719,7 @@ setperms(uid_t uid, gid_t gid) {
 
 #if defined(HAVE_SETEUID)
        if (geteuid() != uid && seteuid(uid) == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlywarning("unable to set effective "
                                        "uid to %ld: %s",
                                        (long)uid, strbuf);
@@ -728,7 +727,7 @@ setperms(uid_t uid, gid_t gid) {
 #elif defined(HAVE_SETRESUID)
        if (getresuid(&tmpu, &olduid, &tmpu) == -1 || olduid != uid) {
                if (setresuid(-1, uid, -1) == -1) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        named_main_earlywarning("unable to set effective "
                                                "uid to %d: %s", uid, strbuf);
                }
@@ -747,7 +746,7 @@ named_os_openfile(const char *filename, mode_t mode, bool switch_user) {
         */
        f = strdup(filename);
        if (f == NULL) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlywarning("couldn't strdup() '%s': %s",
                                        filename, strbuf);
                return (NULL);
@@ -799,7 +798,7 @@ named_os_openfile(const char *filename, mode_t mode, bool switch_user) {
        }
 
        if (fd < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlywarning("could not open file '%s': %s",
                                        filename, strbuf);
                return (NULL);
@@ -807,7 +806,7 @@ named_os_openfile(const char *filename, mode_t mode, bool switch_user) {
 
        fp = fdopen(fd, "w");
        if (fp == NULL) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlywarning("could not fdopen() file '%s': %s",
                                        filename, strbuf);
        }
@@ -835,7 +834,7 @@ named_os_writepidfile(const char *filename, bool first_time) {
 
        pidfile = strdup(filename);
        if (pidfile == NULL) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                (*report)("couldn't strdup() '%s': %s", filename, strbuf);
                return;
        }
@@ -882,7 +881,7 @@ named_os_issingleton(const char *filename) {
         */
        lockfile = strdup(filename);
        if (lockfile == NULL) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                named_main_earlyfatal("couldn't allocate memory for '%s': %s",
                                      filename, strbuf);
        } else {
index c3c566ca23d2459de681abc433ffaad66094776f..813cc6ce272b5255670568257d8e3a2261cfe92a 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <isc/print.h>
 #include <isc/result.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/ntpaths.h>
 #include <isc/util.h>
@@ -231,7 +230,7 @@ named_os_openfile(const char *filename, int mode, bool switch_user) {
        UNUSED(switch_user);
        fd = safe_open(filename, mode, false);
        if (fd < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_s(strbuf, sizeof(strbuf), errno);
                named_main_earlywarning("could not open file '%s': %s",
                                        filename, strbuf);
                return (NULL);
@@ -239,7 +238,7 @@ named_os_openfile(const char *filename, int mode, bool switch_user) {
 
        fp = fdopen(fd, "w");
        if (fp == NULL) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_s(strbuf, sizeof(strbuf), errno);
                named_main_earlywarning("could not fdopen() file '%s': %s",
                                        filename, strbuf);
                close(fd);
@@ -268,7 +267,7 @@ named_os_writepidfile(const char *filename, bool first_time) {
 
        pidfile = strdup(filename);
        if (pidfile == NULL) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_s(strbuf, sizeof(strbuf), errno);
                (*report)("couldn't strdup() '%s': %s", filename, strbuf);
                return;
        }
@@ -312,7 +311,7 @@ named_os_issingleton(const char *filename) {
 
        lockfile = strdup(filename);
        if (lockfile == NULL) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_s(strbuf, sizeof(strbuf), errno);
                named_main_earlyfatal("couldn't allocate memory for '%s': %s",
                                      filename, strbuf);
        }
index 821b6589d7a072e766f55e355a2ba97a5cc9003a..072661392e08933d4af5bec3515ac7ebc5feb31a 100644 (file)
@@ -2085,8 +2085,6 @@ then
        AC_CHECK_HEADERS(readline/history.h)
 fi
 
-
-AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
 #
 # Use our own SPNEGO implementation?
 #
index 566b3a00cc9db7db6dc993d180e6b5940d1b4b0f..b9c2de40a5cd929fe6066a4f80023fae0c45ec9e 100644 (file)
@@ -35,7 +35,6 @@
 #include <isc/result.h>
 #include <isc/string.h>
 #include <isc/util.h>
-#include <isc/strerror.h>
 
 #include <dns/fixedname.h>
 #include <dns/name.h>
@@ -82,7 +81,7 @@ ux_socket_connect(const char *path) {
        fd = socket(AF_UNIX, SOCK_STREAM, 0);
        if (fd == -1) {
                char strbuf[ISC_STRERRORSIZE];
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                ssu_e_log(3, "ssu_external: unable to create socket - %s",
                          strbuf);
                return (-1);
@@ -90,7 +89,7 @@ ux_socket_connect(const char *path) {
 
        if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
                char strbuf[ISC_STRERRORSIZE];
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                ssu_e_log(3, "ssu_external: unable to connect to "
                             "socket '%s' - %s",
                          path, strbuf);
@@ -224,7 +223,7 @@ dns_ssu_external_match(const dns_name_t *identity,
        isc_mem_free(mctx, data);
        if (ret != (ssize_t) req_len) {
                char strbuf[ISC_STRERRORSIZE];
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                ssu_e_log(3, "ssu_external: unable to send request - %s",
                          strbuf);
                close(fd);
@@ -235,7 +234,7 @@ dns_ssu_external_match(const dns_name_t *identity,
        ret = read(fd, &reply, sizeof(uint32_t));
        if (ret != (ssize_t) sizeof(uint32_t)) {
                char strbuf[ISC_STRERRORSIZE];
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                ssu_e_log(3, "ssu_external: unable to receive reply - %s",
                          strbuf);
                close(fd);
index 623d7282512f61ca285402f496ae01431620e3db..9ac304249b7819e73037b1d350d65990d4285614 100644 (file)
@@ -29,7 +29,6 @@
 #include <isc/serial.h>
 #include <isc/stats.h>
 #include <isc/stdtime.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/taskpool.h>
 #include <isc/thread.h>
@@ -4593,7 +4592,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
                                             "removing journal file");
                        if (remove(zone->journal) < 0 && errno != ENOENT) {
                                char strbuf[ISC_STRERRORSIZE];
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                isc_log_write(dns_lctx,
                                              DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_ZONE,
@@ -15112,7 +15111,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
                                     zone->journal);
                if (result != ISC_R_SUCCESS) {
                        char strbuf[ISC_STRERRORSIZE];
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "ixfr-from-differences: failed: "
                                     "%s", strbuf);
@@ -15134,7 +15133,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
                        if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_FORCEXFER) &&
                            remove(zone->masterfile) < 0 && errno != ENOENT) {
                                char strbuf[ISC_STRERRORSIZE];
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                isc_log_write(dns_lctx,
                                              DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_ZONE,
@@ -15165,7 +15164,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
                                      "removing journal file");
                        if (remove(zone->journal) < 0 && errno != ENOENT) {
                                char strbuf[ISC_STRERRORSIZE];
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                isc_log_write(dns_lctx,
                                              DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_ZONE,
index a9bfe1f8829d02f01db5e29b56af1016cdd6bda8..8f5233fffa806e8503bc8d1fc0e26e5c5a05d7f0 100644 (file)
@@ -31,7 +31,7 @@ UNIXOBJS =    unix/pk11_api.@O@ \
                unix/errno2result.@O@ unix/file.@O@ unix/fsaccess.@O@ \
                unix/interfaceiter.@O@ unix/keyboard.@O@ unix/meminfo.@O@ \
                unix/net.@O@ unix/os.@O@ unix/resource.@O@ unix/socket.@O@ \
-               unix/stdio.@O@ unix/stdtime.@O@ unix/strerror.@O@ \
+               unix/stdio.@O@ unix/stdtime.@O@ \
                unix/syslog.@O@ unix/time.@O@
 
 NLSOBJS =      nls/msgcat.@O@
index e30c02c55be0ad2c6e3722fe9f1f236bd3fb5439..d2bcdd8aa1010319439972d956657f7ed074c4ad 100644 (file)
 #define thread_local __thread
 #endif
 
+/***
+ *** Default strerror_r buffer size
+ ***/
+
+#define ISC_STRERRORSIZE 128
+
 /***
  *** Network.
  ***/
index a7f1928126cf61f4aa8f6970f2f7a4c90cc4f284..2c3b07cc77f44f36a03d1495611fc9c1e55cda62 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <isc/condition.h>
 #include <isc/msgs.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/time.h>
 #include <isc/util.h>
@@ -64,7 +63,7 @@ isc_condition_waituntil(isc_condition_t *c, isc_mutex_t *m, isc_time_t *t) {
                        return (ISC_R_TIMEDOUT);
        } while (presult == EINTR);
 
-       isc__strerror(presult, strbuf, sizeof(strbuf));
+       strerror_r(presult, strbuf, sizeof(strbuf));
        UNEXPECTED_ERROR(__FILE__, __LINE__,
                         "pthread_cond_timedwait() %s %s",
                         isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
index cd45e6b1f59ef8cbb98d633b431f860eaf6aabee..a04871219db509b243e733f6dde9e861bb4526eb 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
+#include <string.h>
 #include <time.h>
 #include <sys/time.h>
 #include <errno.h>
@@ -23,7 +24,6 @@
 #include <isc/mutex.h>
 #include <isc/util.h>
 #include <isc/print.h>
-#include <isc/strerror.h>
 #include <isc/once.h>
 
 #if ISC_MUTEX_PROFILE
@@ -292,7 +292,7 @@ isc__mutex_init(isc_mutex_t *mp, const char *file, unsigned int line) {
        if (err == ENOMEM)
                return (ISC_R_NOMEMORY);
        if (err != 0) {
-               isc__strerror(err, strbuf, sizeof(strbuf));
+               strerror_r(err, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(file, line, "isc_mutex_init() failed: %s",
                                 strbuf);
                result = ISC_R_UNEXPECTED;
index 190540cdaf4d9bc69a465610165ca78c2a15e9b9..80e8bc6e55d513b76ac7e5827ce3847fff505fba 100644 (file)
@@ -26,19 +26,18 @@ OBJS =              pk11_api.@O@ \
                file.@O@ fsaccess.@O@ interfaceiter.@O@ \
                keyboard.@O@ meminfo.@O@ \
                net.@O@ os.@O@ resource.@O@ socket.@O@ stdio.@O@ stdtime.@O@ \
-               strerror.@O@ syslog.@O@ time.@O@
+               syslog.@O@ time.@O@
 
 # Alphabetically
 SRCS =         pk11_api.c \
                app.c dir.c errno.c errno2result.c \
                file.c fsaccess.c interfaceiter.c keyboard.c meminfo.c \
                net.c os.c resource.c socket.c stdio.c stdtime.c \
-               strerror.c syslog.c time.c
+               syslog.c time.c
 
 SUBDIRS =      include
 TARGETS =      ${OBJS}
 
 @BIND9_MAKE_RULES@
 
-interfaceiter.@O@: interfaceiter.c ifiter_ioctl.c ifiter_sysctl.c ifiter_getifaddrs.c
-
+interfaceiter.@O@: interfaceiter.c ifiter_getifaddrs.c
index 3c6662632dd131c7b7771dd6c49cea4aaec78e86..f81ef70f816312593daf45e848a8b4d27b2c5172 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/epoll.h>
 #endif
 
+#include <isc/platform.h>
 #include <isc/app.h>
 #include <isc/condition.h>
 #include <isc/mem.h>
@@ -35,7 +36,6 @@
 #include <isc/mutex.h>
 #include <isc/event.h>
 #include <isc/platform.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/task.h>
 #include <isc/time.h>
@@ -181,7 +181,7 @@ handle_signal(int sig, void (*handler)(int)) {
 
        if (sigfillset(&sa.sa_mask) != 0 ||
            sigaction(sig, &sa, NULL) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 isc_msgcat_get(isc_msgcat, ISC_MSGSET_APP,
                                               ISC_MSG_SIGNALSETUP,
@@ -213,7 +213,7 @@ isc__app_ctxstart(isc_appctx_t *ctx0) {
         */
        presult = pthread_init();
        if (presult != 0) {
-               isc__strerror(presult, strbuf, sizeof(strbuf));
+               strerror_r(presult, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_app_start() pthread_init: %s", strbuf);
                return (ISC_R_UNEXPECTED);
@@ -302,7 +302,7 @@ isc__app_ctxstart(isc_appctx_t *ctx0) {
            sigaddset(&sset, SIGHUP) != 0 ||
            sigaddset(&sset, SIGINT) != 0 ||
            sigaddset(&sset, SIGTERM) != 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_app_start() sigsetops: %s", strbuf);
                result = ISC_R_UNEXPECTED;
@@ -310,7 +310,7 @@ isc__app_ctxstart(isc_appctx_t *ctx0) {
        }
        presult = pthread_sigmask(SIG_BLOCK, &sset, NULL);
        if (presult != 0) {
-               isc__strerror(presult, strbuf, sizeof(strbuf));
+               strerror_r(presult, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_app_start() pthread_sigmask: %s",
                                 strbuf);
@@ -450,7 +450,7 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
                            sigaddset(&sset, SIGHUP) != 0 ||
                            sigaddset(&sset, SIGINT) != 0 ||
                            sigaddset(&sset, SIGTERM) != 0) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "isc_app_run() sigsetops: %s",
                                                 strbuf);
@@ -502,7 +502,7 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
                                return (ISC_R_SUCCESS);
 
                        if (sigemptyset(&sset) != 0) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "isc_app_run() sigsetops: %s",
                                                 strbuf);
@@ -510,7 +510,7 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
                        }
 #ifdef HAVE_GPERFTOOLS_PROFILER
                        if (sigaddset(&sset, SIGALRM) != 0) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "isc_app_run() sigsetops: %s",
                                                 strbuf);
@@ -583,7 +583,7 @@ isc__app_ctxshutdown(isc_appctx_t *ctx0) {
 
                                result = pthread_kill(main_thread, SIGTERM);
                                if (result != 0) {
-                                       isc__strerror(result,
+                                       strerror_r(result,
                                                      strbuf, sizeof(strbuf));
                                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                         "isc_app_shutdown() "
@@ -596,7 +596,7 @@ isc__app_ctxshutdown(isc_appctx_t *ctx0) {
                        if (isc_bind9) {
                                /* BIND9 internal, single context */
                                if (kill(getpid(), SIGTERM) < 0) {
-                                       isc__strerror(errno,
+                                       strerror_r(errno,
                                                      strbuf, sizeof(strbuf));
                                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                         "isc_app_shutdown() "
@@ -656,7 +656,7 @@ isc__app_ctxsuspend(isc_appctx_t *ctx0) {
 
                                result = pthread_kill(main_thread, SIGHUP);
                                if (result != 0) {
-                                       isc__strerror(result,
+                                       strerror_r(result,
                                                      strbuf, sizeof(strbuf));
                                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                         "isc_app_reload() "
@@ -669,7 +669,7 @@ isc__app_ctxsuspend(isc_appctx_t *ctx0) {
                        if (isc_bind9) {
                                /* BIND9 internal, single context */
                                if (kill(getpid(), SIGHUP) < 0) {
-                                       isc__strerror(errno,
+                                       strerror_r(errno,
                                                      strbuf, sizeof(strbuf));
                                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                         "isc_app_reload() "
index 2f12bcc8bc0f0326ae25202f7e604cf60f616436..604213a6e24d43c7e1ba82fb56120a8315e69f73 100644 (file)
 #include <config.h>
 
 #include <stdbool.h>
+#include <string.h>
 
+#include <isc/platform.h>
 #include <isc/result.h>
-#include <isc/strerror.h>
 #include <isc/util.h>
 
 #include "errno2result.h"
@@ -109,7 +110,7 @@ isc___errno2result(int posixerrno, bool dolog,
                return (ISC_R_CONNREFUSED);
        default:
                if (dolog) {
-                       isc__strerror(posixerrno, strbuf, sizeof(strbuf));
+                       strerror_r(posixerrno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(file, line, "unable to convert errno "
                                         "to isc_result: %d: %s",
                                         posixerrno, strbuf);
index 184cec51325bdfc7aa3db417bc56e64603e86977..18deb7ace011fd7b38037ea8df7c9c7d0faf8bf0 100644 (file)
@@ -77,7 +77,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
 #endif
 
        if (getifaddrs(&iter->ifaddrs) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 isc_msgcat_get(isc_msgcat,
                                                ISC_MSGSET_IFITERGETIFADDRS,
diff --git a/lib/isc/unix/include/isc/strerror.h b/lib/isc/unix/include/isc/strerror.h
deleted file mode 100644 (file)
index fa0e429..0000000
+++ /dev/null
@@ -1,38 +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_STRERROR_H
-#define ISC_STRERROR_H
-
-/*! \file */
-
-#include <sys/types.h>
-
-#include <isc/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-/*% String Error Size */
-#define ISC_STRERRORSIZE 128
-
-/*%
- * Provide a thread safe wrapper to strerror().
- *
- * Requires:
- *     'buf' to be non NULL.
- */
-void
-isc__strerror(int num, char *buf, size_t bufsize);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_STRERROR_H */
index bb0e5e22e0903e70ac272eb44d14364c834566aa..fb1a389f82d5446e114c15db728e6c9e28f2ece2 100644 (file)
@@ -34,7 +34,6 @@
 #include <isc/net.h>
 #include <isc/print.h>
 #include <isc/result.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/types.h>
 #include <isc/util.h>
index e62cbbaf617c1439fbcbb798ad594ea25e0d4da5..68757d7eff2cdd807f1aa963fbe2835c47865a4b 100644 (file)
@@ -32,7 +32,6 @@
 #include <isc/net.h>
 #include <isc/netdb.h>
 #include <isc/once.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/util.h>
 
@@ -137,7 +136,7 @@ try_proto(int domain) {
 #endif
                        return (ISC_R_NOTFOUND);
                default:
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "socket() %s: %s",
                                         isc_msgcat_get(isc_msgcat,
@@ -245,7 +244,7 @@ try_ipv6only(void) {
        /* check for TCP sockets */
        s = socket(PF_INET6, SOCK_STREAM, 0);
        if (s == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "socket() %s: %s",
                                 isc_msgcat_get(isc_msgcat,
@@ -268,7 +267,7 @@ try_ipv6only(void) {
        /* check for UDP sockets */
        s = socket(PF_INET6, SOCK_DGRAM, 0);
        if (s == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "socket() %s: %s",
                                 isc_msgcat_get(isc_msgcat,
@@ -316,7 +315,7 @@ try_ipv6pktinfo(void) {
        /* we only use this for UDP sockets */
        s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP);
        if (s == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "socket() %s: %s",
                                 isc_msgcat_get(isc_msgcat,
@@ -429,7 +428,7 @@ make_nonblock(int fd) {
 #endif
 
        if (ret == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
 #ifdef USE_FIONBIO_IOCTL
                                 "ioctl(%d, FIONBIO, &on): %s", fd,
@@ -461,7 +460,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
        isc_result_t result;
 
        if (bind(s, res->ai_addr, res->ai_addrlen) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
                              "bind: %s", strbuf);
@@ -469,7 +468,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
        }
 
        if (getsockname(s, (struct sockaddr *)&ss, &len) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
                              "getsockname: %s", strbuf);
@@ -532,7 +531,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
                default:
                        debug = ISC_LOG_NOTICE;
                }
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                if (debug != ISC_LOG_NOTICE) {
                        isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
@@ -604,7 +603,7 @@ try_dscp_v4(void) {
        s = socket(res0->ai_family, res0->ai_socktype, res0->ai_protocol);
 
        if (s == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
                              "socket: %s", strbuf);
@@ -662,7 +661,7 @@ try_dscp_v6(void) {
 
        s = socket(res0->ai_family, res0->ai_socktype, res0->ai_protocol);
        if (s == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
                              "socket: %s", strbuf);
index f20702d4aa9a138537081ef6a5c2c434084d4989..1f3deaeda63d266929da95a604fccddc4c9cf213 100644 (file)
@@ -56,7 +56,6 @@
 #include <isc/resource.h>
 #include <isc/socket.h>
 #include <isc/stats.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/task.h>
 #include <isc/thread.h>
@@ -959,7 +958,7 @@ unwatch_fd(isc__socketmgr_t *manager, int fd, int msg) {
        ret = epoll_ctl(manager->epoll_fd, op, fd, &event);
        if (ret == -1 && errno != ENOENT) {
                char strbuf[ISC_STRERRORSIZE];
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "epoll_ctl(DEL), %d: %s", fd, strbuf);
                result = ISC_R_UNEXPECTED;
@@ -1107,7 +1106,7 @@ select_poke(isc__socketmgr_t *mgr, int fd, int msg) {
        } while (cc < 0 && SOFT_ERROR(errno));
 
        if (cc < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
                            isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
                                           ISC_MSG_WRITEFAILED,
@@ -1135,7 +1134,7 @@ select_readmsg(isc__socketmgr_t *mgr, int *fd, int *msg) {
                if (SOFT_ERROR(errno))
                        return;
 
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
                            isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
                                           ISC_MSG_READFAILED,
@@ -1171,7 +1170,7 @@ make_nonblock(int fd) {
 #endif
 
        if (ret == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
 #ifdef USE_FIONBIO_IOCTL
                                 "ioctl(%d, FIONBIO, &on): %s", fd,
@@ -1509,7 +1508,7 @@ build_msghdr_send(isc__socket_t *sock, char* cmsgbuf, isc_socketevent_t *dev,
                               (void *)&dscp, sizeof(int)) < 0)
                        {
                                char strbuf[ISC_STRERRORSIZE];
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "setsockopt(%d, IP_TOS, %.02x)"
                                                 " %s: %s",
@@ -1539,7 +1538,7 @@ build_msghdr_send(isc__socket_t *sock, char* cmsgbuf, isc_socketevent_t *dev,
                        if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_TCLASS,
                                       (void *)&dscp, sizeof(int)) < 0) {
                                char strbuf[ISC_STRERRORSIZE];
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "setsockopt(%d, IPV6_TCLASS, "
                                                 "%.02x) %s: %s",
@@ -1795,7 +1794,7 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
                        return (DOIO_SOFT);
 
                if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
-                       isc__strerror(recv_errno, strbuf, sizeof(strbuf));
+                       strerror_r(recv_errno, strbuf, sizeof(strbuf));
                        socket_log(sock, NULL, IOEVENT,
                                   isc_msgcat, ISC_MSGSET_SOCKET,
                                   ISC_MSG_DOIORECV,
@@ -2033,7 +2032,7 @@ doio_send(isc__socket_t *sock, isc_socketevent_t *dev) {
                 * a status.
                 */
                isc_sockaddr_format(&dev->address, addrbuf, sizeof(addrbuf));
-               isc__strerror(send_errno, strbuf, sizeof(strbuf));
+               strerror_r(send_errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__, "internal_send: %s: %s",
                                 addrbuf, strbuf);
                dev->result = isc__errno2result(send_errno);
@@ -2531,7 +2530,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                switch (errno) {
                case EMFILE:
                case ENFILE:
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       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,
@@ -2556,7 +2555,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                        return (ISC_R_FAMILYNOSUPPORT);
 
                default:
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "%s() %s: %s", err,
                                         isc_msgcat_get(isc_msgcat,
@@ -2586,7 +2585,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
        if (sock->type != isc_sockettype_unix && bsdcompat &&
            setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
                       (void *)&on, sizeof(on)) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, SO_BSDCOMPAT) %s: %s",
                                 sock->fd,
@@ -2600,7 +2599,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
 #ifdef SO_NOSIGPIPE
        if (setsockopt(sock->fd, SOL_SOCKET, SO_NOSIGPIPE,
                       (void *)&on, sizeof(on)) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, SO_NOSIGPIPE) %s: %s",
                                 sock->fd,
@@ -2627,7 +2626,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                if (setsockopt(sock->fd, SOL_SOCKET, SO_TIMESTAMP,
                               (void *)&on, sizeof(on)) < 0
                    && errno != ENOPROTOOPT) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, SO_TIMESTAMP) %s: %s",
                                         sock->fd,
@@ -2645,7 +2644,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                if ((sock->pf == AF_INET6)
                    && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
                                   (void *)&on, sizeof(on)) < 0)) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_RECVPKTINFO) "
                                         "%s: %s", sock->fd,
@@ -2660,7 +2659,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                if ((sock->pf == AF_INET6)
                    && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO,
                                   (void *)&on, sizeof(on)) < 0)) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_PKTINFO) %s: %s",
                                         sock->fd,
@@ -2726,7 +2725,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
                                                  set_rcvbuf) == ISC_R_SUCCESS);
                        if (setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
                               (void *)&rcvbuf, sizeof(rcvbuf)) == -1) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                        "setsockopt(%d, SO_RCVBUF, %d) %s: %s",
                                        sock->fd, rcvbuf,
@@ -2743,7 +2742,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
        if ((sock->pf == AF_INET6)
            && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVTCLASS,
                           (void *)&on, sizeof(on)) < 0)) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, IPV6_RECVTCLASS) "
                                 "%s: %s", sock->fd,
@@ -2756,7 +2755,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
        if ((sock->pf == AF_INET)
            && (setsockopt(sock->fd, IPPROTO_IP, IP_RECVTOS,
                           (void *)&on, sizeof(on)) < 0)) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, IP_RECVTOS) "
                                 "%s: %s", sock->fd,
@@ -3454,7 +3453,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
                default:
                        break;
                }
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "internal_accept: %s() %s: %s", err,
                                 isc_msgcat_get(isc_msgcat,
@@ -4146,7 +4145,7 @@ watcher(void *uap) {
 #endif /* USE_KQUEUE */
 
                        if (cc < 0 && !SOFT_ERROR(errno)) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                FATAL_ERROR(__FILE__, __LINE__,
                                            "%s %s: %s", fnname,
                                            isc_msgcat_get(isc_msgcat,
@@ -4241,7 +4240,7 @@ setup_watcher(isc_mem_t *mctx, isc__socketmgr_t *manager) {
        manager->kqueue_fd = kqueue();
        if (manager->kqueue_fd == -1) {
                result = isc__errno2result(errno);
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "kqueue %s: %s",
                                 isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
@@ -4268,7 +4267,7 @@ setup_watcher(isc_mem_t *mctx, isc__socketmgr_t *manager) {
        manager->epoll_fd = epoll_create(manager->nevents);
        if (manager->epoll_fd == -1) {
                result = isc__errno2result(errno);
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "epoll_create %s: %s",
                                 isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
@@ -4311,7 +4310,7 @@ setup_watcher(isc_mem_t *mctx, isc__socketmgr_t *manager) {
        manager->devpoll_fd = open("/dev/poll", O_RDWR);
        if (manager->devpoll_fd == -1) {
                result = isc__errno2result(errno);
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "open(/dev/poll) %s: %s",
                                 isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
@@ -4514,7 +4513,7 @@ isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
         * select/poll loop when something internal needs to be done.
         */
        if (pipe(manager->pipe_fds) != 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "pipe() %s: %s",
                                 isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
@@ -5143,7 +5142,7 @@ isc__socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) {
 
        if (active) {
                if (stat(sockaddr->type.sunix.sun_path, &sb) < 0) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
                                      "isc_socket_cleanunix: stat(%s): %s",
@@ -5158,7 +5157,7 @@ isc__socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) {
                        return;
                }
                if (unlink(sockaddr->type.sunix.sun_path) < 0) {
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
                                      "isc_socket_cleanunix: unlink(%s): %s",
@@ -5169,7 +5168,7 @@ isc__socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) {
 
        s = socket(AF_UNIX, SOCK_STREAM, 0);
        if (s < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
                              "isc_socket_cleanunix: socket(%s): %s",
@@ -5182,7 +5181,7 @@ isc__socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) {
                case ENOENT:    /* We exited cleanly last time */
                        break;
                default:
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
                                      "isc_socket_cleanunix: stat(%s): %s",
@@ -5206,7 +5205,7 @@ isc__socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) {
                case ECONNREFUSED:
                case ECONNRESET:
                        if (unlink(sockaddr->type.sunix.sun_path) < 0) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
+                               strerror_r(errno, strbuf, sizeof(strbuf));
                                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                                              ISC_LOGMODULE_SOCKET,
                                              ISC_LOG_WARNING,
@@ -5217,7 +5216,7 @@ isc__socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) {
                        }
                        break;
                default:
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
                                      "isc_socket_cleanunix: connect(%s): %s",
@@ -5263,7 +5262,7 @@ isc__socket_permunix(const isc_sockaddr_t *sockaddr, uint32_t perm,
 #endif
 
        if (chmod(path, perm) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
                              "isc_socket_permunix: chmod(%s, %d): %s",
@@ -5271,7 +5270,7 @@ isc__socket_permunix(const isc_sockaddr_t *sockaddr, uint32_t perm,
                result = ISC_R_FAILURE;
        }
        if (chown(path, owner, group) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
                              "isc_socket_permunix: chown(%s, %d, %d): %s",
@@ -5344,7 +5343,7 @@ isc__socket_bind(isc_socket_t *sock0, const isc_sockaddr_t *sockaddr,
                case EINVAL:
                        return (ISC_R_BOUND);
                default:
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__, "bind: %s",
                                         strbuf);
                        return (ISC_R_UNEXPECTED);
@@ -5384,7 +5383,7 @@ isc__socket_filter(isc_socket_t *sock0, const char *filter) {
        strlcpy(afa.af_name, filter, sizeof(afa.af_name));
        if (setsockopt(sock->fd, SOL_SOCKET, SO_ACCEPTFILTER,
                         &afa, sizeof(afa)) == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
                           ISC_MSG_FILTER, "setsockopt(SO_ACCEPTFILTER): %s",
                           strbuf);
@@ -5447,7 +5446,7 @@ set_tcp_fastopen(isc__socket_t *sock, unsigned int backlog) {
 #endif
        if (setsockopt(sock->fd, IPPROTO_TCP, TCP_FASTOPEN,
                       (void *)&backlog, sizeof(backlog)) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, TCP_FASTOPEN) failed with %s",
                                 sock->fd, strbuf);
@@ -5488,7 +5487,7 @@ isc__socket_listen(isc_socket_t *sock0, unsigned int backlog) {
 
        if (listen(sock->fd, (int)backlog) < 0) {
                UNLOCK(&sock->lock);
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
 
                UNEXPECTED_ERROR(__FILE__, __LINE__, "listen: %s", strbuf);
 
@@ -5676,7 +5675,7 @@ isc__socket_connect(isc_socket_t *sock0, const isc_sockaddr_t *addr,
 
                sock->connected = 0;
 
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                isc_sockaddr_format(addr, addrbuf, sizeof(addrbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__, "connect(%s) %d/%s",
                                 addrbuf, errno, strbuf);
@@ -5838,7 +5837,7 @@ internal_connect(isc_task_t *me, isc_event_t *ev) {
                        result = ISC_R_UNEXPECTED;
                        isc_sockaddr_format(&sock->peer_address, peerbuf,
                                            sizeof(peerbuf));
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "internal_connect: connect(%s) %s",
                                         peerbuf, strbuf);
@@ -5903,7 +5902,7 @@ isc__socket_getsockname(isc_socket_t *sock0, isc_sockaddr_t *addressp) {
 
        len = sizeof(addressp->type);
        if (getsockname(sock->fd, &addressp->type.sa, (void *)&len) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__, "getsockname: %s",
                                 strbuf);
                result = ISC_R_UNEXPECTED;
@@ -6082,7 +6081,7 @@ isc__socket_ipv6only(isc_socket_t *sock0, bool yes) {
                if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
                               (void *)&onoff, sizeof(int)) < 0) {
                        char strbuf[ISC_STRERRORSIZE];
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_V6ONLY) "
                                         "%s: %s", sock->fd,
@@ -6109,7 +6108,7 @@ setdscp(isc__socket_t *sock, isc_dscp_t dscp) {
                if (setsockopt(sock->fd, IPPROTO_IP, IP_TOS,
                               (void *)&value, sizeof(value)) < 0) {
                        char strbuf[ISC_STRERRORSIZE];
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IP_TOS, %.02x) "
                                         "%s: %s", sock->fd, value >> 2,
@@ -6126,7 +6125,7 @@ setdscp(isc__socket_t *sock, isc_dscp_t dscp) {
                if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_TCLASS,
                               (void *)&value, sizeof(value)) < 0) {
                        char strbuf[ISC_STRERRORSIZE];
-                       isc__strerror(errno, strbuf, sizeof(strbuf));
+                       strerror_r(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_TCLASS, %.02x) "
                                         "%s: %s", sock->fd, dscp >> 2,
diff --git a/lib/isc/unix/strerror.c b/lib/isc/unix/strerror.c
deleted file mode 100644 (file)
index e4fb793..0000000
+++ /dev/null
@@ -1,67 +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 <stdio.h>
-#include <string.h>
-
-#include <isc/mutex.h>
-#include <isc/once.h>
-#include <isc/print.h>
-#include <isc/strerror.h>
-#include <isc/util.h>
-
-#ifdef HAVE_STRERROR
-/*%
- * We need to do this this way for profiled locks.
- */
-static isc_mutex_t isc_strerror_lock;
-static void init_lock(void) {
-       RUNTIME_CHECK(isc_mutex_init(&isc_strerror_lock) == ISC_R_SUCCESS);
-}
-#else
-extern const char * const sys_errlist[];
-extern const int sys_nerr;
-#endif
-
-void
-isc__strerror(int num, char *buf, size_t size) {
-#ifdef HAVE_STRERROR
-       char *msg;
-       unsigned int unum = (unsigned int)num;
-       static isc_once_t once = ISC_ONCE_INIT;
-
-       REQUIRE(buf != NULL);
-
-       RUNTIME_CHECK(isc_once_do(&once, init_lock) == ISC_R_SUCCESS);
-
-       LOCK(&isc_strerror_lock);
-       msg = strerror(num);
-       if (msg != NULL)
-               snprintf(buf, size, "%s", msg);
-       else
-               snprintf(buf, size, "Unknown error: %u", unum);
-       UNLOCK(&isc_strerror_lock);
-#else
-       unsigned int unum = (unsigned int)num;
-
-       REQUIRE(buf != NULL);
-
-       if (num >= 0 && num < sys_nerr)
-               snprintf(buf, size, "%s", sys_errlist[num]);
-       else
-               snprintf(buf, size, "Unknown error: %u", unum);
-#endif
-}
index 7957e11f92ea359ac15d92b42e2192f81b8089d2..b5e83c8722396a43e1889a4296d522783cf27fe3 100644 (file)
@@ -27,7 +27,6 @@
 #include <isc/log.h>
 #include <isc/platform.h>
 #include <isc/print.h>
-#include <isc/strerror.h>
 #include <isc/string.h>
 #include <isc/time.h>
 #include <isc/tm.h>
@@ -149,7 +148,7 @@ isc_time_now(isc_time_t *t) {
        REQUIRE(t != NULL);
 
        if (gettimeofday(&tv, NULL) == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__, "%s", strbuf);
                return (ISC_R_UNEXPECTED);
        }
@@ -193,7 +192,7 @@ isc_time_nowplusinterval(isc_time_t *t, const isc_interval_t *i) {
        INSIST(i->nanoseconds < NS_PER_S);
 
        if (gettimeofday(&tv, NULL) == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__, "%s", strbuf);
                return (ISC_R_UNEXPECTED);
        }
index f1f3b247c45a57a2ea5ec83327d90cb4d35e4b1b..c8f6ea3d1f6d901acc353ee60a2d3a2a3dcb5a80 100644 (file)
@@ -101,7 +101,7 @@ isc__errno2resultx(int posixerrno, bool dolog,
                return (ISC_R_NORESOURCES);
        default:
                if (dolog) {
-                       isc__strerror(posixerrno, strbuf, sizeof(strbuf));
+                       strerror_r(posixerrno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(file, line,
                                         "unable to convert errno "
                                         "to isc_result: %d: %s",
index 80df0a0b11867336cfdfaee6a7ffedbd19a7bced..eea970e6a9a7ec53f0e37efadc9a5b7ffcc13096 100644 (file)
@@ -28,6 +28,9 @@
 #if defined(_WIN32) || defined(_WIN64)
 /* We are on Windows */
 # define strtok_r strtok_s
+# define strerror_r(errnum, buf, buflen) strerror_s(buf, buflen, errnum)
+
+#define ISC_STRERRORSIZE 128
 
 #ifndef strtoull
 #define strtoull _strtoui64
diff --git a/lib/isc/win32/include/isc/strerror.h b/lib/isc/win32/include/isc/strerror.h
deleted file mode 100644 (file)
index ae040a4..0000000
+++ /dev/null
@@ -1,35 +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_STRERROR_H
-#define ISC_STRERROR_H
-
-#include <sys/types.h>
-
-#include <isc/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-#define ISC_STRERRORSIZE 128
-
-/*
- * Provide a thread safe wrapper to strerrror().
- *
- * Requires:
- *     'buf' to be non NULL.
- */
-void
-isc__strerror(int num, char *buf, size_t bufsize);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_STRERROR_H */
index 1bbd0f89fedce1269a0381877d579309665f5326..4c56531edcdf6c58dd7861de91a562cb6b0810ed 100644 (file)
@@ -141,7 +141,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
                error = WSAGetLastError();
                if (error == WSAEAFNOSUPPORT)
                        goto inet6_only;
-               isc__strerror(error, strbuf, sizeof(strbuf));
+               strerror_r(error, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                "making interface scan socket: %s",
                                strbuf);
@@ -169,7 +169,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
                        error = WSAGetLastError();
                        if (error != WSAEFAULT && error != WSAENOBUFS) {
                                errno = error;
-                               isc__strerror(error, strbuf, sizeof(strbuf));
+                               strerror_r(error, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                "get interface configuration: %s",
                                                strbuf);
@@ -222,7 +222,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
                error = WSAGetLastError();
                if (error == WSAEAFNOSUPPORT)
                        goto inet_only;
-               isc__strerror(error, strbuf, sizeof(strbuf));
+               strerror_r(error, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                "making interface scan socket: %s",
                                strbuf);
@@ -251,7 +251,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
                        error = WSAGetLastError();
                        if (error != WSAEFAULT && error != WSAENOBUFS) {
                                errno = error;
-                               isc__strerror(error, strbuf, sizeof(strbuf));
+                               strerror_r(error, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "sio address list query: %s",
                                                 strbuf);
index aa4e71178f804622792a057b457fe521382da164..e05c83e15dd37579ffa77aa7331bceac6f5ff98f 100644 (file)
@@ -101,7 +101,6 @@ isc__socketmgr_destroy
 isc__socketmgr_getmaxsockets
 isc__socketmgr_setreserved
 isc__socketmgr_setstats
-isc__strerror
 isc__task_getname
 isc__task_gettag
 isc__task_unsendrange
index 2b536aae7d4369d28ab42a1834513ae20d848078..7328f8e54c67620be5dc8ae4a6c05b2614501a0f 100644 (file)
@@ -65,7 +65,7 @@ try_proto(int domain) {
                case WSAEINVAL:
                        return (ISC_R_NOTFOUND);
                default:
-                       isc__strerror(errval, strbuf, sizeof(strbuf));
+                       strerror_r(errval, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "socket() %s: %s",
                                         isc_msgcat_get(isc_msgcat,
@@ -133,7 +133,7 @@ try_ipv6only(void) {
        /* check for TCP sockets */
        s = socket(PF_INET6, SOCK_STREAM, 0);
        if (s == INVALID_SOCKET) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "socket() %s: %s",
                                 isc_msgcat_get(isc_msgcat,
@@ -157,7 +157,7 @@ try_ipv6only(void) {
        /* check for UDP sockets */
        s = socket(PF_INET6, SOCK_DGRAM, 0);
        if (s == INVALID_SOCKET) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "socket() %s: %s",
                                 isc_msgcat_get(isc_msgcat,
@@ -213,7 +213,7 @@ try_ipv6pktinfo(void) {
        /* we only use this for UDP sockets */
        s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP);
        if (s == INVALID_SOCKET) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "socket() %s: %s",
                                 isc_msgcat_get(isc_msgcat,
index f89d323589ed253df492f850fa51075b4c6d7644..ffcc0cc9e14e91ce77149b23a6e6f3b5eda8385a 100644 (file)
@@ -461,7 +461,7 @@ signal_iocompletionport_exit(isc_socketmgr_t *manager) {
                if (!PostQueuedCompletionStatus(manager->hIoCompletionPort,
                                                0, 0, 0)) {
                        errval = GetLastError();
-                       isc__strerror(errval, strbuf, sizeof(strbuf));
+                       strerror_r(errval, strbuf, sizeof(strbuf));
                        FATAL_ERROR(__FILE__, __LINE__,
                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
                                ISC_MSG_FAILED,
@@ -491,7 +491,7 @@ iocompletionport_createthreads(int total_threads, isc_socketmgr_t *manager) {
                                                &manager->dwIOCPThreadIds[i]);
                if (manager->hIOCPThreads[i] == NULL) {
                        errval = GetLastError();
-                       isc__strerror(errval, strbuf, sizeof(strbuf));
+                       strerror_r(errval, strbuf, sizeof(strbuf));
                        FATAL_ERROR(__FILE__, __LINE__,
                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
                                ISC_MSG_FAILED,
@@ -517,7 +517,7 @@ iocompletionport_init(isc_socketmgr_t *manager) {
        hHeapHandle = HeapCreate(0, 10 * sizeof(IoCompletionInfo), 0);
        if (hHeapHandle == NULL) {
                errval = GetLastError();
-               isc__strerror(errval, strbuf, sizeof(strbuf));
+               strerror_r(errval, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
                            isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
                                           ISC_MSG_FAILED,
@@ -534,7 +534,7 @@ iocompletionport_init(isc_socketmgr_t *manager) {
                        0, manager->maxIOCPThreads);
        if (manager->hIoCompletionPort == NULL) {
                errval = GetLastError();
-               isc__strerror(errval, strbuf, sizeof(strbuf));
+               strerror_r(errval, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
                                ISC_MSG_FAILED,
@@ -565,7 +565,7 @@ iocompletionport_update(isc_socket_t *sock) {
 
        if (hiocp == NULL) {
                DWORD errval = GetLastError();
-               isc__strerror(errval, strbuf, sizeof(strbuf));
+               strerror_r(errval, strbuf, sizeof(strbuf));
                isc_log_iwrite(isc_lctx,
                                ISC_LOGCATEGORY_GENERAL,
                                ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
@@ -631,7 +631,7 @@ initialise(void) {
        err = WSAStartup(wVersionRequested, &wsaData);
        if (err != 0) {
                char strbuf[ISC_STRERRORSIZE];
-               isc__strerror(err, strbuf, sizeof(strbuf));
+               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"),
@@ -898,7 +898,7 @@ make_nonblock(SOCKET fd) {
        ret = ioctlsocket(fd, FIONBIO, &flags);
 
        if (ret == -1) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "ioctlsocket(%d, FIOBIO, %d): %s",
                                 fd, flags, strbuf);
@@ -1216,7 +1216,7 @@ map_socket_error(isc_socket_t *sock, int windows_errno, int *isc_errno,
                break;
        }
        if (doreturn == DOIO_HARD) {
-               isc__strerror(windows_errno, errorstring, bufsize);
+               strerror_r(windows_errno, errorstring, bufsize);
        }
        return (doreturn);
 }
@@ -1410,7 +1410,7 @@ startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
                 * If we got this far then something is wrong
                 */
                if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
-                       isc__strerror(*send_errno, strbuf, sizeof(strbuf));
+                       strerror_r(*send_errno, strbuf, sizeof(strbuf));
                        socket_log(__LINE__, sock, NULL, IOEVENT,
                                   isc_msgcat, ISC_MSGSET_SOCKET,
                                   ISC_MSG_INTERNALSEND,
@@ -1719,7 +1719,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
                        return (ISC_R_FAMILYNOSUPPORT);
 
                default:
-                       isc__strerror(socket_errno, strbuf, sizeof(strbuf));
+                       strerror_r(socket_errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "socket() %s: %s",
                                         isc_msgcat_get(isc_msgcat,
@@ -1757,7 +1757,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
                if ((pf == AF_INET6)
                    && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
                                   (char *)&on, sizeof(on)) < 0)) {
-                       isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
+                       strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_RECVPKTINFO) "
                                         "%s: %s", sock->fd,
@@ -1772,7 +1772,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
                if ((pf == AF_INET6)
                    && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO,
                                   (char *)&on, sizeof(on)) < 0)) {
-                       isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
+                       strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_PKTINFO) %s: %s",
                                         sock->fd,
@@ -2194,7 +2194,7 @@ internal_connect(isc_socket_t *sock, IoCompletionInfo *lpo, int connect_errno) {
 #undef ERROR_MATCH
                default:
                        result = ISC_R_UNEXPECTED;
-                       isc__strerror(connect_errno, strbuf, sizeof(strbuf));
+                       strerror_r(connect_errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "internal_connect: connect() %s",
                                         strbuf);
@@ -2486,7 +2486,7 @@ SocketIoThread(LPVOID ThreadContext) {
        if (!SetThreadPriority(GetCurrentThread(),
                               THREAD_PRIORITY_ABOVE_NORMAL)) {
                errval = GetLastError();
-               isc__strerror(errval, strbuf, sizeof(strbuf));
+               strerror_r(errval, strbuf, sizeof(strbuf));
                FATAL_ERROR(__FILE__, __LINE__,
                                isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
                                ISC_MSG_FAILED,
@@ -3281,7 +3281,7 @@ isc__socket_bind(isc_socket_t *sock, const isc_sockaddr_t *sockaddr,
                case WSAEINVAL:
                        return (ISC_R_BOUND);
                default:
-                       isc__strerror(bind_errno, strbuf, sizeof(strbuf));
+                       strerror_r(bind_errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__, "bind: %s",
                                         strbuf);
                        return (ISC_R_UNEXPECTED);
@@ -3344,7 +3344,7 @@ isc__socket_listen(isc_socket_t *sock, unsigned int backlog) {
 
        if (listen(sock->fd, (int)backlog) < 0) {
                UNLOCK(&sock->lock);
-               isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
+               strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
 
                UNEXPECTED_ERROR(__FILE__, __LINE__, "listen: %s", strbuf);
 
@@ -3354,7 +3354,7 @@ isc__socket_listen(isc_socket_t *sock, unsigned int backlog) {
 #if defined(ISC_PLATFORM_HAVETFO) && defined(TCP_FASTOPEN)
        if (setsockopt(sock->fd, IPPROTO_TCP, TCP_FASTOPEN,
                       &on, sizeof(on)) < 0) {
-               isc__strerror(errno, strbuf, sizeof(strbuf));
+               strerror_r(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, TCP_FASTOPEN) failed with %s",
                                 sock->fd, strbuf);
@@ -3546,7 +3546,7 @@ isc__socket_connect(isc_socket_t *sock, const isc_sockaddr_t *addr,
                        case WSAEINVAL:
                                return (ISC_R_BOUND);
                        default:
-                               isc__strerror(bind_errno, strbuf,
+                               strerror_r(bind_errno, strbuf,
                                              sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                 "bind: %s", strbuf);
@@ -3682,7 +3682,7 @@ isc__socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
 
        len = sizeof(addressp->type);
        if (getsockname(sock->fd, &addressp->type.sa, (void *)&len) < 0) {
-               isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
+               strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__, "getsockname: %s",
                                 strbuf);
                result = ISC_R_UNEXPECTED;
diff --git a/lib/isc/win32/strerror.c b/lib/isc/win32/strerror.c
deleted file mode 100644 (file)
index 36c9b79..0000000
+++ /dev/null
@@ -1,452 +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.
- */
-
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <winsock2.h>
-
-#include <isc/mutex.h>
-#include <isc/once.h>
-#include <isc/print.h>
-#include <isc/strerror.h>
-#include <isc/util.h>
-
-/*
- * Forward declarations
- */
-
-char *
-FormatError(int error);
-
-char *
-GetWSAErrorMessage(int errval);
-
-char *
-NTstrerror(int err, BOOL *bfreebuf);
-
-/*
- * We need to do this this way for profiled locks.
- */
-
-static isc_mutex_t isc_strerror_lock;
-static void init_lock(void) {
-       RUNTIME_CHECK(isc_mutex_init(&isc_strerror_lock) == ISC_R_SUCCESS);
-}
-
-/*
- * This routine needs to free up any buffer allocated by FormatMessage
- * if that routine gets used.
- */
-
-void
-isc__strerror(int num, char *buf, size_t size) {
-       char *msg;
-       BOOL freebuf;
-       unsigned int unum = num;
-       static isc_once_t once = ISC_ONCE_INIT;
-
-       REQUIRE(buf != NULL);
-
-       RUNTIME_CHECK(isc_once_do(&once, init_lock) == ISC_R_SUCCESS);
-
-       LOCK(&isc_strerror_lock);
-       freebuf = FALSE;
-       msg = NTstrerror(num, &freebuf);
-       if (msg != NULL)
-               snprintf(buf, size, "%s", msg);
-       else
-               snprintf(buf, size, "Unknown error: %u", unum);
-       if(freebuf && msg != NULL) {
-               LocalFree(msg);
-       }
-       UNLOCK(&isc_strerror_lock);
-}
-
-/*
- * Note this will cause a memory leak unless the memory allocated here
- * is freed by calling LocalFree.  isc__strerror does this before unlocking.
- * This only gets called if there is a system type of error and will likely
- * be an unusual event.
- */
-char *
-FormatError(int error) {
-       LPVOID lpMsgBuf = NULL;
-       FormatMessage(
-               FORMAT_MESSAGE_ALLOCATE_BUFFER |
-               FORMAT_MESSAGE_FROM_SYSTEM |
-               FORMAT_MESSAGE_IGNORE_INSERTS,
-               NULL,
-               error,
-               /* Default language */
-               MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-               (LPTSTR) &lpMsgBuf,
-               0,
-               NULL);
-
-       return (lpMsgBuf);
-}
-
-/*
- * This routine checks the error value and calls the WSA Windows Sockets
- * Error message function GetWSAErrorMessage below if it's within that range
- * since those messages are not available in the system error messages.
- */
-char *
-NTstrerror(int err, BOOL *bfreebuf) {
-       char *retmsg = NULL;
-
-       /* Copy the error value first in case of other errors */
-       DWORD errval = err;
-
-       *bfreebuf = FALSE;
-
-       /* Get the Winsock2 error messages */
-       if (errval >= WSABASEERR && errval <= (WSABASEERR + 1015)) {
-               retmsg = GetWSAErrorMessage(errval);
-               if (retmsg != NULL)
-                       return (retmsg);
-       }
-       /*
-        * If it's not one of the standard Unix error codes,
-        * try a system error message
-        */
-       if (errval > (DWORD) _sys_nerr) {
-               *bfreebuf = TRUE;
-               return (FormatError(errval));
-       } else {
-               return (strerror(errval));
-       }
-}
-
-/*
- * This is a replacement for perror
- */
-void __cdecl
-NTperror(char *errmsg) {
-       /* Copy the error value first in case of other errors */
-       int errval = errno;
-       BOOL bfreebuf = FALSE;
-       char *msg;
-
-       msg = NTstrerror(errval, &bfreebuf);
-       fprintf(stderr, "%s: %s\n", errmsg, msg);
-       if(bfreebuf == TRUE) {
-               LocalFree(msg);
-       }
-
-}
-
-/*
- * Return the error string related to Winsock2 errors.
- * This function is necessary since FormatMessage knows nothing about them
- * and there is no function to get them.
- */
-char *
-GetWSAErrorMessage(int errval) {
-       char *msg;
-
-       switch (errval) {
-
-       case WSAEINTR:
-               msg = "Interrupted system call";
-               break;
-
-       case WSAEBADF:
-               msg = "Bad file number";
-               break;
-
-       case WSAEACCES:
-               msg = "Permission denied";
-               break;
-
-       case WSAEFAULT:
-               msg = "Bad address";
-               break;
-
-       case WSAEINVAL:
-               msg = "Invalid argument";
-               break;
-
-       case WSAEMFILE:
-               msg = "Too many open sockets";
-               break;
-
-       case WSAEWOULDBLOCK:
-               msg = "Operation would block";
-               break;
-
-       case WSAEINPROGRESS:
-               msg = "Operation now in progress";
-               break;
-
-       case WSAEALREADY:
-               msg = "Operation already in progress";
-               break;
-
-       case WSAENOTSOCK:
-               msg = "Socket operation on non-socket";
-               break;
-
-       case WSAEDESTADDRREQ:
-               msg = "Destination address required";
-               break;
-
-       case WSAEMSGSIZE:
-               msg = "Message too long";
-               break;
-
-       case WSAEPROTOTYPE:
-               msg = "Protocol wrong type for socket";
-               break;
-
-       case WSAENOPROTOOPT:
-               msg = "Bad protocol option";
-               break;
-
-       case WSAEPROTONOSUPPORT:
-               msg = "Protocol not supported";
-               break;
-
-       case WSAESOCKTNOSUPPORT:
-               msg = "Socket type not supported";
-               break;
-
-       case WSAEOPNOTSUPP:
-               msg = "Operation not supported on socket";
-               break;
-
-       case WSAEPFNOSUPPORT:
-               msg = "Protocol family not supported";
-               break;
-
-       case WSAEAFNOSUPPORT:
-               msg = "Address family not supported";
-               break;
-
-       case WSAEADDRINUSE:
-               msg = "Address already in use";
-               break;
-
-       case WSAEADDRNOTAVAIL:
-               msg = "Can't assign requested address";
-               break;
-
-       case WSAENETDOWN:
-               msg = "Network is down";
-               break;
-
-       case WSAENETUNREACH:
-               msg = "Network is unreachable";
-               break;
-
-       case WSAENETRESET:
-               msg = "Net connection reset";
-               break;
-
-       case WSAECONNABORTED:
-               msg = "Software caused connection abort";
-               break;
-
-       case WSAECONNRESET:
-               msg = "Connection reset by peer";
-               break;
-
-       case WSAENOBUFS:
-               msg = "No buffer space available";
-               break;
-
-       case WSAEISCONN:
-               msg = "Socket is already connected";
-               break;
-
-       case WSAENOTCONN:
-               msg = "Socket is not connected";
-               break;
-
-       case WSAESHUTDOWN:
-               msg = "Can't send after socket shutdown";
-               break;
-
-       case WSAETOOMANYREFS:
-               msg = "Too many references: can't splice";
-               break;
-
-       case WSAETIMEDOUT:
-               msg = "Connection timed out";
-               break;
-
-       case WSAECONNREFUSED:
-               msg = "Connection refused";
-               break;
-
-       case WSAELOOP:
-               msg = "Too many levels of symbolic links";
-               break;
-
-       case WSAENAMETOOLONG:
-               msg = "File name too long";
-               break;
-
-       case WSAEHOSTDOWN:
-               msg = "Host is down";
-               break;
-
-       case WSAEHOSTUNREACH:
-               msg = "No route to host";
-               break;
-
-       case WSAENOTEMPTY:
-               msg = "Directory not empty";
-               break;
-
-       case WSAEPROCLIM:
-               msg = "Too many processes";
-               break;
-
-       case WSAEUSERS:
-               msg = "Too many users";
-               break;
-
-       case WSAEDQUOT:
-               msg = "Disc quota exceeded";
-               break;
-
-       case WSAESTALE:
-               msg = "Stale NFS file handle";
-               break;
-
-       case WSAEREMOTE:
-               msg = "Too many levels of remote in path";
-               break;
-
-       case WSASYSNOTREADY:
-               msg = "Network system is unavailable";
-               break;
-
-       case WSAVERNOTSUPPORTED:
-               msg = "Winsock version out of range";
-               break;
-
-       case WSANOTINITIALISED:
-               msg = "WSAStartup not yet called";
-               break;
-
-       case WSAEDISCON:
-               msg = "Graceful shutdown in progress";
-               break;
-/*
-       case WSAHOST_NOT_FOUND:
-               msg = "Host not found";
-               break;
-
-       case WSANO_DATA:
-               msg = "No host data of that type was found";
-               break;
-*/
-       default:
-               msg = NULL;
-               break;
-       }
-       return (msg);
-}
-
-/*
- * These error messages are more informative about CryptAPI Errors than the
- * standard error messages
- */
-
-char *
-GetCryptErrorMessage(int errval) {
-       char *msg;
-
-       switch (errval) {
-
-       case NTE_BAD_FLAGS:
-               msg = "The dwFlags parameter has an illegal value.";
-               break;
-       case NTE_BAD_KEYSET:
-               msg = "The Registry entry for the key container "
-                       "could not be opened and may not exist.";
-               break;
-       case NTE_BAD_KEYSET_PARAM:
-               msg = "The pszContainer or pszProvider parameter "
-                       "is set to an illegal value.";
-               break;
-       case NTE_BAD_PROV_TYPE:
-               msg = "The value of the dwProvType parameter is out "
-                       "of range. All provider types must be from "
-                       "1 to 999, inclusive.";
-               break;
-       case NTE_BAD_SIGNATURE:
-               msg = "The provider DLL signature did not verify "
-                       "correctly. Either the DLL or the digital "
-                       "signature has been tampered with.";
-               break;
-       case NTE_EXISTS:
-               msg = "The dwFlags parameter is CRYPT_NEWKEYSET, but the key"
-                     " container already exists.";
-               break;
-       case NTE_KEYSET_ENTRY_BAD:
-               msg = "The Registry entry for the pszContainer key container "
-                     "was found (in the HKEY_CURRENT_USER window), but is "
-                     "corrupt. See the section System Administration for "
-                     " etails about CryptoAPI's Registry usage.";
-               break;
-       case NTE_KEYSET_NOT_DEF:
-               msg = "No Registry entry exists in the HKEY_CURRENT_USER "
-                       "window for the key container specified by "
-                       "pszContainer.";
-               break;
-       case NTE_NO_MEMORY:
-               msg = "The CSP ran out of memory during the operation.";
-               break;
-       case NTE_PROV_DLL_NOT_FOUND:
-               msg = "The provider DLL file does not exist or is not on the "
-                     "current path.";
-               break;
-       case NTE_PROV_TYPE_ENTRY_BAD:
-               msg = "The Registry entry for the provider type specified by "
-                     "dwProvType is corrupt. This error may relate to "
-                     "either the user default CSP list or the machine "
-                     "default CSP list. See the section System "
-                     "Administration for details about CryptoAPI's "
-                     "Registry usage.";
-               break;
-       case NTE_PROV_TYPE_NO_MATCH:
-               msg = "The provider type specified by dwProvType does not "
-                     "match the provider type found in the Registry. Note "
-                     "that this error can only occur when pszProvider "
-                     "specifies an actual CSP name.";
-               break;
-       case NTE_PROV_TYPE_NOT_DEF:
-               msg = "No Registry entry exists for the provider type "
-                     "specified by dwProvType.";
-               break;
-       case NTE_PROVIDER_DLL_FAIL:
-               msg = "The provider DLL file could not be loaded, and "
-                     "may not exist. If it exists, then the file is "
-                     "not a valid DLL.";
-               break;
-       case NTE_SIGNATURE_FILE_BAD:
-               msg = "An error occurred while loading the DLL file image, "
-                     "prior to verifying its signature.";
-               break;
-
-       default:
-               msg = NULL;
-               break;
-       }
-       return msg;
-}
-
index a5a915e4579eb9c39300a0b7eaf85413121490f8..a77958d087fb2ba0672e1a0d52b7984344de837b 100644 (file)
 ./lib/isc/unix/include/isc/offset.h            C       2000,2001,2004,2005,2007,2008,2016,2018
 ./lib/isc/unix/include/isc/stat.h              C       2004,2007,2014,2016,2018
 ./lib/isc/unix/include/isc/stdtime.h           C       1999,2000,2001,2004,2005,2007,2011,2012,2016,2018
-./lib/isc/unix/include/isc/strerror.h          C       2001,2004,2005,2007,2008,2016,2018
 ./lib/isc/unix/include/isc/syslog.h            C       1999,2000,2001,2004,2005,2007,2016,2018
 ./lib/isc/unix/include/isc/time.h              C       1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2012,2014,2015,2016,2017,2018
 ./lib/isc/unix/include/pkcs11/cryptoki.h       X       2014,2018
 ./lib/isc/unix/socket_p.h                      C       2000,2001,2004,2005,2007,2008,2009,2016,2018
 ./lib/isc/unix/stdio.c                         C       2000,2001,2004,2007,2011,2012,2013,2014,2016,2018
 ./lib/isc/unix/stdtime.c                       C       1999,2000,2001,2004,2005,2007,2016,2018
-./lib/isc/unix/strerror.c                      C       2001,2004,2005,2007,2009,2016,2018
 ./lib/isc/unix/syslog.c                                C       2001,2004,2005,2007,2016,2018
 ./lib/isc/unix/time.c                          C       1998,1999,2000,2001,2003,2004,2005,2006,2007,2008,2011,2012,2014,2015,2016,2017,2018
 ./lib/isc/version.c                            C       1998,1999,2000,2001,2004,2005,2007,2016,2018
 ./lib/isc/win32/include/isc/platform.h.in      C       2001,2004,2005,2007,2008,2009,2013,2014,2015,2016,2017,2018
 ./lib/isc/win32/include/isc/stat.h             C       2000,2001,2003,2004,2007,2009,2012,2016,2018
 ./lib/isc/win32/include/isc/stdtime.h          C       1999,2000,2001,2004,2005,2007,2011,2012,2016,2018
-./lib/isc/win32/include/isc/strerror.h         C       2001,2004,2007,2016,2018
 ./lib/isc/win32/include/isc/syslog.h           C       1999,2000,2001,2004,2007,2016,2018
 ./lib/isc/win32/include/isc/thread.h           C       1998,1999,2000,2001,2004,2005,2007,2009,2013,2016,2017,2018
 ./lib/isc/win32/include/isc/time.h             C       1998,1999,2000,2001,2004,2006,2007,2008,2009,2012,2014,2015,2016,2017,2018
 ./lib/isc/win32/socket.c                       C       2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018
 ./lib/isc/win32/stdio.c                                C       2000,2001,2004,2007,2013,2016,2018
 ./lib/isc/win32/stdtime.c                      C       1999,2000,2001,2004,2007,2013,2016,2018
-./lib/isc/win32/strerror.c                     C       2001,2002,2004,2007,2016,2018
 ./lib/isc/win32/syslog.c                       C       2001,2002,2003,2004,2007,2014,2016,2018
 ./lib/isc/win32/syslog.h                       C       2001,2002,2004,2007,2016,2018
 ./lib/isc/win32/thread.c                       C       1998,1999,2000,2001,2004,2005,2007,2016,2017,2018