correct #define in source to specify FBSD vs. linux?

Chuck Swiger cswiger at mac.com
Fri May 9 18:03:25 UTC 2008


On May 9, 2008, at 10:56 AM, Steve Franks wrote:
> On and on I charge porting linux engineering tools.  Major pita.  I
> see a bunch of #ifdef __APPLE__ lines to pull in alternate headers;
> what's the equiv for FreeBSD?

__FreeBSD__

You might find the output of "touch foo.h ; cpp -dM fooo.h"  
interesting...

-- 
-Chuck



More information about the freebsd-questions mailing list