How to Include Headers for siginterrupt() and vsnprintf()
John Baldwin
jhb at freebsd.org
Thu May 20 13:33:16 UTC 2010
On Thursday 20 May 2010 7:33:52 am Gabor PALI wrote:
> Hi,
>
> On 05/19/10 15:15, John Baldwin wrote:
> > What do they do to hide the prototypes? Do they set a specific version of
> > POSIX or ISO C that they wish to use? Probably the code should not be
doing
> > that
>
> There is a file (rts/PosixSource.h) which does this:
>
> #define _POSIX_SOURCE 1
> #define _POSIX_C_SOURCE 199506L
> #define _XOPEN_SOURCE 500
> #define _ISOC99_SOURCE
>
>
> The comment in the file says: "Include this file into sources which
> should not need any non-Posix services. That includes most RTS C sources."
Ok, well their code is broken. They claim they only use POSIX interfaces from
a certain date and those are older than vsnprintf().
Ah, so we do not honor _ISOC99_SOURCE in <sys/cdefs.h> Instead, the POSIX
version they specify implies C90.
Looks like this is just busted code given this thread:
http://www.mail-archive.com/freebsd-current@freebsd.org/msg53882.html
If they want C99, then they should use POSIX 2001, not 1995.
--
John Baldwin
More information about the freebsd-hackers
mailing list