From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11093 invoked by alias); 27 Jan 2003 18:06:06 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 11036 invoked by uid 71); 27 Jan 2003 18:06:05 -0000 Date: Mon, 27 Jan 2003 18:06:00 -0000 Message-ID: <20030127180605.11030.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Adrian Bunk Subject: Re: bootstrap/4269: [sparc-unknown-netbsdeld1.5] HAVE_NL_LANGINFO doesn't ensure that CODESET is available Reply-To: Adrian Bunk X-SW-Source: 2003-01/txt/msg01526.txt.bz2 List-Id: The following reply was made to PR bootstrap/4269; it has been noted by GNATS. From: Adrian Bunk To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: bootstrap/4269: [sparc-unknown-netbsdeld1.5] HAVE_NL_LANGINFO doesn't ensure that CODESET is available Date: Mon, 27 Jan 2003 18:56:46 +0100 On Thu, Nov 21, 2002 at 02:44:28PM -0000, bangerth@dealii.org wrote: > Synopsis: [sparc-unknown-netbsdeld1.5] HAVE_NL_LANGINFO doesn't ensure that CODESET is available > > State-Changed-From-To: feedback->analyzed > State-Changed-By: bangerth > State-Changed-When: Thu Nov 21 06:44:27 2002 > State-Changed-Why: > Problem still exists as of Nov 21, 2002. > > You already have pointed out the autoconf snippet that is > necessary. Would you mind submitting a patch to > gcc-patches@gcc.gnu.org that uses it? In gcc head HAVE_LANGINFO_CODESET is already defined resp. undefined in gcc/auto-host.h. I don't know that much about the gcc build system, could you check whether the patch below looks correct? > W. > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4269 cu Adrian *** gcc/java/jv-scan.c.old Mon Jan 27 00:51:14 2003 --- gcc/java/jv-scan.c Mon Jan 27 00:51:34 2003 *************** *** 33,39 **** #include #endif ! #ifdef HAVE_NL_LANGINFO #include #endif --- 33,39 ---- #include #endif ! #ifdef HAVE_LANGINFO_CODESET #include #endif *************** *** 205,211 **** /* 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) setlocale (LC_CTYPE, ""); if (encoding == NULL) encoding = nl_langinfo (CODESET); --- 205,211 ---- /* 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_LANGINFO_CODESET) setlocale (LC_CTYPE, ""); if (encoding == NULL) encoding = nl_langinfo (CODESET); *** gcc/java/jcf-parse.c.old Mon Jan 27 00:50:17 2003 --- gcc/java/jcf-parse.c Mon Jan 27 00:50:46 2003 *************** *** 47,53 **** #include #endif ! #ifdef HAVE_NL_LANGINFO #include #endif --- 47,53 ---- #include #endif ! #ifdef HAVE_LANGINFO_CODESET #include #endif *************** *** 798,804 **** /* 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) setlocale (LC_CTYPE, ""); if (current_encoding == NULL) current_encoding = nl_langinfo (CODESET); --- 798,804 ---- /* 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_LANGINFO_CODESET) setlocale (LC_CTYPE, ""); if (current_encoding == NULL) current_encoding = nl_langinfo (CODESET);