[comp.unix.aix] AIX/RS6000 cpp defined names

jim@applix.com (Jim Morton) (03/29/90)

>>I'd like to know the cpp names for the new IBM RISC/6000 machines. Example:
>>
>>#if defined(sun) || defined(alliant) || defined(???)
>>#endif
>>I need to port some packages (example, ncar graphics 3.0)
>>to the IBM RISC/6000 machines.

Is there a /etc/cc.cfg file in AIX 3 in the RS/6000? If so, it should
have the default -D options listed. Can someone who has one of these
animals check this and let us know? (AIX/RT has -Daiws and -DAIX).
--
Jim Morton, APPLiX Inc., Westboro, MA
...uunet!applix!jim    jim@applix.com

bengsig@oracle.nl (Bjorn Engsig) (03/29/90)

Article <1041@applix.com> by jim@applix.com (Jim Morton) says:
|
|Is there a /etc/cc.cfg file in AIX 3 in the RS/6000? If so, it should
|have the default -D options listed.
The file is /etc/xlc.cfg and it has -D_IBMR2,-D_AIX.
-- 
Bjorn Engsig,	Domain:		bengsig@oracle.nl, bengsig@oracle.com
		Path:		uunet!mcsun!orcenl!bengsig

marc@stingray..austin.ibm.com (Marc J. Stephenson/140000;1C-22) (03/29/90)

In article <1041@applix.com> jim@applix.com (Jim Morton) writes:
>>>I'd like to know the cpp names for the new IBM RISC/6000 machines. Example:
>>>#if defined(sun) || defined(alliant) || defined(???)
>>>#endif
>Is there a /etc/cc.cfg file in AIX 3 in the RS/6000? If so, it should
>have the default -D options listed. Can someone who has one of these
>animals check this and let us know? (AIX/RT has -Daiws and -DAIX).

The /etc/xlc.cfg file has -D_IBMR2 defined along with -D_AIX.
If one compiles with the ANSI version (xlc) rather than the extended
version (cc), then -D_ANSI_C_SOURCE gets added as well.  I believe that
the preceding '_' characters are courtesy of some standards committee.

Anyway, _IBMR2 is your answer; I suppose that it's subject to change before
the code ships, but I doubt it because we've got it all over our source
code (and in a few system include files as well).

Marc Stephenson (marc@stingray.austin.ibm.com)
DISCLAIMER: The content of this posting is independent of official IBM position.
External: uunet!cs.utexas.edu!ibmaus!auschs!stingray.austin.ibm.com!marc
Internal: marc@stingray.austin.ibm.com 	VNET: MARC at AUSVM6  T/L: 793-3796