This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

Re: cygwin 1.5.24-2 gcc 3.4.4 stdio.h


Hi Jeff,

On Nov 30 13:39, Jeff Johnston wrote:
> Paul Edwards wrote:
>> Dave Korn wrote...
>>>> "-ansi" is meant to mask all the Posix stuff and just provide pure ANSI 
>>>> C89
>>>> headers. 
>>>  Agreed.  I don't know if it's a goal of newlib to support strict C89
>>> conformance or not, 
>> It's not a C compiler if it fails to even conform to the C89 standard.
>>> but I don't see how it could hurt to add a few #ifndef
>>> __STRICT_ANSI__ here and there.
>> They're already there in fact, just not accurate.  It's a bug, basically.
>> It probably used to work and someone broke it.
>>  
>
> A Cygwin change added a number of the _POSIX flags inside sys/features.h.  
> This could easily be modified to have a check for strict C89 ANSI in it.
>
> I have attached a proposed patch.  Any comments from the Cygwin folks?

If it's generally correct to guard the _POSIX_xxx flags with a
!__STRICT_ANSI__, shouldn't this guard surround all definitions
instead of only the ones for Cygwin?

However, I don't think that it is actually correct because the
_POSIX_xxx flags should always be defined to be able to check for OS
features.  I'm rather curious why the `#ifndef __STRICT_ANSI__', which
guards all of sys/signal.h except the signal names, has been commented
out once.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


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