From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 931 invoked by alias); 3 Jul 2002 17:13:26 -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 871 invoked by uid 61); 3 Jul 2002 17:13:24 -0000 Date: Wed, 03 Jul 2002 10:13:00 -0000 Message-ID: <20020703171324.870.qmail@sources.redhat.com> To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, matt@pilot.local, nobody@gcc.gnu.org From: bkoz@gcc.gnu.org Reply-To: bkoz@gcc.gnu.org, bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, matt@pilot.local, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/7097: _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems X-SW-Source: 2002-07/txt/msg00114.txt.bz2 List-Id: Synopsis: _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems Responsible-Changed-From-To: unassigned->bkoz Responsible-Changed-By: bkoz Responsible-Changed-When: Wed Jul 3 10:13:23 2002 Responsible-Changed-Why: Mine. State-Changed-From-To: open->feedback State-Changed-By: bkoz State-Changed-When: Wed Jul 3 10:13:23 2002 State-Changed-Why: I'm surprised that you are using --enable-cheaders=c. Please provide more details on how you got this working for NetBSD. It is not a supported default configuration, although it does work for some targets (newlib crosses, perhaps QNX.) In any case, this patch below should do the trick. If it doesn't, you'll have to add more description to your bug report, including compiler error, sample code that goes wrong, and includes used... -benjamin 2002-07-03 Benjamin Kosnik PR libstdc++/7097 * include/c/std_cwchar.h: Fix. Index: include/c/std_cwchar.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cwchar.h,v retrieving revision 1.5 diff -c -p -r1.5 std_cwchar.h *** include/c/std_cwchar.h 21 Jun 2002 20:20:41 -0000 1.5 --- include/c/std_cwchar.h 3 Jul 2002 17:11:43 -0000 *************** *** 47,64 **** // Need to do a bit of trickery here with mbstate_t as char_traits // assumes it is in wchar.h, regardless of wchar_t specializations. #ifndef _GLIBCPP_HAVE_MBSTATE_T ! extern "C" { ! typedef struct { ! int __fill[6]; ! } mbstate_t; } #endif - - namespace std - { - using ::mbstate_t; - } #endif --- 47,62 ---- // Need to do a bit of trickery here with mbstate_t as char_traits // assumes it is in wchar.h, regardless of wchar_t specializations. #ifndef _GLIBCPP_HAVE_MBSTATE_T ! namespace std { ! extern "C" { ! typedef struct ! { ! int __fill[6]; ! } mbstate_t; ! } } #endif #endif http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7097