_BSD_SOURCE vs. __BSD_VISIBLE

Archie Cobbs archie at dellroad.org
Mon Mar 22 07:34:59 PST 2004


Bruce Evans wrote:
> > Q1: Why does Linux require _BSD_SOURCE but FreeBSD requires __BSD_VISIBLE?
> 
> Linux apparently requires _BSD_SOURCE to give BSD extensions.  This is
> a bug in Linux.  The BSD extensions are better of course :-), and feature
> tests macros should generally restrict, not enable extensions.  I think
> Linux does this because some BSD extensions are incompatible.

Thanks to all for the clarifications on this question. Problem is now
resolved, in that now for my application FreeBSD compilations requires
no flags, while on Linux _BSD_SOURCE is required.

Knowing that Linux, rather than FreeBSD, requires the special hack
to compile correctly is more consistent with my existing world view :-)

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com


More information about the freebsd-standards mailing list