This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __WCHAR_TYPE__ and friends (was Re: OpenBSD tester wanted (fixincludes patch))
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: Bruce Korb <bkorb at veritas dot com>, gcc at gcc dot gnu dot org
- Date: 12 Jul 2003 19:17:42 +0200
- Subject: Re: __WCHAR_TYPE__ and friends (was Re: OpenBSD tester wanted (fixincludes patch))
- Organization: Integrable Solutions
- References: <20030712012948.GA26877@doctormoo> <3F103723.D29B7245@veritas.com><3F1038CB.4090708@twcny.rr.com>
Nathanael Nerode <neroden@twcny.rr.com> writes:
| Bruce Korb wrote:
| >>Partly because I'm not sure exactly what the gnu_types fix *does*. :-)
| >>Bruce, any help?
| > glibc pulls specific types out of particular header files.
| ^^^^^
| So is this fix at all relevant to the BSDs? Or do you mean GCC?
|
| > To accomplish this once and only once during a compile,
| > a bunch of #include wizardry is used to protect specific
| > definitions. e.g. replace:
| >
| >>typedef int wchar_t;
| > with:
| >
| >>#if !defined(_GCC_WCHAR_T) && ! defined(__cplusplus)
| >>#define _GCC_WCHAR_T
| >>typedef __WCHAR_TYPE__ wchar_t;
| >>#endif
|
| Does this *work*? Where is __WCHAR_TYPE__ defined, and how do we
| guarantee that it's defined when this is hit in the include file?
__WCHAR_TYPE__ is a CPP built-in. See gcc/doc/cpp.texi.
-- Gaby