mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
Ignore ENABLE_NLS when deciding whether we can use setlocale().
Use the same shortcut as glibc to test for the "C" or "POSIX" locale.
This commit is contained in:
parent
903ac7c219
commit
1188285e9b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131560
@ -15,6 +15,8 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* $FreeBSD$ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
@ -51,7 +53,7 @@ char *alloca ();
|
||||
int
|
||||
hard_locale (int category)
|
||||
{
|
||||
#if ! (defined ENABLE_NLS && HAVE_SETLOCALE)
|
||||
#if ! HAVE_SETLOCALE
|
||||
return 0;
|
||||
#else
|
||||
|
||||
@ -60,7 +62,7 @@ hard_locale (int category)
|
||||
|
||||
if (p)
|
||||
{
|
||||
# if defined __GLIBC__ && __GLIBC__ >= 2
|
||||
# if defined(__FreeBSD__) || (defined __GLIBC__ && __GLIBC__ >= 2)
|
||||
if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
|
||||
hard = 0;
|
||||
# else
|
||||
|
Loading…
Reference in New Issue
Block a user