This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: Build failure on sysv5uw7.1.0: wchar_t typedefs in headers.



> Found this in gcc/fixinc/inclhack.def.  Wonder why this did this not fix
> the problem?

> /*
>  *  For C++, avoid any typedef definition of wchar_t,
>  *  and use the built in type instead.
>  */

> fix = {
>     hackname = avoid_wchar_t_type;

>     select    = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";

>     c_fix     = format;
>     c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";

>     test_text = "typedef unsigned short\twchar_t \t; /* wchar_t\n type
> */";
> };

> Roger Collins wrote:

> > Porting to Unixware 2.1, I encountered the same problem.  What did you
> > do to fix it?

The Unixware targets are still using the fixinc.svr4 shell script, not the
new C program. I tried just switching Unixware 7 over to using the
fixincl.sh script but found that the changes to introduce __STRICT_ANSI__
were required. inclhack.def has an #ifdef STRICT_ANSI that may suffice,
but I haven't pursued it (& need to check the uw7 usage matches the
patterns).
Your advice would be welcome Bruce, should we try to hack in the
avoid_wchar_t_type change into fixincl.svr4 or have a varient
routine that builds the C program with -DSTRICT_ANSI to get the SVR4
__STRICT_ANSI__ edifice in? Do we need autogen to do so?

Rodney Brown

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