diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-11 23:00:58 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-11 23:00:58 +0000 |
| commit | 64f1dfea44460eb60d5b6e60283c71c0516646a7 (patch) | |
| tree | 1d139542491b284e8c2d967e32d05338ecf6ae5c /libjava/java | |
| parent | 78eda2706a601f82d8ad4d01e8af4ab90733bb2a (diff) | |
| download | ppe42-gcc-64f1dfea44460eb60d5b6e60283c71c0516646a7.tar.gz ppe42-gcc-64f1dfea44460eb60d5b6e60283c71c0516646a7.zip | |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48781 138bc75d-0d04-0410-961f-82ee72b054a4
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 8f06538d396..e4c328c443c 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"); |

