Risc/6000 uname -m and cpp predefined identifiers

Ronald S. Woan ron at woan
Tue Sep 11 01:01:58 AEST 1990


In article <1990Sep9.221247.12662 at caen.engin.umich.edu>,
wross at engin.umich.edu (Wendy Ross) writes:
Wendy> uname -m
Wendy> on any DecStation 5000 yields: MIPS
Wendy> on any Sun yields: sun3 sun4 sun4c, etc.
Wendy> on any Apollo DN3500 yields: DN3500
Wendy>                  
Wendy> on any RS/6000 yields a number which is unique to the machine
Wendy> (corresponds to a chip number was the rumor)
Wendy>     
Wendy> Is there an alternate command under AIX3 which is analogous to
Wendy> what is normally expected from uname -m?
Wendy> Mere curiosity also prompts me to wonder why this was done in
Wendy> the first place?

I don't know, but AIX2.2.1/RT also did this and I know that the
processor id number on the RT was used for software copyprotection in
some commercial products.

Wendy> Anyhow, the second question is regarding cpp: Are there any
Wendy> predefined identifiers that (either) cpp will recognize, so
Wendy> that I can #ifdef code specific to the architecture without
Wendy> have to cc -D<some identifier>?

Take a look at /etc/xlc.cfg for what is automatically defined at
compile time for the different compiler invocations (xlc, cc). It
seems you may want to use _AIX and _IBMR2 for AIX 3.1 specific code.

					Ron

+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan           woan at peyote.cactus.org or woan at soda.berkeley.edu +
+ other email addresses             Prodigy: XTCR74A Compuserve: 73530,2537 +



More information about the Comp.unix.aix mailing list