summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2015-11-05 23:38:07 +0000
committerbluhm <bluhm@openbsd.org>2015-11-05 23:38:07 +0000
commit9eb35f143cc942372a2224d8bc18d6f3c8516cad (patch)
tree367deee677df18c85e99bf7c56960e3f9548c5ad /lib/libc
parentSame bug as last commit, but in the other copy of the loop in this file... (diff)
downloadwireguard-openbsd-9eb35f143cc942372a2224d8bc18d6f3c8516cad.tar.xz
wireguard-openbsd-9eb35f143cc942372a2224d8bc18d6f3c8516cad.zip
After removing National Language Support (NLS) from base, stop
creating the directory /usr/share/nls. Having a non-existing default path in catopen(3) does not make sense, so remove it. If the user does not specify a NLS path, better fail early than fail because of an empty directory. Remove path form hier(7). OK stsp@ schwarze@ jmc@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/nls/catopen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/nls/catopen.c b/lib/libc/nls/catopen.c
index 3c47d098477..1ca1a95170c 100644
--- a/lib/libc/nls/catopen.c
+++ b/lib/libc/nls/catopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: catopen.c,v 1.18 2015/10/23 18:49:07 tobias Exp $ */
+/* $OpenBSD: catopen.c,v 1.19 2015/11/05 23:38:07 bluhm Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -43,7 +43,6 @@
#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
-#define NLS_DEFAULT_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%l.%c/%N.cat:/usr/share/nls/%l/%N.cat"
#define NLS_DEFAULT_LANG "C"
static nl_catd load_msgcat(const char *);
@@ -67,7 +66,7 @@ catopen(const char *name, int oflag)
return load_msgcat(name);
if (issetugid() != 0 || (nlspath = getenv("NLSPATH")) == NULL)
- nlspath = NLS_DEFAULT_PATH;
+ return (nl_catd) -1;
lang = NULL;
if (oflag & NL_CAT_LOCALE) {