VMS Help  —  CRTL  Feature-Test Macros, Multiple-Version-Support Macro
    By default, the header files enable APIs in the Compaq C RTL
    provided by the version of the operating system on which the
    compilation occurs. This is accomplished by the predefined
    setting of the __VMS_VER macro, as described in the Compaq C
    User's Guide for OpenVMS Systems. For example, compiling on
    OpenVMS Version 6.2 causes only Compaq C RTL APIs from Version
    6.2 and earlier to be made available.

    Another example of the use of the __VMS_VER macro is support
    for the 64-bit versions of Compaq C RTL functions available
    with OpenVMS Alpha Version 7.0 and higher. In all header files,
    functions that provide 64-bit support are conditionalized so that
    they are visible only if __VMS_VER indicates a version of OpenVMS
    that is greater than or equal to 7.0.

    To target an older version of the operating system, do the
    following:

    1. Define a logical DECC$SHR to point to the old version of
       DECC$SHR. The compiler uses a table from DECC$SHR to perform
       routine name prefixing.

    2. Define __VMS_VER appropriately, either with the /DEFINE
       qualifier or with a combination of the #undef and #define
       preprocessor directives. With /DEFINE, you may need to disable
       the warning regarding redefinition of a predefined macro.

    Targeting a newer version of the operating system might not
    always be possible. For some versions, you can expect that the
    new DECC$SHR.EXE will require new features of the operating
    system that are not present. For such versions, the defining
    if the logical DECC$SHR in Step 1 would cause the compilation to
    fail.

    To override the value of __VMS_VER, define __VMS_VER_OVERRIDE  on
    the compiler command line. Defining __VMS_VER_OVERRIDE without a
    value sets __VMS_VER to the maximum value.
Close Help