cygwin 1.5.24-2 gcc 3.4.4 stdio.h
Jeff Johnston
jjohnstn@redhat.com
Fri Nov 30 20:21:00 GMT 2007
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?
>>
> However, this one I had no answer for:
>
> sys/signal.h has:
>
> /* #ifndef __STRICT_ANSI__*/
>
> #if defined(_POSIX_THREADS)
> #include <sys/types.h> /* for pthread data types */
> #endif
>
> So it obviously used to be set up to handle ANSI, but it was replace with
> this _POSIX_THREADS. I could reverse that change, but I don't know
> whether that is the right thing to do. Alternatively I could stop the various
> files from including feature.h which is what defines that _POSIX_THREADS.
>
The proposal above should fix this problem.
-- Jeff J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: features.h.patch
Type: text/x-patch
Size: 806 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20071130/edb72d71/attachment.bin>
More information about the Newlib
mailing list