From owner-freebsd-hackers Wed Jan 31 23:40:15 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA02727 for hackers-outgoing; Wed, 31 Jan 1996 23:40:15 -0800 (PST) Received: from nixpbe.pdb.sni.de (mail.sni.de [192.109.2.33]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id XAA02680 for ; Wed, 31 Jan 1996 23:40:06 -0800 (PST) Received: (from nerv@localhost) by nixpbe.pdb.sni.de (8.6.12/8.6.12) id IAA25589 for hackers@FreeBSD.org; Thu, 1 Feb 1996 08:39:23 +0100 Message-Id: <199602010739.IAA25589@nixpbe.pdb.sni.de> Subject: Re: Another Pentium gcc patch, -D__FreeBSD__=2 -Dbsd4_4 To: pst@cisco.com (Paul Traina) Date: Thu, 1 Feb 96 8:35:18 MET From: Greg Lehey Cc: hackers@FreeBSD.org, ports@FreeBSD.org In-Reply-To: <199601312138.NAA21667@puli.cisco.com>; from "Paul Traina" at Jan 31, 96 1:38 pm X-Mailer: xmail 2.4 (based on ELM 2.2 PL16) Sender: owner-hackers@FreeBSD.org Precedence: bulk > > I don't think our current gcc defines bsd4_4, I'm certain it shouldn't. :-) > There's a well defined way to find out what version of the OS you're running > under. > > #ifdef _HAVE_PARAM_H > #include > #endif > > #if defined(BSD) && (BSD >= datecode) > ... > #endif > > This gives us much finer grained control. How does this distinguish between BSD/OS, NetBSD and FreeBSD? How does it distinguish between FreeBSD 2.1 and FreeBSD 2.2? What this really tells you is what version of the compiler or header files you have. I think that the gcc *should* define bsd4_4 (or similar). There's plenty of software out there which doesn't care which 4.4BSD-derived system you're running, and this would help, just like __386bsd__ used to be useful. Greg