/sys$common/syshlp/helplib.hlb
CC, Language topics, Predefined Macros, System Identification Macros

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  Each implementation of the Compaq C compiler automatically defines
  macros that you can use to identify the system on which the program
  is running.  These macros can assist in writing code that executes
  conditionally, depending on the architecture or operating system on
  which the program is running.

  The following table lists the traditional and new spellings of
  these predefined macro names for Compaq C on OpenVMS systems.  Both
  spellings are defined for each macro unless ANSI C mode is in
  effect (/STANDARD=ANSI89), in which case only the new spellings are
  defined.

        Traditional spelling      New spelling

             vms                   __vms
             VMS                   __VMS
             vms_version           __vms_VERSION
             VMS_VERSION           __VMS_VERSION
                                   __VMS_VER
                                   __DECC_VER
                                   __DECCXX_VER
             vax                   __vax
             VAX                   __VAX
             vaxc                  __vaxc
             VAXC                  __VAXC
             vax11c                __vax11C
             VAX11C                __VAX11C
              ---                  __DECC
              ---                  __STDC__
                                   __STDC_HOSTED__
                                   __STDC_VERSION__
                                   __STDC_ISO_10646__
                                   __MIA

  Note that __STDC__ is defined only in strict ANSI C mode.

  Predefined macros (with the exception of vms_version, VMS_VERSION,
  __vms_version and __VMS_VERSION) are defined as 1 or 0, depending
  on the system you're compiling on (VAX or Alpha processor), the
  compiler defaults, and the qualifiers used.  For example, if you
  compiled using G_floating format, then __D_FLOAT and __IEEE_FLOAT
  (Alpha processors only) are predefined to be 0, and __G_FLOAT is
  predefined as if the following were included before every
  compilation unit:

  #define  __G_FLOAT  1

  These macros can assist in writing code that executes
  conditionally.  They can be used in #elif, #if, #ifdef, and #ifndef
  directives to separate portable and nonportable code in a Compaq C
  program.  The vms_version, VMS_VERSION, __vms_version, and
  __VMS_VERSION macros are defined with the value of the OpenVMS
  version on which you are running (for example, Version 6.0).
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.