diff options
author | Tom Tromey <tromey@redhat.com> | 2002-01-11 23:00:58 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-01-11 23:00:58 +0000 |
commit | 999825b056332cd0487e8078f869eae9b066d27a (patch) | |
tree | 1d139542491b284e8c2d967e32d05338ecf6ae5c /libjava/java | |
parent | 3e92902c7e34bd561ceb94757b13152d443a2454 (diff) | |
download | gcc-999825b056332cd0487e8078f869eae9b066d27a.zip gcc-999825b056332cd0487e8078f869eae9b066d27a.tar.gz gcc-999825b056332cd0487e8078f869eae9b066d27a.tar.bz2 |
natSystem.cc (init_properties): Only look for default locale if LC_MESSAGES is defined.
* java/lang/natSystem.cc (init_properties): Only look for default
locale if LC_MESSAGES is defined.
* aclocal.m4, configure, include/config.h.in: Rebuilt.
* configure.in: Call AM_LC_MESSAGES.
* acinclude.m4 (AM_LC_MESSAGES): New macro.
From-SVN: r48781
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/natSystem.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc index 8f06538..e4c328c 100644 --- a/libjava/java/lang/natSystem.cc +++ b/libjava/java/lang/natSystem.cc @@ -414,11 +414,12 @@ java::lang::System::init_properties (void) #endif /* HAVE_GETCWD */ // Set user locale properties based on setlocale() -#ifdef HAVE_SETLOCALE +#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) // We let the user choose the locale. However, since Java differs // from POSIX, we arbitrarily pick LC_MESSAGES as determining the // Java locale. We can't use LC_ALL because it might return a full - // list of all the settings. + // list of all the settings. If we don't have LC_MESSAGES then we + // just default to `en_US'. setlocale (LC_ALL, ""); char *locale = setlocale (LC_MESSAGES, ""); if (locale && strlen (locale) >= 2) @@ -438,7 +439,7 @@ java::lang::System::init_properties (void) } } else -#endif /* HAVE_SETLOCALE */ +#endif /* HAVE_SETLOCALE and HAVE_LC_MESSAGES */ { SET ("user.language", "en"); SET ("user.region", "US"); |