🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.rt
Article #508

RT-specific cpp Flag?

#508
From: D. Jason Penney
Date: Thu, 26 Oct 1989 15:12
28 lines
1504 bytes
We have some code that is heavily ported (over half a dozen systems).  One
of our tricks is to recognize pre-defined preprocessor symbols and to use those
to indicate the given hardware/os platform that the code is running on.  A
few examples might suffice:

VMS -- DEC VAX/VMS (Note: SYS$GETSYI can subsequently return much more specific info)
sun -- Sun Microsystems
  mc68020 -- Sun-3
  sparc   -- Sun-4
  sun386  -- Sun 386i RoadRunner
ultrix -- DEC Ultrix
  mips -- DECstation
  vax  -- VAXstation
sony_news -- Sony NEWS workstation

... and so forth.  You get the idea.

The problem arises with AIX.  "AIX" will define the operating system
directly, but how do I distinguish 370, RT, and (soon to be available) RIOS
architectures?

Please reply by e-mail, and I will post a summary if warranted.  Thanks
in advance.
-- 
D. Jason Penney                  Ph: (503) 629-8383
Beaverton, OR 97006              uucp: ...uunet!servio!penneyj
STANDARD DISCLAIMER:  Should I or my opinions be caught or killed, the
company will disavow any knowledge of my actions...
Technical Details
Message-ID: <270@servio.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tektronix!psueea!parsely!bucket!servio!penneyj

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tektronix!psueea!parsely!bucket!servio!penneyj
From: penneyj@servio.UUCP (D. Jason Penney)
Newsgroups: comp.sys.ibm.pc.rt
Subject: RT-specific cpp Flag?
Summary: AIX Isn't Enough
Message-ID: <270@servio.UUCP>
Date: 26 Oct 89 15:12:54 GMT
Reply-To: penneyj@melmac.UUCP (D. Jason Penney)
Organization: Servio Logic Development Corp.; Beaverton, OR
Lines: 28