Commit 58fae3f7 by Craig Rodrigues

re PR java/5080 (gcc/java/jcf-parse.c:908: `LC_CTYPE' undeclared (first use in this function))

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.

From-SVN: r49410
parent 3a441e38
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> 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
* gjavah.c (version), jcf-dump.c (version), jv-scan.c (version): * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
......
...@@ -911,13 +911,11 @@ parse_source_file_1 (file, finput) ...@@ -911,13 +911,11 @@ parse_source_file_1 (file, finput)
/* There's no point in trying to find the current encoding unless we /* There's no point in trying to find the current encoding unless we
are going to do something intelligent with it -- hence the test are going to do something intelligent with it -- hence the test
for iconv. */ for iconv. */
#ifdef HAVE_ICONV #if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO)
#ifdef HAVE_NL_LANGINFO
setlocale (LC_CTYPE, ""); setlocale (LC_CTYPE, "");
if (current_encoding == NULL) if (current_encoding == NULL)
current_encoding = nl_langinfo (CODESET); current_encoding = nl_langinfo (CODESET);
#endif /* HAVE_NL_LANGINFO */ #endif
#endif /* HAVE_ICONV */
if (current_encoding == NULL || *current_encoding == '\0') if (current_encoding == NULL || *current_encoding == '\0')
current_encoding = DEFAULT_ENCODING; current_encoding = DEFAULT_ENCODING;
......
...@@ -199,13 +199,11 @@ DEFUN (main, (argc, argv), ...@@ -199,13 +199,11 @@ DEFUN (main, (argc, argv),
/* There's no point in trying to find the current encoding /* There's no point in trying to find the current encoding
unless we are going to do something intelligent with it unless we are going to do something intelligent with it
-- hence the test for iconv. */ -- hence the test for iconv. */
#ifdef HAVE_ICONV #if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO)
#ifdef HAVE_NL_LANGINFO
setlocale (LC_CTYPE, ""); setlocale (LC_CTYPE, "");
if (encoding == NULL) if (encoding == NULL)
encoding = nl_langinfo (CODESET); encoding = nl_langinfo (CODESET);
#endif /* HAVE_NL_LANGINFO */ #endif
#endif /* HAVE_ICONV */
if (encoding == NULL || *encoding == '\0') if (encoding == NULL || *encoding == '\0')
encoding = DEFAULT_ENCODING; encoding = DEFAULT_ENCODING;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment