public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/7097: _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems
@ 2002-07-03 10:13 bkoz
  0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2002-07-03 10:13 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, matt, nobody

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  <bkoz@redhat.com>
    
    	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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libstdc++/7097: _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems
@ 2002-07-27 15:01 bkoz
  0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2002-07-27 15:01 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, matt

Synopsis: _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems

State-Changed-From-To: feedback->closed
State-Changed-By: bkoz
State-Changed-When: Sat Jul 27 15:01:39 2002
State-Changed-Why:
    Fixed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7097


^ permalink raw reply	[flat|nested] 3+ messages in thread

* libstdc++/7097: _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems
@ 2002-06-21  8:06 Matt Thomas
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Thomas @ 2002-06-21  8:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7097
>Category:       libstdc++
>Synopsis:       _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 21 07:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Matt Thomas
>Release:        3.2 20020619 (experimental)
>Organization:
>Environment:
System: NetBSD pilot.local 1.5ZC NetBSD 1.5ZC (PILOT) #59: Sat May 18 12:43:46 PDT 2002 matt@pilot.local:/export/i386/kobj/PILOT i386


	
host: i386-unknown-netbsdelf1.5ZC
build: i386-unknown-netbsdelf1.5ZC
target: vax-dec-netbsdelf
configured with: /export/toolchain/gcc/configure --enable-static --disable-shared --target=vax-netbsdelf
>Description:
	The following change (and its related changes) prevents libstdc++
	from being built on NetBSD since NetBSD does not use GLIBC but does
	define its own mbstate_t.  Thus mbstate_t defined typedefed twice
	and libstdc++ fails to build.

libstdc++-v3/include/c/std_cwchar.h
revision 1.4
date: 2002/06/19 15:19:39;  author: bkoz;  state: Exp;  lines: +21 -0

2002-06-18  Benjamin Kosnik  <bkoz@redhat.com>

        * include/c/std_cwchar.h: Guard. Add mbstate_t bits.
        * include/c/std_cwctype.h: Guard.

        * libsupc++/eh_alloc.cc: Tweak include order.
        * libsupc++/pure.cc: Use cstdio.
        * libsupc++/new_op.cc: Remove malloc forward declaration, as
        cstdlib brings it in. Use std::malloc.

        * src/Makefile.am (sources): Remove cmath.cc.
        * src/Makefile.in: Regenerate.
        * src/cmath.cc: Remove.
----------------------------

>How-To-Repeat:
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-27 22:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-03 10:13 libstdc++/7097: _GLIBCPP_HAVE_MBSTATE_T breaks non-GLIB systems bkoz
  -- strict thread matches above, loose matches on Subject: below --
2002-07-27 15:01 bkoz
2002-06-21  8:06 Matt Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).