when loading all locale categories (called with LC_ALL), ignore if
loadlocale() fails - since only LC_CTYPE is implemented and all other categories return error, code never got to actually load the ctype locales, as first category tried was LC_COLLATE and it always failed
This commit is contained in:
parent
7c714abab4
commit
9fc25cf0bc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: setlocale.c,v 1.16 1998/11/13 15:49:04 christos Exp $ */
|
||||
/* $NetBSD: setlocale.c,v 1.17 1999/10/15 17:17:07 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -41,7 +41,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)setlocale.c 8.1 (Berkeley) 7/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: setlocale.c,v 1.16 1998/11/13 15:49:04 christos Exp $");
|
||||
__RCSID("$NetBSD: setlocale.c,v 1.17 1999/10/15 17:17:07 jdolecek Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -183,8 +183,7 @@ setlocale(category, locale)
|
|||
return (loadlocale(category));
|
||||
|
||||
for (i = 1; i < _LC_LAST; ++i)
|
||||
if (loadlocale(i) == NULL)
|
||||
return (NULL);
|
||||
(void) loadlocale(i);
|
||||
|
||||
return (currentlocale());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue