#defines for AIX versions & h/w architectures
jsalter at slo
jsalter at slo
Wed Oct 10 11:14:57 AEST 1990
>From: Jon Crowcroft <J.Crowcroft at uk.ac.ucl.cs>
>what predefineds (e.g. is cpp called with any by cc)
>exist for writing sensible
>#ifdef
>to make code conditionally portable over AIX
>on PS/2, RS6000 and aix370 on a 3090?
For AIX PS/2 (/etc/cc.cfg), AIX/370 (man cc.cfg) and AIX v3.1 6000
(/etc/xlc.cfg), the following define exists across all platforms:
_AIX
To indicate differences between them, AIX PS/2 defines (/etc/cc.cfg):
_I386
AIX/370 defines (according to: man cc.cfg):
u370
and the 6000 defines (/etc/xlc.cfg):
_IBMR2
Thus, you can tell the different AIX versions apart by the defines.
>(or does some sensible standard system header have a #define...?)
Well, on the 6000 the attempt at satisfying lots of standards has
occured making the header files full of #ifdefs as this has the least
impact on the system. The common standards required are in the header
file: /usr/include/standards.h
In AIX/PS2, /etc/cc.cfg contains a line for the posix standard which
should help with compilation to that standard. There are also flags
for ANSI compliance for both the 6000 XL C compiler and AIX/370 (man cc).
(Yes, I know this isn't the answer you were looking for, I just thought
I'd clarify a few things.)
>jon
jim/jsalter IBM AWD, Palo Alto T465/(415)855-4427 VNET: JSALTER at AUSVMQ
Internet: ibmsupt!jsalter at uunet.uu.net UUCP: ..!uunet!ibmsupt!jsalter
"Waco is a state of mind. Once you've gone there,
you never come back" - Leo
More information about the Comp.unix.aix
mailing list