HP3000-L Archives

November 1997, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Klein <[log in to unmask]>
Reply To:
Mark Klein <[log in to unmask]>
Date:
Tue, 11 Nov 1997 19:49:51 PST
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
> > >Is there any nice (i.e. predefined) macro that I can use to detect
> > >the compiler being used (like #ifdef _GNU)?
> >
> > gcc uses __GNUC__. I don't know if there is a unique macro for HP/C.
>
> HP C/iX defines __hp3000s900

Ooops! gcc also defines __hp3000s900. Here are the standard defines
automatically set by gcc:

-D__GNUC__=2 -D__GNUC_MINOR__=7 -Dhppa -Dhp3000s900 -D__hp3000s900
-Dhp3k9 -DPWB -Dmpeix -D_POSIX_SOURCE -D__hppa__ -D__hp3k9__ -D__PWB__
-D__mpeix__ -D__hppa -D__hp3000s900 -D__hp3k9 -D__PWB -D__mpeix

Oh, and while I'm at it, gcc uses the following search hierarchy to
resolve include files:

GNU CPP version 2.7.2.2 (hppa)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/hppa1.0-hp-mpeix/include
 /usr/local/lib/gcc-lib/hppa1.0-hp-mpeix/2.7.2/include
 /usr/include


>Both noted and now appearing in the FAQ, section 6.12.5. "Porting Tips for
>POSIX applications".

               -Chris Bartram

ATOM RSS1 RSS2