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]

conflicting types for `typedef struct mbstate_t`(was link troubles with wcslen)


Hi there

It seems there is a pb in some include files in cygwin1.3.13/1.3.14+gcc3.2

1) first of all /usr/include/wchar.h lacks of _BEGIN_STD_C ... _END_STD_C
in function declarations. (same goes for wctypes.h)
adding them solved the link problem i had with 'wcslen' in previous post
(thanks to Shankar for the pointer)

2) including <cwchar> and <wchar.h> generates a conflicting type
for struct mbstate_t because it is defined both in <sys/_types.h>
included from <wchar.h> and <cwchar>

I found a way to solve thoses pbs but i'm not sure this is the right way:

added the _BEGIN_STD_C / _END_STD_C in wchar.h and wctypes.h
modified /usr/include/c++/3.2/i686-pc-cygwin/bits/c++config.h the following
way:
// line 115 added
#define _GLIBCPP_HAVE_MBSTATE_T 1
// line 824 added
#define _GLIBCPP_HAVE_WCHAR_H 1
// line 828 added
#define _GLIBCPP_HAVE_WCTYPE_H 1

there is one more flag i didn't set but still wonder whether or not i
should do it (line 114)
// Define if code specialized for wchar_t should be used.
/* #undef _GLIBCPP_USE_WCHAR_T */


System used :
/home> uname -a
CYGWIN_NT-5.0 TEMPO7 1.3.13(0.62/3/2) 2002-10-13 23:15 i686 unknown
(same pbs with a 1.3.14-1)
/home> gcc -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,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)


Xavier


--
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]