diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-08 21:59:32 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-08 21:59:32 +0000 |
| commit | bca3f8bbf18ca164327eeb4540c29b7b99c72d88 (patch) | |
| tree | f6b6b128369843298e7c17f4c1d39af5c911e02e /libjava | |
| parent | 8d48f5b33041f141c110f551fc04d8964cda95bd (diff) | |
| download | ppe42-gcc-bca3f8bbf18ca164327eeb4540c29b7b99c72d88.tar.gz ppe42-gcc-bca3f8bbf18ca164327eeb4540c29b7b99c72d88.zip | |
For PR libgcj/5031:
* java/lang/natSystem.cc (init_properties): Use LC_MESSAGES to
choose default locale.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48664 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/ChangeLog | 4 | ||||
| -rw-r--r-- | libjava/java/lang/natSystem.cc | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7fb1e54d508..aa91329b712 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,9 @@ 2002-01-08 Tom Tromey <tromey@redhat.com> + For PR libgcj/5031: + * java/lang/natSystem.cc (init_properties): Use LC_MESSAGES to + choose default locale. + * Makefile.in: Rebuilt. * Makefile.am (jv_convert_LDADD): Removed convert_source_files. diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc index f970ee64de5..8f06538d396 100644 --- a/libjava/java/lang/natSystem.cc +++ b/libjava/java/lang/natSystem.cc @@ -415,7 +415,12 @@ java::lang::System::init_properties (void) // Set user locale properties based on setlocale() #ifdef HAVE_SETLOCALE - char *locale = setlocale (LC_ALL, ""); + // 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. + setlocale (LC_ALL, ""); + char *locale = setlocale (LC_MESSAGES, ""); if (locale && strlen (locale) >= 2) { char buf[3]; |

