where to find all those #ifdef's and #defines

Scott Williamson scott at memex.co.uk
Thu Jan 11 21:08:14 AEST 1990


In article <1990Jan9.174739.8828 at iwarp.intel.com> merlyn at iwarp.intel.com (Randal Schwartz) writes:
>In article <40059 at ames.arc.nasa.gov>, dwhitney at pioneer (David Whitney- RCD) writes:
>| 
>| Does anyone know who, what, or where to find these definitions for each
>| machine?  What I'd like (ideally) is a list of the variables that
>| are #define'ed at any one time.  Thanks,
>
>Here it is (and it's not even in Perl :-)...
>
>#!/bin/sh
>
> Shell script removed

This will not work in all cases. 

In Gould's UTX/32 (4.3bsd based), some defines are hard-coded in /lib/cpp
(eg. gould, unix etc.) but others are passed on the command line used
by /bin/cc when it calls cpp (eg. -Dselport, -DCOFF).

Other systems may have the same problem. The shell script should
probably be modified to look for '-DXXX' in /bin/cc also.

Scott Williamson
scott at memex.co.uk



More information about the Comp.lang.c mailing list