Defining architecture-specific CPP macros
Learn how to define architecture-specific CPP macros.
Step 1 places you in an environment where the C preprocessor, cpp,
defines one or more architecture-specific symbols. On a Solaris 11 host,
cpp defines the symbols
__sun
and
__sparc
. This, in turn, causes imake to generate many
architecture-specific (machine-dependent) cpp
macros:#ifdef sun
#undef __sun
#define SunArchitecture sun defined by C preprocessor
#ifdef mc68020
...
#endif
#ifdef __sparc
#undef __SunOS_5_11
#undef __SunOS_5_10 sparc defined by C preprocessor imake defines longer symbols
#define MachineDep __SunOS_5_11
#define machinedep __SunOS_5_10
#endif ...
Additional cpp macros specific to Solaris are read in from the auxiliary file solaris.cf.