#define __need_XXX patch suggestion

Nick Burrett nick at dsvr.net
Fri Feb 15 02:43:55 PST 2002


John Tytgat <John.Tytgat at aaug.net> writes:

> In message <07ae27084b.Tony at mk-net.demon.co.uk>
>           Tony van der Hoff <tony at mk-net.demon.co.uk> wrote:
> 
> > On 13 Feb 2002, in message <m3wuxhacur.fsf at nick.ws.noc.dsvr.net>,
> > Nick Burrett <nick at dsvr.net> wrote:
> > 
> > > I'm all for getting warnings fixed, but when it drastically reduces
> > > the readability of the header files, then I'm not so happy.
> 
> Unfortunately we can't make macro's for that, can we ? ;-(

Thinking about it some more, we shouldn't be getting multiple __need_XXX
warnings because the header files should #undef the macro once it is
defined.

Can you send me an example where this is not the case ?
 
> For this last problem, would people agree to add the following at the top of
> features.h for those poor Norcroft users ;-) ?
> 
> #ifdef __CC_NORCROFT
> #ifndef __STDC_VERSION__
> # define __STDC_VERSION__	199409L
> #endif
> #ifndef _XOPEN_SOURCE
> # define _XOPEN_SOURCE		500
> #endif
> #ifndef _FILE_OFFSET_BITS
> # define _FILE_OFFSET_BITS	32
> #endif
> #ifndef __GNUC__
> # define __GNUC__		0
> #endif
> #endif

This sounds reasonable.  I'll add this later.

Nick.



More information about the gcc mailing list