Library /sys$common/syshlp/helplib.hlb  —  CRTL  Feature-Test Macros, Compatibility Modes
    The following predefined macros are used to select header-file
    compatibility with previous versions of DEC C or the OpenVMS
    operating system:

    o  _DECC_V4_SOURCE

    o  _VMS_V6_SOURCE

    There are two types of incompatibilities that can be controlled
    in the header files:

    o  To conform to standards, some changes are source-code
       incompatible but binary compatible. To select DEC C Version
       4.0 source compatibility, use the _DECC_V4_SOURCE macro.

    o  Other changes to conform to standards introduce a binary or
       run-time incompatibility.

       In general, programs that recompile get new behaviors. In
       these cases, use the _VMS_V6_SOURCE feature test macro to
       retain previous behaviors.

       However, for the exit, kill, and wait functions, the OpenVMS
       Version 7.0 changes to make these routines ISO POSIX-1
       compliant were considered too incompatible to become the
       default. Therefore, in these cases the default behavior is
       the same as on pre-OpenVMS Version 7.0 systems. To access the
       versions of these routines that comply with ISO POSIX-1, use
       the _POSIX_EXIT feature test macro.

    The following examples help clarify the use of these macros:

    o  To conform to the ISO POSIX-1 standard, typedefs for the
       following have been added to <types.h>:

          dev_t         off_t
          gid_t         pid_t
          ino_t         size_t
          mode_t        ssize_t
          nlink_t       uid_t

       Previous development environments using a version of DEC C
       earlier than Version 5.2 may have compensated for the lack
       of these typedefs in <types.h> by adding them to another
       module. If this is the case on your system, then compiling
       with the <types.h> provided with DEC C Version 5.2 might cause
       compilation errors.

       To maintain your current environment and include the DEC C
       Version 5.2 <types.h>, compile with _DECC_V4_SOURCE defined.
       This will omit incompatible references from the DEC C Version
       5.2 headers. In <types.h>, for example, the previously listed
       typedefs will not be visible.

    o  As of OpenVMS Version 7.0, the C RTL getuid and
       geteuid functions are defined to return an OpenVMS UIC (user
       identification code) that contains both the group and member
       portions of the UIC. In previous versions of the DEC C RTL,
       these functions returned only the member number from the UIC
       code.

       Note that the prototypes for getuid and geteuid in <unistd.h>
       (as required by the ISO POSIX-1 standard) and in <unixlib.h>
       (for C RTL compatibility) have not changed. By default,
       newly compiled programs that call getuid and geteuid get
       the new definitions. That is, these functions will return
       an OpenVMS UIC.

       To let programs retain the pre-OpenVMS Version 7.0 behavior of
       getuid and geteuid, compile with the _VMS_V6_SOURCE feature-
       test macro defined.

    o  As of OpenVMS Version 7.0, the C RTL exit function is
       defined with ISO POSIX-1 semantics. As a result, the input
       status argument to exit takes a number between 0 and 255.
       (Prior to this, exit could take an OpenVMS condition code in
       its status parameter.)

       By default, the behavior for exit on OpenVMS systems is the
       same as before: exit accepts an OpenVMS condition code. To
       enable the ISO POSIX-1 compatible exit function, compile with
       the _POSIX_EXIT feature-test macro defined.
Close Help