*BSD News Article 5310


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!uunet!cs.utexas.edu!uwm.edu!ogicse!pdxgate!parsely!percy!percival.rain.com!nerd
From: nerd@percival.rain.com (Michael Galassi)
Newsgroups: comp.unix.bsd
Subject: Re: 386bsd Predefines
Keywords: #define
Message-ID: <Buv4yv.7JA@percy.rain.com>
Date: 20 Sep 92 06:06:31 GMT
Article-I.D.: percy.Buv4yv.7JA
References: <1992Sep17.222113.24378@mnemosyne.cs.du.edu>
Sender: news@percy.rain.com (News maintainer)
Organization: Percy's mach, Portland, OR
Lines: 17
Nntp-Posting-Host: percival.rain.com

jlwright@nyx.cs.du.edu (Jason Wright) writes:

>Is there a predefined macro in gcc strictly for 386bsd. Eg.
>   i386 for general Intel 386 Machines (this is too general though)

There are two, __386BSD__ and ___386BSD___.  You can always find out what
is defined on a given gnu compiler with [g]cc -v x.c where x.c is some
file that does not exist.  I, for example, get:

/usr/libexec/cpp -v -undef -D__GNUC__ -Dunix -Di386 -D__386BSD__ \
-D__unix__ -D__i386__ -D____386BSD____ x.c /tmp/cc000620.cpp
(I added the '\' character and split what was one line)
as the cpp command line.  Hope that is what you wanted.

-michael
-- 
Michael Galassi -- nerd@percival.rain.com