Date: Thu, 16 Mar 1995 14:04:21 -0500 From: Garrett Wollman <wollman@halloran-eldar.lcs.mit.edu> To: Heikki Suonsivu <hsu@clinet.fi> Cc: freebsd-bugs@freefall.cdrom.com Subject: gnu/246: Compiler doesn't define anything to determinate bsd 4.4 origin Message-ID: <9503161904.AA21721@halloran-eldar.lcs.mit.edu> In-Reply-To: <199503161830.KAA18731@freefall.cdrom.com> References: <199503161827.UAA25477@katiska.clinet.fi> <199503161830.KAA18731@freefall.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 16 Mar 1995 10:30:02 -0800, Heikki Suonsivu <hsu@clinet.fi> said: > bsd or bsd4_4 or anything should be defined by C compiler. Currently > there is nothing but unix, i386 and FreeBSD, which forces #ifdef > FreeBSD clutter even when the program only needs generic BSD features, > nothing specific to FreeBSD. This is intentional. The correct way to find out is: #include <sys/param.h> #if BSD >= 199103 /* Net/2 stuff */ #elif BSD >= 199306 /* 4.4 stuff */ #elif defined(BSD) && BSD < 100 /* 4.2/4.3 stuff */ #endif -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503161904.AA21721>