summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strerror_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/strerror_r.c')
-rw-r--r--lib/libc/string/strerror_r.c24
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;
}