Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 2004 22:50:43 -0500 (EST)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Archie Cobbs <archie@dellroad.org>
Cc:        freebsd-standards@FreeBSD.ORG
Subject:   Re: _BSD_SOURCE vs. __BSD_VISIBLE
Message-ID:  <200403210350.i2L3ohKf044840@khavrinen.lcs.mit.edu>
In-Reply-To: <200403182331.i2INVSIb005180@arch20m.dellroad.org>
References:  <200403182307.i2IN7403029016@khavrinen.lcs.mit.edu> <200403182331.i2INVSIb005180@arch20m.dellroad.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 18 Mar 2004 17:31:28 -0600 (CST), Archie Cobbs <archie@dellroad.org> said:

> I want everything.. on Linux I need at least _GNU_SOURCE to get it,
> otherwise my compilation fails due to undeclared stuff. Why did Linux
> choose to arrange things so that the "default" is to not show everything?
> Don't just say they made a "bad decision".. they must have had some
> rationale, even if flawed.

Perhaps you should ask a Linux developer that question.  I can hardly
speak for them.

By my reading of the standard, if the application defines
_POSIX_C_SOURCE to a recognized value, then any system header files
included *must not* declare any symbols outside the namespaces
reserved in the Standard for those header files.  (If the application
defines _POSIX_C_SOURCE and then includes a non-Standard system header
file, all bets are off, and in many cases compilation will and ought
to break.)

If an application defines a macro in the implementation name space,
then the compiler is free to compile the module as an implementation
of `system("rogue");'.

-GAWollman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403210350.i2L3ohKf044840>