This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mbstate_t bug still around


I'm using cygwin v1.3.15 under Win2K

CYGWIN_NT-5.0 NAME 1.3.15(0.63/3/2) 2002-11-07 13:57 i686 unknown

My cygcheck.txt is attached.

I tried to compile the following simple code "Sample.cpp"

----------------------------------------------------------------------------
#include <iostream>
#include <wchar.h>

using namespace std;

int main()
{
  cout << "Hello world." << endl;
}
----------------------------------------------------------------------------

using "g++ -v -Wall Sample.cpp" with the following result (sorry for the
ugly wrap-around):

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with:
/netrel/src/gcc-3.2-1/configure --enable-languages=c,c++,f77,ja
va --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --
with
out-included-gettext --enable-interpreter --disable-sjlj-exceptions --disabl
e-ve
rsion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i68
6-pc
-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/
usr
--sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libe
xecd
ir=/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)

/usr/lib/gcc-lib/i686-pc-cygwin/3.2/cc1plus.exe -v -D__GNUC__=3 -D__GNUC_MIN
OR_
_=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D_X86_=1 -D_X86_=1 -Asy
stem
=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 
-D__
i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D__tune_pentium2__ -D
__tu
ne_pentium3__ -D__stdcall=__attribute__((__stdcall__)) -D__fastcall=__attrib
ute_
_((__fastcall__)) -D__cdecl=__attribute__((__cdecl__)) -D_stdcall=__attribut
e__(
(__stdcall__)) -D_fastcall=__attribute__((__fastcall__)) -D_cdecl=__attribut
e__(
(__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i386__ -D__i386 -D__CYGW
IN32
__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -isystem
/usr/lib/gcc-lib/i686-pc-cyg
win/3.2/../../../../include/w32api -isystem
/usr/local/lib/../../include/w32api
Sample.cpp -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase
Sample.cp
p -Wall -version -o /cygdrive/c/DOCUME~3/pete/LOCALS~1/Temp/cc9f9WXP.s
GNU CPP version 3.2 20020818 (prerelease) (cpplib) (80386, BSD syntax)
GNU C++ version 3.2 20020818 (prerelease) (i686-pc-cygwin)
        compiled by GNU C version 3.2 20020815 (prerelease).
ignoring nonexistent directory "/usr/i686-pc-cygwin/include"
ignoring duplicate directory "/usr/include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/w32api
 /usr/include/c++/3.2
 /usr/include/c++/3.2/i686-pc-cygwin
 /usr/include/c++/3.2/backward
 /usr/local/include
 /usr/lib/gcc-lib/i686-pc-cygwin/3.2/include
 /usr/include
End of search list.
In file included from Sample.cpp:2:
/usr/include/wchar.h:38: conflicting types for `typedef struct _mbstate_t
   mbstate_t'
/usr/include/c++/3.2/cwchar:65: previous declaration as `typedef struct
   mbstate_t mbstate_t'


I realize this has been discussed before and  Xavier Pianet had a fix that
was partially implemented (proper _BEGIN_STD_C and _END_STD_C added to
wchar.h and wctype.h), but the other changes he suggested for
/usr/include/c++/3.2/i686-pc-cygwin/bits/c++config.h seem like they might be
fixed by building gcc with different configure options. A reference to his
message follows:

http://sources.redhat.com/ml/cygwin/2002-10/msg01933.html

I also notice Christopher Faylor mentioned a new cygwin release would be
needed to fix this

http://sources.redhat.com/ml/cygwin/2002-08/msg01505.html

and that release has fixed the wchar.h and wctype.h issues, but I still
think a newly configured gcc is needed.

It looks like the compiler was configured using (g++ -v):

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with:
/netrel/src/gcc-3.2-1/configure
--enable-languages=c,c++,f77,java
--enable-libgcj
--enable-threads=posix
--with-system-zlib
--enable-nls
--without-included-gettext
--enable-interpreter
--disable-sjlj-exceptions
--disable-version-specific-runtime-libs
--enable-shared
--build=i686-pc-linux
--host=i686-pc-cygwin
--target=i686-pc-cygwin
--enable-haifa
--prefix=/usr
--exec-prefix=/usr
--sysconfdir=/etc
--libdir=/usr/lib
--includedir=/nonexistent/include
--libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)

Christopher, I would be willing to attempt another gcc 3.2-1 build, but what
option do I need to tell gcc about the existence of the wchar.h files etc.
that Xavier fixed by hand commenting the c++config.h file?

Is this the case, or do some headers really need manual modification?

Just trying to help,
Pete

Attachment: cygcheck.txt
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]