From 58fae3f7aee5e36101ccc5818872462a72ba01c9 Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Fri, 1 Feb 2002 21:07:31 +0000 Subject: re PR java/5080 (gcc/java/jcf-parse.c:908: `LC_CTYPE' undeclared (first use in this function)) 2002-02-01 Craig Rodrigues 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 --- gcc/java/jv-scan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gcc/java/jv-scan.c') diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c index 343655e..2f7c3b9 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; -- cgit v1.1