Solaris 10: wchar_iso.h vs cwchar
Maciej Bliziński
maciej@opencsw.org
Fri Sep 2 08:02:00 GMT 2011
Hello,
While attempting to build PPL on Solaris 10 with gcc-4.6.1, I
encountered a problem. The first error looks like this:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.6.1/../../../../include/c++/4.6.1/cwchar:214:35:
error: 'wchar_t* std::wcschr(wchar_t*, wchar_t)' conflicts with
previous using declaration 'wchar_t* wcschr(wchar_t*, wchar_t)'
>From the following errors, it looks like there's a disagreement
between these two header files:
/usr/include/iso/wchar_iso.h
/opt/csw/include/c++/4.6.1/cwchar
The Solaris header says:
#if __cplusplus >= 199711L
(...)
#else /* __cplusplus >= 199711L */
extern wchar_t *wcschr(const wchar_t *, wchar_t);
(...)
#endif /* __cplusplus >= 199711L */
while the GCC header:
#ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO
inline wchar_t*
wcschr(wchar_t* __p, wchar_t __c)
{ return wcschr(const_cast<const wchar_t*>(__p), __c); }
(...)
#endif
Here's the complete log with all the error messages:
http://netra.chopin.edu.pl/~maciej/ppl-config.log
The previous version of GCC that I tested was 4.3.3, and this problem
was not present there. I think it might have to do with
fixincludes/inclhack.def line 1615, but I have little idea how to test
or fix it. Do you have any advice?
Maciej
More information about the Gcc-help
mailing list