Subject: Re: Solaris like __EXTENSIONS__ ?
To: Ben Harris <>
From: Jason Thorpe <>
List: tech-userlevel
Date: 04/21/2003 08:50:14
On Monday, April 21, 2003, at 08:14  AM, Ben Harris wrote:

> For avoidance of doubt, here's what I'd propose putting into
> <sys/featuretest.h>, after the current check for _POSIX_SOURCE:
> #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
>     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
> #define _NETBSD_SOURCE 1
> #endif

I like your proposal.  We could also put compatibility-with-other-OS's 
checks into <sys/featuretest.h> using the same type of algorithm, e.g. 
if __EXTENSIONS__ is defined by an application (because it does so on 
Solaris), define _NETBSD_SOURCE=1.  This could make application porting 

         -- Jason R. Thorpe <>