From 7d503466fb85d355e25d5b1aa06ad8f9818a07fa Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 3 Feb 2003 13:57:15 +0000 Subject: [PATCH] Fix for java/4269: 2003-01-31 Adrian Bunk Fix for java/4269: * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO to fix bootstrap on sparc-unknown-netbsdelf1.5. * jcf-parse.c: Likewise. From-SVN: r62310 --- gcc/java/ChangeLog | 8 ++++++++ gcc/java/jcf-parse.c | 4 ++-- gcc/java/jv-scan.c | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index bb360c0..3343824 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2003-01-31 Adrian Bunk + + Fix for java/4269: + + * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO + to fix bootstrap on sparc-unknown-netbsdelf1.5. + * jcf-parse.c: Likewise. + 2003-01-31 Mark Wielaard * gjavah.c (throwable_p): Allocate 1 more byte for string. diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 20dc3ff..ac4757c 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -47,7 +47,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include #endif -#ifdef HAVE_NL_LANGINFO +#ifdef HAVE_LANGINFO_CODESET #include #endif @@ -802,7 +802,7 @@ parse_source_file_1 (tree file, 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. */ -#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO) +#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_LANGINFO_CODESET) setlocale (LC_CTYPE, ""); if (current_encoding == NULL) current_encoding = nl_langinfo (CODESET); diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c index 90e16e7..e1bc572 100644 --- a/gcc/java/jv-scan.c +++ b/gcc/java/jv-scan.c @@ -33,7 +33,7 @@ Boston, MA 02111-1307, USA. */ #include #endif -#ifdef HAVE_NL_LANGINFO +#ifdef HAVE_LANGINFO_CODESET #include #endif @@ -205,7 +205,7 @@ main (int argc, char **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. */ -#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO) +#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_LANGINFO_CODESET) setlocale (LC_CTYPE, ""); if (encoding == NULL) encoding = nl_langinfo (CODESET); -- 2.7.4