Issues with stdio.h

Eric Blake eblake@redhat.com
Mon Feb 20 23:05:00 GMT 2012


On 02/20/2012 03:58 PM, Thomas Wolff wrote:
>> Wrong.  GNU/Linux does this too.  On my Fedora machine,
>>
>> $ printf '#include<stddef.h>\n#include<stdio.h>\n' | gcc -E -\
>>     |grep '^# 1 "/'
...
>> # 1 "/usr/lib/gcc/x86_64-redhat-linux/4.6.2/include/stddef.h" 1 3 4
>> # 1 "/usr/include/wchar.h" 1 3 4
>> # 1 "/usr/lib/gcc/x86_64-redhat-linux/4.6.2/include/stdarg.h" 1 3 4

> 
> As I interpret this, stddef.h - containing those constants - is the only
> file with this setup, so be it.

Reading the trace I posted above, it is not just <stddef.h>, but also at
least <stdarg.h>, and probably others, too.

> (I had actually checked on a SunOS system.)

SunOS isn't GNU/Linux, so it is less relevant to how cygwin behaves
(since cygwin is striving to be a Linux emulation, not a POSIX
emulation).  Not to mention that using gcc on SunOS _also_ prefers to
translate <stddef.h> to a gcc-specific directory, rather than
/usr/include/stddef.h, since gcc relies on aspects that are specific to
the gcc compiler, while /usr/include/stddef.h is tied to the system's
own 'cc' that doesn't understand gcc extensions.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120220/2dc2b224/attachment.sig>


More information about the Cygwin mailing list