Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!awdprime!woan!ron From: ron@woan (Ronald S. Woan) Newsgroups: comp.unix.aix Subject: Re: Risc/6000 uname -m and cpp predefined identifiers Keywords: RS/6000 uname cpp Message-ID: <3448@awdprime.UUCP> Date: 10 Sep 90 15:01:58 GMT References: <1990Sep9.221247.12662@caen.engin.umich.edu> Sender: news@awdprime.UUCP Reply-To: woan@peyote.cactus.org Followup-To: comp.unix.aix Distribution: na Organization: Austin School of Hardknocks Lines: 34 In article <1990Sep9.221247.12662@caen.engin.umich.edu>, wross@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? 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@peyote.cactus.org or woan@soda.berkeley.edu + + other email addresses Prodigy: XTCR74A Compuserve: 73530,2537 +