From owner-freebsd-bugs Thu Mar 16 11:05:31 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id LAA23432 for bugs-outgoing; Thu, 16 Mar 1995 11:05:31 -0800 Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id LAA23426 for ; Thu, 16 Mar 1995 11:05:29 -0800 Received: by halloran-eldar.lcs.mit.edu; id AA21721; Thu, 16 Mar 1995 14:04:21 -0500 Date: Thu, 16 Mar 1995 14:04:21 -0500 From: Garrett Wollman Message-Id: <9503161904.AA21721@halloran-eldar.lcs.mit.edu> To: Heikki Suonsivu Cc: freebsd-bugs@freefall.cdrom.com Subject: gnu/246: Compiler doesn't define anything to determinate bsd 4.4 origin In-Reply-To: <199503161830.KAA18731@freefall.cdrom.com> References: <199503161827.UAA25477@katiska.clinet.fi> <199503161830.KAA18731@freefall.cdrom.com> Sender: bugs-owner@FreeBSD.org Precedence: bulk < 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 #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