__STRICT_ANSI__ and stdio.h

KIMURA Masaru hiyuh.root@gmail.com
Mon Dec 14 17:17:00 GMT 2015


Hi,

>> is cygwin's __STRICT_ANSI__ and stdio.h behavior not so compatible to glibc's?
>
> Cygwin is using newlib, newlib is BSD based.  We introduced the
> compatibility checking macros from FreeBSD lately.

i roughly checked FreeBSD include/stdio.h and sys/sys/cdefs.h.
https://github.com/freebsd/freebsd/blob/master/include/stdio.h
https://github.com/freebsd/freebsd/blob/master/sys/sys/cdefs.h

it looks very different to newlib's.
FreeBSD has visibility for popen()/pclose() if __POSIX_VISIBLE >= 199209,
it looks no checking about __STRICT_ANSI__ in their cdefs.h.
only one thing i worried about is _ANSI_SOURCE in their cdefs.h,
(b/c i don't understand where _ANSI_SOURCE comes from...)
but it looks _POSIX_C_SOURCE wins anyway.
for ease to see, i'd attach simplified their cdefs.h for their
visibility handling.

anyway, IIUC, newlib's behavior in regard this point looks not
equivalent to FreeBSD's...

Peace,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdefs.h
Type: text/x-chdr
Size: 1960 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20151214/831ab78a/attachment.bin>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list