diff options
author | 2015-10-25 10:22:09 +0000 | |
---|---|---|
committer | 2015-10-25 10:22:09 +0000 | |
commit | a842d2067e48cb221cc63e9bbd12094e880e5954 (patch) | |
tree | 83028843034b1737be28a2f4a808fb57341cbf35 /lib/libc/string/strerror_r.c | |
parent | Use 'fdisk -i', instead of 'fdisk -e' with a here document of (diff) | |
download | wireguard-openbsd-a842d2067e48cb221cc63e9bbd12094e880e5954.tar.xz wireguard-openbsd-a842d2067e48cb221cc63e9bbd12094e880e5954.zip |
The only thing that was translated into multiple languages in OpenBSD
are the errno messages and signal names. Everything else is in
English. We are not planning to translate more text. Running a
mixed system with less than 1% of the text in native language makes
no sense. So remove the NLS support from libc messages. The
catopen(3) functions stay as they are.
OK stsp@ mpi@
Diffstat (limited to 'lib/libc/string/strerror_r.c')
-rw-r--r-- | lib/libc/string/strerror_r.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/libc/string/strerror_r.c b/lib/libc/string/strerror_r.c index 8a15ff1afc4..53f5d6bda40 100644 --- a/lib/libc/string/strerror_r.c +++ b/lib/libc/string/strerror_r.c @@ -1,10 +1,6 @@ -/* $OpenBSD: strerror_r.c,v 1.11 2015/09/06 20:26:20 guenther Exp $ */ +/* $OpenBSD: strerror_r.c,v 1.12 2015/10/25 10:22:09 bluhm Exp $ */ /* Public Domain <marc@snafu.org> */ -#ifdef NLS -#include <nl_types.h> -#endif - #include <errno.h> #include <limits.h> #include <signal.h> @@ -66,26 +62,12 @@ __num2string(int num, int sign, int setid, char *buf, size_t buflen, int ret = 0; size_t len; -#ifdef NLS - nl_catd catd; - catd = catopen("libc", NL_CAT_LOCALE); -#endif - if (0 <= num && num < max) { -#ifdef NLS - len = strlcpy(buf, catgets(catd, setid, num, list[num]), - buflen); -#else len = strlcpy(buf, list[num], buflen); -#endif if (len >= buflen) ret = ERANGE; } else { -#ifdef NLS - len = strlcpy(buf, catgets(catd, setid, 0xffff, def), buflen); -#else len = strlcpy(buf, def, buflen); -#endif if (len >= buflen) ret = ERANGE; else { @@ -95,10 +77,6 @@ __num2string(int num, int sign, int setid, char *buf, size_t buflen, } } -#ifdef NLS - catclose(catd); -#endif - return ret; } |