Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Feb 1996 12:59:04 -0700
From:      Warner Losh <imp@village.org>
To:        Heikki Suonsivu <hsu@clinet.fi>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Another Pentium gcc patch, -D__FreeBSD__=2 -Dbsd4_4 
Message-ID:  <199602041959.MAA14828@rover.village.org>
In-Reply-To: Your message of Sun, 04 Feb 1996 09:25:20 MST

next in thread | raw e-mail | index | archive | help
: : All this is completely broken, BSD systems should converge, not further
: : split up, as splitting up means disappearing into noise generated by Linux
: : and big commercial ones.
: 
: FreeBSD can't do it alone.  Not can we do it w/o the cooperation of
: all the BSD systems out there.

I was a bit harsh on my initial reply.  I found the wording
incredibaly offensive to me because I have spent the last several
years porting different software to different platforms.  I found it
insanely arrogant for you to presume to know what platforms that I
have used, so I reacted with much bile.  My applogies if it was a bit
much.

BSD does have a standard way of doing things.  It is relatively easy
to do.  Most, if not all, of the Unix platforms provide sys/param.h.
It is easy to have code that looks like

#ifdef unix
#include <sys/param.h>
#endif
#ifdef BSD4_4
/* Do blah
#endif

"unix" is defined on all the BSD systems that I'm aware of.  In the
commercial porting I've done (both OI and later TIA), on all systems
where it is defined, sys/param.h was present.  We were able to use
this to bring OI to the Windows NT API (well, the Win32 flavour de
jour) because it didn't define unix.  Unix typically isn't defined on
platforms that aren't unixlike enough to have sys/param.h.  Heck, VMS
even has this include (but it doesn't define unix, typically).  If you
want, I'll give you a list of all the platforms that OI and/or TIA has
been ported to, and they both use this trick.

It is too late to do anything "standard" with "one true define" for
BSD systems because there are too many of them.  There are those built
by Sun, HP (kinda), FreeBSD, NetBSD, OpenBSD, Digitial, etc.  Most of
them are, at this point, legacy systems that cannot change.
Unless/until you can get a consensus amount the various flavors of BSD
that exist today, a single "one true flag" will not happen.  Also, all
of the *BSD people don't have congruent goals.  The {Net,Open}BSD
people want to have their system on as many different disparate
platforms as possible and have gone to great lengths to do that.
FreeBSD has traditionally been a i386 only platform.  Over time, the
goals of the groups are changing...  It is likely too late to get all
of these folk, plus BSDi, to agree to something that isn't in BSD 4.4
lite.

bsd4_4 is defined, in gcc at least, only on the mips-dec-bsd platform
and nowhere else.

Since there are some FreeBSD isms that do need the __FreeBSD__ for
various things, it is the right way to do this.

Again, sorry for the excess bile in hackers...

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602041959.MAA14828>