From 095da41d5c40b18f47f3a1a5d002f58a5d4848de Mon Sep 17 00:00:00 2001 From: bluhm <> Date: Sun, 25 Oct 2015 10:22:09 +0000 Subject: 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@ --- src/lib/libc/string/strerror_r.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/lib/libc/string/strerror_r.c') diff --git a/src/lib/libc/string/strerror_r.c b/src/lib/libc/string/strerror_r.c index 8a15ff1afc..53f5d6bda4 100644 --- a/src/lib/libc/string/strerror_r.c +++ b/src/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 */ -#ifdef NLS -#include -#endif - #include #include #include @@ -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; } -- cgit v1.2.3-55-g6feb