[comp.lang.c] CPP defines...

siegel@hc.DSPO.GOV (Josh Siegel) (02/13/88)

I am trying to make a list of all the symbols that are
defined by various machines by cpp...


My current list is:

 LANGUAGE_C MIPSEB MIPSEL MOXIE RES RT alliant dmert
 gcos gimpel host_mips i8086 iAPX286 ibm interdata mc300
 mc500 mc68000 mc700 mert mips n16 n32032 n32332 ns16000
 ns32000 os pdp11 pyr sequent sparc sun tss u370 u3b
 u3b2 u3b20 u3b200 u3b20d u3b5 unix vax z8000

If there are any I have missed,  I would "thank ya kindly"
if you could pass them along to me.

	thanks much

-- 
Josh Siegel		(siegel@hc.dspo.gov)
I like using a C-47A "puff dragon" to go hunting with.

siegel@hc.DSPO.GOV (Josh Siegel) (02/25/88)

I want to thank all those you sent in CPP defines...

Don't bother asking what they mean since for the most part, I don't
know :-)

CC$gfloat CRAY CRAY1 CRAY2 LANGUAGE_C LARGE_M M68010 M68020 MIPSEB MIPSEL
MOXIE MSDOS M_BITFIELDS M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86LM M_I86MM
M_I86SM M_LDATA M_LTEXT M_SDATA M_STEXT M_SYS3 M_SYS5 M_SYSIII M_SYSV
M_WDSWAP M_XENIX NULL OSK PORTAR PWB RES RT SMALL_M VAX VAX11C VAXC
VMS __50SERIES __CI __FILE__ __LINE__ __STDC__ alliant apollo cray
decus dmert fpcc gcos gimpel gould host_mips hp9000s200 hp9000s300
hp9000s500 hp9000s800 hpux i386 i8086 iAPX286 ibm ibm032 interdata
m68000 m68k m68k mc300 mc500 mc68000 mc68010 mc68020 mc68k32 mc700
mert mips n16 n32032 n32332 news800 nomacarg ns16000 ns32000 os
pdp11 pyr sel sequent sparc sun tahoe tss u370 u3b u3b15 u3b2
u3b20 u3b200 u3b20d u3b5 unix vax vax11c vaxc vms z8000


-- 
Josh Siegel		(siegel@hc.dspo.gov)
I like using a C-47A "puff dragon" to go hunting with.

wes@obie.UUCP (Barnacle Wes) (02/26/88)

In article <14191@hc.DSPO.GOV>, siegel@hc.DSPO.GOV (Josh Siegel) writes:
> If there are any I have missed,  I would "thank ya kindly"
> if you could pass them along to me.

Yep, you forgot the iAPX386, Intel's latest bug-ridden worm.
(Only worms have segments).  You've probably already gotten
this a dozen times, but what-eh-hei.

-- 
    /\              -  "Against Stupidity,  -    {backbones}!
   /\/\  .    /\    -  The Gods Themselves  -  utah-cs!utah-gr!
  /    \/ \/\/  \   -   Contend in Vain."   -  uplherc!sp7040!
 / U i n T e c h \  -       Schiller        -     obie!wes

rb@ist.CO.UK (News reading a/c for rb) (03/04/88)

Here's a nasty little script that comes in useful when you
want to know what your cpp *really* predefines: we have found
that the man page is sometimes economical with the truth.
Those of you without strings(1) and/or a separate /lib/cpp will
have to use your imagination.
--------------------------------------------------------------
#!/bin/sh
strings -a -2 /lib/cpp | sed '/^a-zA-Z0-9_/!s/.*/#ifdef &\
"%&"\
#endif/p' |/lib/cpp |sed -n '/%/s/[%"]//gp'

nick@ccicpg.UUCP (Nick Crossley) (03/11/88)

In article <179@istop.ist.CO.UK> rb@ist.CO.UK (News reading a/c for rb) writes:
>Here's a nasty little script that comes in useful when you
>want to know what your cpp *really* predefines: we have found
>that the man page is sometimes economical with the truth.
> ...
>strings -a -2 /lib/cpp | sed '/^a-zA-Z0-9_/!s/.*/#ifdef &\
>"%&"\
>#endif/p' |/lib/cpp |sed -n '/%/s/[%"]//gp'

Ah, but not all systems have their predefined symbols defined by cpp!  I know
of some which define some symbols in cc!  Thus, a better? more complete?
approach might be :-

strings <options as required> /lib/cpp /bin/cc |
sort -u |
sed -n '/^[a-zA-Z0-9_]*$/s//#ifdef &\
"%&"\
#endif/p' >cpp_test.c

cc -E cpp_test.c |
sed -n '/%/s/[%"]//gp'
-- 

<<< standard disclaimers >>>
Nick Crossley, CCI, 9801 Muirlands, Irvine, CA 92718-2521, USA
Tel. (714) 458-7282,  uucp: ...!uunet!ccicpg!nick