diff options
| author | rodrigc <rodrigc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-01 21:07:31 +0000 |
|---|---|---|
| committer | rodrigc <rodrigc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-01 21:07:31 +0000 |
| commit | acc11af04fcd43b9f7273342eec4da009802072e (patch) | |
| tree | 9237fa455523e9004465ee3b4cf2af0fadc1ea0b /gcc | |
| parent | db248273d7681e28f402d04bf750fbab2c9b31aa (diff) | |
| download | ppe42-gcc-acc11af04fcd43b9f7273342eec4da009802072e.tar.gz ppe42-gcc-acc11af04fcd43b9f7273342eec4da009802072e.zip | |
2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR java/5080
* jcf-parse.c : Check for HAVE_LOCALE_H before using
setlocale() with LC_CTYPE as a parameter.
* jv-scan.c: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49410 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/java/jcf-parse.c | 6 | ||||
| -rw-r--r-- | gcc/java/jv-scan.c | 6 |
3 files changed, 11 insertions, 8 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index a4fec0936cb..f80ca1ed144 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org> + + PR java/5080 + * jcf-parse.c : Check for HAVE_LOCALE_H before using + setlocale() with LC_CTYPE as a parameter. + * jv-scan.c: Same. + 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk> * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version): diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index ff5bf05f6df..3e3bd236507 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -911,13 +911,11 @@ parse_source_file_1 (file, finput) /* There's no point in trying to find the current encoding unless we are going to do something intelligent with it -- hence the test for iconv. */ -#ifdef HAVE_ICONV -#ifdef HAVE_NL_LANGINFO +#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO) setlocale (LC_CTYPE, ""); if (current_encoding == NULL) current_encoding = nl_langinfo (CODESET); -#endif /* HAVE_NL_LANGINFO */ -#endif /* HAVE_ICONV */ +#endif if (current_encoding == NULL || *current_encoding == '\0') current_encoding = DEFAULT_ENCODING; diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c index 343655e5c90..2f7c3b9a6db 100644 --- a/gcc/java/jv-scan.c +++ b/gcc/java/jv-scan.c @@ -199,13 +199,11 @@ DEFUN (main, (argc, argv), /* There's no point in trying to find the current encoding unless we are going to do something intelligent with it -- hence the test for iconv. */ -#ifdef HAVE_ICONV -#ifdef HAVE_NL_LANGINFO +#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO) setlocale (LC_CTYPE, ""); if (encoding == NULL) encoding = nl_langinfo (CODESET); -#endif /* HAVE_NL_LANGINFO */ -#endif /* HAVE_ICONV */ +#endif if (encoding == NULL || *encoding == '\0') encoding = DEFAULT_ENCODING; |

