Date: Thu, 1 Feb 96 8:35:18 MET From: Greg Lehey <lehey.pad@sni.de> To: pst@cisco.com (Paul Traina) Cc: hackers@FreeBSD.org, ports@FreeBSD.org Subject: Re: Another Pentium gcc patch, -D__FreeBSD__=2 -Dbsd4_4 Message-ID: <199602010739.IAA25593@nixpbe.pdb.sni.de> In-Reply-To: <199601312138.NAA21667@puli.cisco.com>; from "Paul Traina" at Jan 31, 96 1:38 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <sys/param.h> > #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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602010739.IAA25593>