HELPLIB.HLB  —  CRTL  Feature Logical Names
    The C RTL provides an extensive list of feature switches that
    can be set using DECC$ logical names. These switches affect the
    behavior of a C application at run time.

    The feature switches introduce new behaviors and also preserve
    old behaviors that have been deprecated.

    You enable most features by setting a logical name to ENABLE and
    disable a feature by setting the logical name to DISABLE:

    $ DEFINE DECC$feature ENABLE

    $ DEFINE DECC$feature DISABLE

    Some feature logical names can be set to a numeric value. For
    example:

    $ DEFINE DECC$PIPE_BUFFER_SIZE 32768

                                  NOTES

       o  Do not set C RTL feature logical names for the system.
          Set them only for the applications that need them,
          because other applications including OpenVMS components
          depend on the default behavior of these logical names.

       o  Older feature logicals from earlier releases of the
          C Run-Time Library were documented as supplying "any
          equivalence string" to enable a feature. While this was
          true at one time, we now strongly recommend that you use
          ENABLE for setting these feature logicals and DISABLE for
          disabling them. Failure to do so may produce unexpected
          results.

          The reason for this is twofold:

          -  In previous versions of the C RTL, any equivalence
             string, even DISABLE, may have enabled a feature
             logical.

          -  In subsequent and current versions of the C RTL, the
             following equivalence strings will disable a feature
             logical. Do not use them to enable a feature logical.

                DISABLE
                0 (zero)
                F
                FALSE
                N
                NO

             Any other string not on this list will enable a
             feature logical. The unintentionally misspelled string
             "DSABLE", for example, will enable a feature logical.

    The C RTL also provides several functions to manage feature
    logicals within your applications:

    decc$feature_get
    decc$feature_get_value
    decc$feature_get_index
    decc$feature_get_name
    decc$feature_set
    decc$feature_set_value
    decc$feature_show
    decc$feature_show_all

    See the reference section for more information on these
    functions.

    The C RTL feature logical names are listed below, grouped by the
    type of features they control:

       Feature Logical Name               Default
       ------- ------- ----               -------

       Performance Optimizations:

          DECC$ENABLE_GETENV_CACHE        DISABLE
          DECC$LOCALE_CACHE_SIZE          0
          DECC$TZ_CACHE_SIZE              2

       Legacy Behaviors:

          DECC$ALLOW_UNPRIVILEGED_NICE    DISABLE
          DECC$NO_ROOTED_SEARCH_LISTS     DISABLE
          DECC$PRINTF_USES_VAX_ROUND      DISABLE
          DECC$THREAD_DATA_AST_SAFE       DISABLE
          DECC$V62_RECORD_GENERATION      DISABLE
          DECC$WRITE_SHORT_RECORDS        DISABLE
          DECC$XPG4_STRPTIME              DISABLE

       File Attributes:

          DECC$DEFAULT_LRL                32767
          DECC$DEFAULT_UDF_RECORD         DISABLE
          DECC$FIXED_LENGTH_SEEK_TO_EOF   DISABLE
          DECC$ACL_ACCESS_CHECK           DISABLE

       Mailboxes:

          DECC$MAILBOX_CTX_STM            DISABLE

       Changes for UNIX Conformance:

          DECC$SELECT_IGNORES_INVALID_FD  DISABLE
          DECC$STRTOL_ERANGE              DISABLE
          DECC$VALIDATE_SIGNAL_IN_KILL    DISABLE

       General UNIX Enhancements:

          DECC$UNIX_LEVEL                 DISABLE
          DECC$ARGV_PARSE_STYLE           DISABLE
          DECC$PIPE_BUFFER_SIZE           512
          DECC$PIPE_BUFFER_QUOTA          512
          DECC$STREAM_PIPE                DISABLE
          DECC$POPEN_NO_CRLF_REC_ATTR     DISABLE
          DECC$STDIO_CTX_EOL              DISABLE
          DECC$USE_RAB64                  DISABLE
          DECC$GLOB_UNIX_STYLE            DISABLE

       Enhancements for UNIX Style Filenames:

          DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION  DISABLE
          DECC$EFS_CHARSET                  DISABLE
          DECC$ENABLE_TO_VMS_LOGNAME_CACHE  ENABLE
          DECC$FILENAME_ENCODING_UTF8       DISABLE
          DECC$FILENAME_UNIX_NO_VERSION     DISABLE
          DECC$FILENAME_UNIX_REPORT         DISABLE
          DECC$READDIR_DROPDOTNOTYPE        DISABLE
          DECC$RENAME_NO_INHERIT            DISABLE
          DECC$RENAME_ALLOW_DIR             DISABLE

       Enhancements for UNIX Style File Attributes:

          DECC$EFS_FILE_TIMESTAMPS        DISABLE
          DECC$EXEC_FILEATTR_INHERITANCE  DISABLE
          DECC$FILE_OWNER_UNIX            DISABLE
          DECC$FILE_PERMISSION_UNIX       DISABLE
          DECC$FILE_SHARING               DISABLE

       UNIX Compliance Mode:

          DECC$DETACHED_CHILD_PROCESS     DISABLE
          DECC$FILENAME_UNIX_ONLY         DISABLE
          DECC$POSIX_STYLE_UID            DISABLE
          DECC$USE_JPI$_CREATOR           DISABLE

       New Behaviors for POSIX Conformance:

          DECC$ALLOW_REMOVE_OPEN_FILES    DISABLE
          DECC$POSIX_SEEK_STREAM_FILE     DISABLE
          DECC$UMASK                      RMS default

       Filename Handling:

          DECC$POSIX_COMPLIANT_PATHNAMES  DISABLE

          DECC$DISABLE_POSIX_ROOT         ENABLE
          DECC$EFS_CASE_PRESERVE          DISABLE
          DECC$EFS_CASE_SPECIAL           DISABLE
          DECC$EFS_NO_DOTS_IN_DIRNAME     DISABLE
          DECC$READDIR_KEEPDOTDIR         DISABLE
          DECC$UNIX_PATH_BEFORE_LOGNAME   DISABLE

1  –  DECC$ACL_ACCESS_CHECK

    The DECC$ACL_ACCESS_CHECK feature logical controls the behavior
    of the access function.

    With DECC$ACL_ACCESS_CHECK enabled, the access function checks
    both UIC protection and OpenVMS Access Control Lists (ACLs).

    With DECC$ACL_ACCESS_CHECK disabled, the access function checks
    only UIC protection.

2  –  DECC$ALLOW_REMOVE_OPEN_FILES

    The DECC$ALLOW_REMOVE_OPEN_FILES feature logical controls the
    behavior of the remove function on open files. Ordinarily, the
    operation fails. However, POSIX conformance dictates that the
    operation succeed.

    With DECC$ALLOW_REMOVE_OPEN_FILES enabled, this POSIX conformant
    behavior is achieved.

3  –  DECC$ALLOW_UNPRIVILEGED_NICE

    With DECC$ALLOW_UNPRIVILEGED_NICE enabled, the nice function
    exhibits its legacy behavior of not checking the privilege of
    the calling process (that is, any user may lower the nice value
    to increase process priorities). Also, when the caller sets a
    priority above MAX_PRIORITY, the nice value is set to the base
    priority.

    With DECC$ALLOW_UNPRIVILEGED_NICE disabled, the nice function
    conforms to the X/Open standard of checking the privilege of the
    calling process (only users with ALTPRI privilege can lower the
    nice value to increase process priorities), and when the caller
    sets a priority above MAX_PRIORITY, the nice value is set to MAX_
    PRIORITY.

4  –  DECC$ARGV_PARSE_STYLE

    With DECC$ARGV_PARSE_STYLE enabled, case is preserved in command-
    line arguments when the process has been set up for extended DCL
    parsing using SET PROCESS/PARSE_STYLE=EXTENDED.

    DECC$ARGV_PARSE_STYLE must be defined externally as a logical
    name or set in a function called using the LIB$INITIALIZE
    mechanism because it is evaluated before function main is
    called.

5  –  DECC$DEFAULT_LRL

    DECC$DEFAULT_LRL specifies the default value for the RMS
    attribute for the longest record length. The default value 32767
    is the largest record size supported by RMS.

    Default: 32767

    Maximum: 32767

6  –  DECC$DEFAULT_UDF_RECORD

    With DECC$DEFAULT_UDF_RECORD enabled, file access mode defaults
    to RECORD instead of STREAM mode for all files except STREAMLF.

7  –  DECC$DETACHED_CHILD_PROCESS

    With DECC$DETACHED_CHILD_PROCESS enabled, child processes created
    using vfork and exec are created as detached processes instead of
    subprocesses.

    This feature has only limited support. In some cases the console
    cannot be shared between the parent process and the detached
    process, which can cause exec to fail.

8  –  DECC$DISABLE_POSIX_ROOT

    With DECC$DISABLE_POSIX_ROOT enabled, support for the POSIX root
    directory defined by SYS$POSIX_ROOT is disabled.

    With DECC$DISABLE_POSIX_ROOT disabled, the SYS$POSIX_ROOT logical
    name is interpreted as the equivalent of the file path "/". If
    a UNIX path starting with a slash (/)  is given and the value
    after the leading slash cannot be translated as a logical name,
    SYS$POSIX_ROOT is used as the parent directory for the specified
    UNIX file path.

    The C RTL supports a UNIX style root that behaves like a real
    directory. This allows such actions as:

    % cd /
    % mkdir /dirname
    % tar -xvf tarfile.tar /dirname
    % ls /

    Previously, the C RTL did not recognize "/" as a directory name.
    The normal processing for a file path starting with "/" was to
    interpret the first element as a logical name or device name. If
    this failed, there was special processing for the name /dev/null
    and names starting with /bin and /tmp:

    /dev/null       NLA0:
    /bin            SYS$SYSTEM:
    /tmp            SYS$SCRATCH:

    These behaviors are retained for compatibility purposes. In
    addition, support has been added to the C RTL for the logical
    name SYS$POSIX_ROOT as an equivalent to "/".

    To enable this feature for use by the C RTL, define SYS$POSIX_
    ROOT as a concealed logical name. For example:

    $ DEFINE/TRANSLATION=(CONCEALED,TERMINAL) SYS$POSIX_ROOT -
                                        "$1$DKA0:[SYS0.abc.]"

    To disable this feature:

    $ DEFINE DECC$DISABLE_POSIX_ROOT DISABLE

    Enabling SYS$POSIX_ROOT results in the following behavior:

    o  If the existing translation of a UNIX path starting with "/"
       fails and SYS$POSIX_ROOT is defined, the name is interpreted
       as if it starts with /sys$posix_root.

    o  When converting from an OpenVMS to a UNIX style filename,
       and the OpenVMS name starts with "SYS$POSIX_ROOT:", then
       the "SYS$POSIX_ROOT:" is removed. For example, SYS$POSIX_
       ROOT:[dirname] becomes /dirname. If the resulting name
       could be interpreted as a logical name or one of the special
       cases previously listed, the result is /./dirname instead of
       /dirname.

9  –  DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION

    With DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION enabled, the
    conversion routine decc$to_vms will only treat the first element
    of a UNIX style name as a logical name if there is a leading
    slash (/).

10  –  DECC$EFS_CASE_PRESERVE

    With DECC$EFS_CASE_PRESERVE enabled, case is preserved for
    filenames on ODS-5 disks.

    With DECC$EFS_CASE_PRESERVE disabled, UNIX style filenames are
    always reported in lowercase.

    However, note that enabling DECC$EFS_CASE_SPECIAL overrides the
    setting for DECC$EFS_CASE_PRESERVE.

11  –  DECC$EFS_CASE_SPECIAL

    With DECC$EFS_CASE_SPECIAL enabled, case is preserved only for
    filenames containing lowercase. If an element of a filename
    contains all uppercase letters, it is reported in all lowercase
    in UNIX style.

    When enabled, DECC$EFS_CASE_SPECIAL overrides the value of
    DECC$EFS_CASE_PRESERVE.

12  –  DECC$EFS_CHARSET

    With DECC$EFS_CHARSET enabled, UNIX names can contain ODS-5
    extended characters. Support includes multiple dots and all ASCII
    characters in the range 0 to 255, except the following:

    <NUL>
    /         *
    "         ?

    Unless DECC$FILENAME_UNIX_ONLY is enabled, some characters can be
    interpreted as OpenVMS characters depending on context. They are:

    :         ^
    [         ;
    <

    DECC$EFS_CHARSET might be necessary for existing applications
    that make assumptions about filenames based on the presence
    of certain characters, because the following nonstandard and
    undocumented C RTL extensions do not work when EFS extended
    character-set support is enabled:

    o  $HOME is interpreted as the user's login directory

       With DECC$EFS_CHARSET enabled, $HOME is treated literally and
       may be in an OpenVMS or UNIX style filename.

    o  ~name is interpreted as the login directory for user name

       With DECC$EFS_CHARSET enabled, ~name is treated literally and
       can be in an OpenVMS or UNIX style filename.

    o  Wild card regular expressions in the form [a-z]

       With DECC$EFS_CHARSET enabled, square brackets are acceptable
       in OpenVMS and UNIX style filenames. For instance, in a
       function such as open, abc[a-z]ef.txt is interpreted as a
       UNIX style name equivalent to the OpenVMS style name abc^[a-
       z^]ef.txt, and [a-z]bc is interpreted as an OpenVMS style name
       equivalent to the UNIX style name /sys$disk/a-z/bc.

    With DECC$EFS_CHARSET enabled, the following encoding for EFS
    extended characters is supported when converting from an OpenVMS
    style filename to a UNIX style filename:

    o  All ODS-2 compatible names

    o  All encoding for 8-bit characters, either as single byte or
       using two-digit hexadecimal form ^ab. In a UNIX path these are
       always represented as a single byte.

    o  Encoding for DEL (^7F)

    o  The following characters when preceded by a caret:

       space ! , _ & ' ( ) + @ { } ; # [ ] % ^ = $ - ~ .

    o  The following characters when not preceded by a caret:

       $  -  ~  .

    o  The implementation supports the conversion from OpenVMS to
       UNIX needed for functions readdir, ftw, getname, fgetname,
       getcwd, and others.

                                   NOTE

       There are some special cases in C RTL filename processing.
       For example:

       o  Pathnames ending in ^.dir are treated as directories, and
          when translated, these characters are truncated from the
          string.

       o  Pathnames begining with ^/ treat the next token as a
          logical name or a directory from the root.

       The following sample program shows these nuances:

       #include <stdio.h>
       #include <dirent.h>
       #include <unixlib.h>
       #include <string.h>
       main()
       {
         char adir[80];
         DIR *dir;
         struct dirent *dp;
         int decc_feature_efs_charset_index = 0;
         int decc_feature_efs_charset_default_val = 0;

         if (
             ( (decc_feature_efs_charset_index =
               decc$feature_get_index("DECC$EFS_CHARSET")) == -1 )
             ||
             ( (decc_feature_efs_charset_default_val =
   decc$feature_get_value(decc_feature_efs_charset_index, 0)) == -1 )
             ||
 ( (decc$feature_set_value(decc_feature_efs_charset_index, 1, TRUE) == -1))
            )
           {
             printf("Error setting up DECC$EFS_CHARSET macro\n");
           }

         strcpy(adir, "SYS$SYSDEVICE:[SSHTEST.TEST.a^,test^.dir^;22]");
         printf("\n\nFor %s\n", adir);
       mrb:  dir = opendir(adir);
         if(dir)
           {
             do
               {
                 dp = readdir(dir);
                 if(dp->d_name) printf("%s\n", dp->d_name);
               } while (dp);
           }

         closedir(dir);

         strcpy(adir, "SYS$SYSDEVICE:[SSHTEST.TEST.a^,test^.dir]");
         printf("\n\nFor %s\n", adir);
         dir = opendir(adir);
         if(dir)
           {
             do
               {
                 dp = readdir(dir);
                 if(dp->d_name) printf("%s\n", dp->d_name);
               } while (dp);
           }

         closedir(dir);

         strcpy(adir, "SYS$SYSDEVICE:[SSHTEST.TEST.a^\\test]");
         printf("\n\nFor %s\n", adir);
         dir = opendir(adir);
         if(dir)
           {
             do
               {
                 dp = readdir(dir);
                 if(dp->d_name) printf("%s\n", dp->d_name);
               } while (dp);
           }

         strcpy(adir, "SYS$SYSDEVICE:[SSHTEST.TEST.copies]");
         printf("\n\nFor %s\n", adir);
         dir = opendir(adir);
         if(dir)
           {
             do
               {
                 dp = readdir(dir);
                 if(dp->d_name) printf("%s\n", dp->d_name);
               } while (dp);
           }

         closedir(dir);

         strcpy(adir, "/SYS$SYSDEVICE/SSHTEST/TEST/copies");
         printf("\n\nFor %s\n", adir);
         dir = opendir(adir);
         if(dir)
           {
             do
               {
                 dp = readdir(dir);
                 if(dp->d_name) printf("%s\n", dp->d_name);
               } while (dp);
           }

         closedir(dir);

       }

13  –  DECC$EFS_FILE_TIMESTAMPS

    With DECC$EFS_FILE_TIMESTAMPS enabled, stat and fstat report
    new ODS-5 access time (st_atime), attribute revision time
    (st_ctime) and modification time (st_mtime) for files on ODS-5
    volumes that have the extended file times enabled using SET
    VOLUME/VOLUME=ACCESS_DATES.

    If DECC$EFS_FILE_TIMESTAMPS is disabled, or the volume is not
    ODS-5, or the volume does not have support for these additional
    times enabled, st_ctime continues to be the file creation time
    and st_atime the same as the st_mtime.

    The utime and utimes functions support these ODS-5 times in the
    same way as stat.

14  –  DECC$EFS_NO_DOTS_IN_DIRNAME

    With support for extended characters in filenames for ODS-5,
    a name such as NAME.EXT can be interpreted as NAME.EXT.DIR.
    Determining if directory [.name^.ext] exists adds overhead to
    UNIX name translation when support for extended character support
    in UNIX filenames is enabled.

    Enabling the DECC$EFS_NO_DOTS_IN_DIRNAME feature logical
    suppresses the interpretation of a filename containing dots as
    a directory name. With this logical enabled, NAME.EXT is assumed
    to be a filename; no check is made for directory [.name^.ext].

15  –  DECC$ENABLE_GETENV_CACHE

    The C RTL supplements the list of environment variables in the
    environ table with all logical names and DCL symbols available to
    the process.

    By default, whenever getenv is called for a name not in the
    environ table, an attempt is made to resolve this as a logical
    name and, if this fails, as a DCL symbol.

    With DECC$ENABLE_GETENV_CACHE enabled, once a logical name or
    DCL name has been successfully translated, its value is stored
    in a cache. When the same name is requested in a future call
    to getenv, the value is returned from the cache instead of
    reevaluating the logical name or DCL symbol.

16  –  DECC$ENABLE_TO_VMS_LOGNAME_CACHE

    Use the DECC$ENABLE_TO_VMS_LOGNAME_CACHE to improve the
    performance of UNIX name translation. The value is the life of
    each cache entry in seconds. The equivalence string ENABLE is
    evaluated as 1 second.

    Define DECC$ENABLE_TO_VMS_LOGNAME_CACHE to 1 to enable the cache
    with a 1-second life for each entry.

    Define DECC$ENABLE_TO_VMS_LOGNAME_CACHE to 2 to enable the cache
    with a 2-second life for each entry.

    Define DECC$ENABLE_TO_VMS_LOGNAME_CACHE to -1 to enable the cache
    without a cache entry expiration.

17  –  DECC$EXEC_FILEATTR_INHERITANCE

    The DECC$EXEC_FILEATTR_INHERITANCE feature logical affects child
    processes that are C programs.

    For versions of OpenVMS before Version 7.3-2, DECC$EXEC_FILEATTR_
    INHERITANCE is either enabled or disabled:

    o  With DECC$EXEC_FILEATTR_INHERITANCE enabled, the current file
       pointer and the file open mode is passed to the child process
       in exec calls.

    o  With this logical name disabled, the child process does not
       inherit append mode or the file position.

    For OpenVMS Version 7.3-2 and higher, DECC$EXEC_FILEATTR_
    INHERITANCE can be defined to 1 or 2, or be disabled:

    o  With DECC$EXEC_FILEATTR_INHERITANCE defined to 1, a child
       process inherits file positioning for all file access modes
       except append.

    o  With DECC$EXEC_FILEATTR_INHERITANCE defined to 2, a child
       process inherits file positioning for all file access modes
       including append.

    o  With DECC$EXEC_FILEATTR_INHERITANCE disabled, a child process
       does not inherit the file position for any access modes.

18  –  DECC$FILENAME_ENCODING_UTF8

    C RTL routines that deal with filenames now support filenames in
    UTF-8 encoding when given in UNIX style.

    For example, on an ODS-5 disk the OpenVMS DIRECTORY command
    supports a filename with the following characters:

    disk:[mydir]^U65E5^U672C^U8A9E.txt

    This filename contains three UCS-2 characters (call them xxx,
    yyy, and zzz for typographical purposes) meaning "day", "origin",
    and "language", respectively.

    With UTF-8 support enabled, a C program can now read the filename
    from the VMS directory and use that filename as an UTF-8 encoded
    string.

    For example, opendir("/disk/mydir") followed by a readdir will
    place the following into the d_name field of the supplied dirent
    structure:

    "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E.txt"

    One of the following calls can then open this file:

    open("/disk/mydir/\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E.txt",O_RDWR,0)
    open("/disk/mydir/xxxyyyzzz.txt", O_RDWR,0)

    The "\xE6\x97\xA5" above is the byte stream E697A5, which
    represents the xxx character in UTF-8 encoding.

    This feature enhances the UNIX portability of international
    software that uses UTF-8 encoded filenames.

    The DECC$FILENAME_ENCODING_UTF8 feature logical controls whether
    or not the C RTL allows and correctly interprets Unicode UTF-8
    encoding for filenames given in UNIX style.

    This logical is undefined by default, and the C RTL behavior is
    to accept filenames as ASCII and Latin-1 format.

    This feature works only on ODS-5 disks. Therefore, to enable
    Unicode UTF-8 encoding, you must define both the DECC$FILENAME_
    ENCODING_UTF8 and DECC$EFS_CHARSET logicals to ENABLE.

19  –  DECC$FILENAME_UNIX_ONLY

    With DECC$FILENAME_UNIX_ONLY enabled, filenames are never
    interpreted as OpenVMS style names. This prevents any
    interpretation of the following as OpenVMS special characters:

    :   [   ^

20  –  DECC$FILENAME_UNIX_NO_VERSION

    With DECC$FILENAME_UNIX_NO_VERSION enabled, OpenVMS version
    numbers are not supported in UNIX style filenames.

    With DECC$FILENAME_UNIX_NO_VERSION disabled, in UNIX style names,
    version numbers are reported preceded by a period (.).

21  –  DECC$FILENAME_UNIX_REPORT

    With DECC$FILENAME_UNIX_REPORT enabled, all filenames are
    reported in UNIX style unless the caller specifically selects
    OpenVMS style. This applies to getpwnam, getpwuid, argv[0],
    getname, fgetname, and tempnam.

    With DECC$FILENAME_UNIX_REPORT disabled, unless specified in the
    function call, filenames are reported in OpenVMS style.

22  –  DECC$FILE_PERMISSION_UNIX

    With DECC$FILE_PERMISSION_UNIX enabled, the file permissions
    for new files and directories are set according to the file
    creation mode and umask. This includes mode 0777. When an earlier
    version of the file exists, the file permissions for the new file
    are inherited from the earlier version. This mode sets DELETE
    permission for a new directory when WRITE permission is enabled.

    With DECC$FILE_PERMISSION_UNIX disabled, modes 0 and 0777
    indicate using RMS default protection or protection from the
    previous version of the file. Permissions for new directories
    also follow OpenVMS rules, including disabling DELETE
    permissions.

23  –  DECC$FILE_SHARING

    With DECC$FILE_SHARING enabled, all files are opened with full
    sharing enabled (FAB$M_DEL | FAB$M_GET | FAB$M_PUT | FAB$M_UPD).
    This is set as a logical OR with any sharing mode specified by
    the caller.

24  –  DECC$FIXED_LENGTH_SEEK_TO_EOF

    With DECC$FIXED_LENGTH_SEEK_TO_EOF enabled, lseek, fseeko, and
    fseek with the direction parameter set to SEEK_END will position
    relative to the last byte in the file for files with fixed-length
    records.

    With DECC$FIXED_LENGTH_SEEK_TO_EOF disabled, lseek, fseek, and
    fseeko when called with SEEK_EOF on files with fixed-length
    records, will position relative to the end of the last record
    in the file.

25  –  DECC$GLOB_UNIX_STYLE

    Enabling DECC$GLOB_UNIX_STYLE selects the UNIX mode of the glob
    function, which uses UNIX style filenames and wildcards instead
    of OpenVMS style filenames and wildcards.

26  –  DECC$LOCALE_CACHE_SIZE

    DECC$LOCALE_CACHE_SIZE defines how much memory, in bytes, to
    allocate for caching locale data. The default value is 0, which
    disables the locale cache.

    Default: 0

    Maximum: 2147483647

27  –  DECC$MAILBOX_CTX_STM

    By default, an open on a local mailbox that is not a pipe treats
    mailbox records as having a record attribute of FAB$M_CR.

    With DECC$MAILBOX_CTX_STM enabled, the record attribute FAB$M_CR
    is not set.

28  –  DECC$NO_ROOTED_SEARCH_LISTS

    When the decc$to_vms function evaluates a UNIX style path string,
    if it determines the first element to be a logical name, then:

    o  For rooted logicals or devices, it appends ":[000000]" to the
       logical name.

       For example, if log1 is a rooted logical ($DEFINE LOG1
       [DIR_NAME.]) then /log1/filename.ext translates to
       LOG1:[000000]FILENAME.EXT.

    o  For nonrooted logicals, it appends just a colon (:)  to the
       logical name.

       For example, if log2 is a nonrooted logical ($ DEFINE
       LOG2 [DIR_NAME]), then /log2/filename.ext translates to
       LOG2:FILENAME.EXT.

    o  If the first element is a search-list logical, the translation
       proceeds by evaluating the first element in the search list,
       and translating the path as previously described.

    The preceding three cases lead to predictable, expected results.

    In the case where the first element is a search list that
    consists of a mixture of rooted and nonrooted logicals,
    translating paths as described previously can lead to different
    behavior from that of older versions of OpenVMS (before OpenVMS
    Version 7.3-1):

    o  Before OpenVMS Version 7.3-1, regardless of the contents of
       the logical, the decc$to_vms function appended only a colon
       (:).  For search lists that consisted of a mixture of rooted
       and nonrooted logicals, this resulted in certain expected
       behaviors.

    o  For OpenVMS Version 7.3-1 and later, if the first element
       of the mixed search list is a rooted logical, then decc$to_
       vms appends ":[000000]" to the logical name, resulting in
       different behavior from that of OpenVMS releases prior to
       Version 7.3-1.

    DECC$NO_ROOTED_SEARCH_LISTS controls how the decc$to_vms function
    resolves search-list logicals and provides a means to restore the
    OpenVMS behavior prior to Version 7.3-1.

    With DECC$NO_ROOTED_SEARCH_LISTS enabled:

    o  If a logical is detected in a file specification, and it is
       a search list, then a colon (:)  is appended when forming the
       OpenVMS file specification.

    o  If it is not a search list, the behavior is the same as with
       DECC$NO_ROOTED_SEARCH_LISTS disabled.

    Enabling this feature logical provides the pre-Version 7.3-1
    behavior for search list logicals.

    With DECC$NO_ROOTED_SEARCH_LISTS disabled:

    o  If a logical is detected in a file specification, and it is
       a rooted logical (or a search list whose first element is a
       rooted logical), then ":[000000]" is appended when forming the
       OpenVMS file specification.

    o  If it is a nonrooted logical (or a search list whose first
       element is a nonrooted logical), then just a colon (:)  is
       appended.

    Disabling this feature logical provides the behavior for OpenVMS
    Version 7.3-1 and later.

29  –  DECC$PIPE_BUFFER_QUOTA

    OpenVMS Version 7.3-2 adds an optional fourth argument of type
    int to the pipe function to specify the buffer quota of the
    pipe's mailbox. In previous OpenVMS versions, the buffer quota
    was equal to the buffer size.

    DECC$PIPE_BUFFER_QUOTA lets you specify a buffer quota to use
    for the pipe function if the optional fourth argument of that
    function is omitted.

    If the optional pipe fourth argument is omitted and DECC$PIPE_
    BUFFER_QUOTA is not defined, then the buffer quota defaults to
    the buffer size, as before.

    Default: 512

    Minimum: 512

    Maximum: 2147483647

30  –  DECC$PIPE_BUFFER_SIZE

    The system default buffer size of 512 bytes for pipe write
    operations can limit performance and generate extra line feeds
    when handling messages longer than 512 bytes.

    DECC$PIPE_BUFFER_SIZE allows a larger buffer size to be used for
    pipe functions such as pipe and popen. A value of 512 to 65535
    bytes can be specified.

    If DECC$PIPE_BUFFER_SIZE is not specified, the default buffer
    size 512 is used.

    Default: 512

    Minimum: 512

    Maximum: 65535

31  –  DECC$POPEN_NO_CRLF_REC_ATTR

    With DECC$POPEN_NO_CRLF_REC_ATTR disabled, a pipe opened with the
    popen function has its record attributes set to CR/LF carriage
    control (fab$b_rat |= FAB$M_CR). This is the default behavior.

    With DECC$POPEN_NO_CRLF_REC_ATTR enabled, CR/LF carriage control
    is prevented from being added to the pipe records. This is
    compatible with UNIX behavior, but be aware that enabling this
    feature might result in undesired behavior from other functions,
    such as gets, that rely on the carriage-return character.

32  –  DECC$POSIX_COMPLIANT_PATHNAMES

    With DECC$POSIX_COMPLIANT_PATHNAMES enabled, an application
    is allowed to present POSIX-compliant pathnames to any C RTL
    function that accepts a pathname.

    By default DECC$POSIX_COMPLIANT_PATHNAMES is disabled, and the
    usual C RTL behavior prevails. This disabled mode includes
    interpretation of pathnames as UNIX style specifications and
    uses rules that are different and unrelated to POSIX-compliant
    pathname processing.

    To enable DECC$POSIX_COMPLIANT_PATHNAMES, set it to one of the
    following values:

      1 All pathnames are designated as POSIX style.
      2 Pathnames that end in ":" or contain any of the bracket
        characters "[]<>", and that can be successfully parsed by
        the SYS$FILESCAN service, are designated as OpenVMS style.
        Otherwise, they are designated as POSIX style.
      3 The pathnames "." and "..", or pathnames that contain "/" are
        designated as POSIX style. Otherwise, they are designated as
        OpenVMS style.
      4 All pathnames are designated as OpenVMS style.

    See Chapter 12 of the VSI C Run-Time Library Reference Manual
    for OpenVMS Systems for more information on POSIX-compliant
    pathnames and symbolic links.

33  –  DECC$POSIX_SEEK_STREAM_FILE

    With DECC$POSIX_SEEK_STREAM_FILE enabled, positioning beyond
    end-of-file on STREAM files does not write to the file until the
    next write. If the write is beyond the current end-of-file, this
    positions beyond the old end-of-file, and the start position for
    the write is filled with zeros.

    With DECC$POSIX_SEEK_STREAM_FILE disabled, positioning beyond
    end-of-file will immediately write zeros to the file from the
    current end-of-file to the new position.

34  –  DECC$POSIX_STYLE_UID

    With DECC$POSIX_STYLE_UID enabled, 32-bit UIDs and GIDs are
    interpreted as POSIX style identifiers.

    With this logical name disabled, UIDs and GIDs are derived from
    the process UIC.

    This feature is only available on OpenVMS systems providing POSIX
    style UID and GID support.

35  –  DECC$PRINTF_USES_VAX_ROUND

    With DECC$PRINTF_USES_VAX_ROUND enabled, the F and E format
    specifiers of printf use VAX rounding rules for programs compiled
    with IEEE float.

36  –  DECC$READDIR_DROPDOTNOTYPE

    With DECC$READDIR_DROPDOTNOTYPE enabled, readdir when reporting
    files in UNIX style only reports the trailing period (.)  for
    files with no file type when the filename contains a period.

    With this logical name disabled, all files without a file type
    are reported with a trailing period.

37  –  DECC$READDIR_KEEPDOTDIR

    The default behavior when reporting files in UNIX style from
    readdir is to report directories without a file type.

    With DECC$READDIR_KEEPDOTDIR enabled, directories are reported in
    UNIX style with a file type of ".DIR".

38  –  DECC$RENAME_NO_INHERIT

    DECC$RENAME_NO_INHERIT provides more UNIX compliant behavior in
    the rename function. With DECC$RENAME_NO_INHERIT enabled, the
    following behaviors are enforced:

    o  If the old argument points to the pathname of a file that
       is not a directory, the new argument will not point to the
       pathname of a directory.

    o  The new argument cannot point to a directory that exists.

    o  If the old argument points to the pathname of a directory, the
       new argument will not point to the pathname of a file that is
       not a directory.

    o  The new name for the file does not inherit anything from
       the old name. The new name must be specified completely. For
       example:

       Renaming "A.A" to "B" yields "B"

    With this logical name disabled, you get the expected OpenVMS
    behavior. For example:

    Renaming "A.A" to "B" yields "B.A"

39  –  DECC$RENAME_ALLOW_DIR

    Enabling DECC$RENAME_ALLOW_DIR restores the prior OpenVMS
    behavior of the rename function by allowing conversion to a
    directory specification when the second argument is an ambiguous
    file specification passed as a logical name. The ambiguity is
    whether the logical name is a UNIX or OpenVMS file specification.
    Consider the following example with DECC$RENAME_ALLOW_DIR
    enabled:

    rename("file.ext", "logical_name")
                            /*where logical_name = dev:[dir.subdir]*/
                            /* and :[dir.subdir] exists.          */

    This results in:

    dev:[dir.subdir]file.ext

    This example renames a file from one directory into another
    directory, which is the same behavior as in legacy versions
    of OpenVMS (versions before 7.3-1). Also in this example, if
    dev:[dir.subdir] does not exist, rename returns an error.

    Disabling DECC$RENAME_ALLOW_DIR provides a more UNIX compliant
    conversion of the "logical_name" argument of rename. Consider the
    following example with DECC$RENAME_ALLOW_DIR disabled:

    rename("file.ext", "logical_name")
                        /* where logical_name = dev:[dir.subdir] */

    This results in:

    dev:[dir]subdir.ext

    This example renames the file using the subdir part of the
    "logical_name" argument as the new filename because on UNIX
    systems, renaming a file to a directory is not allowed. So
    rename internally converts the "logical_name" to a filename, and
    dev:[dir]subdir is the most reasonable conversion it can perform.

    This new feature switch has a side effect of causing rename to a
    directory to take precedence over rename to a file. Consider this
    example:

    rename ( "file1.ext", "dir2" )      /* dir2 is not a logical */

    With DECC$RENAME_ALLOW_DIR disabled, this example results in
    dir2.ext, regardless of whether or not subdirectory [.dir2]
    exists.

    With DECC$RENAME_ALLOW_DIR enabled, this example results in
    dir2.ext only if subdirectory [.dir2] does not exist. If
    subdirectory [.dir2] does exist, the result is [.dir2]file1.ext.

                                   NOTE

       If DECC$RENAME_NO_INHERIT is enabled, UNIX compliant
       behavior is expected, so DECC$RENAME_ALLOW_DIR is ignored,
       and renaming a file to a directory is not allowed.

40  –  DECC$SELECT_IGNORES_INVALID_FD

    With DECC$SELECT_IGNORES_INVALID_FD enabled, select fails with
    errno set to EBADF when an invalid file descriptor is specified
    in one of the descriptor sets.

    With DECC$SELECT_IGNORES_INVALID_FD disabled, select ignores
    invalid file descriptors.

41  –  DECC$STDIO_CTX_EOL

    With DECC$STDIO_CTX_EOL enabled, writing to stdout and stderr
    for stream access is deferred until a terminator is seen or the
    buffer is full.

    With DECC$STDIO_CTX_EOL disabled, each fwrite generates a
    separate write, which for mailbox and record files generates a
    separate record.

42  –  DECC$STREAM_PIPE

    With DECC$STREAM_PIPE enabled, the C RTL pipe function uses the
    more UNIX compatible stream I/O.

    With DECC$STREAM_PIPE disabled, pipe uses the OpenVMS legacy
    record I/O. This is the default.

43  –  DECC$STRTOL_ERANGE

    With DECC$STRTOL_ERANGE enabled, the strtol behavior for an
    ERANGE error is corrected to consume all remaining digits in
    the string.

    With DECC$STRTOL_ERANGE disabled, the legacy behavior of leaving
    the pointer at the failing digit is preserved.

44  –  DECC$THREAD_DATA_AST_SAFE

    The C RTL has a mode that allocates storage for thread-specific
    data allocated by threads at non-AST level separate for data
    allocated for ASTs. In this mode, each access to thread-
    specific data requires a call to LIB$AST_IN_PROG, which can add
    significant overhead when accessing thread-specific data in the
    C RTL.

    The alternate mode protects thread-specific data only if another
    function has it locked. This protects data that is in use within
    the C RTL, but does not protect the caller from an AST changing
    the data pointed to.

    This latter mode is now the C RTL default for the strtok, ecvt,
    and fcvt functions.

    You can select the legacy AST safe mode by enabling DECC$THREAD_
    DATA_AST_SAFE.

45  –  DECC$TZ_CACHE_SIZE

    DECC$TZ_CACHE_SIZE specifies the number of time zones that can be
    held in memory.

    Default: 2

    Maximum: 2147483647

46  –  DECC$UMASK

    DECC$UMASK specifies the default value for the permission mask
    umask. By default, a parent C program sets the umask from the RMS
    default permissions for the process. A child process inherits the
    parent's value for umask.

    To enter the value as an octal value, add the leading zero;
    otherwise, it is translated as a decimal value. For example:

    $ DEFINE DECC$UMASK 026

    Maximum: 0777

47  –  DECC$UNIX_LEVEL

    With the DECC$UNIX_LEVEL logical name, you can manage multiple
    C RTL feature logical names at once. By setting a value for
    DECC$UNIX_LEVEL from 1 to 100, you determine the default value
    for groups of feature logical names. The value you set has a
    cumulative effect: the higher the value, the more groups that
    are affected. Setting a value of 20, for example, enables all the
    feature logicals associated with a DECC$UNIX_LEVEL of 20, 10, and
    1.

    The principal logical names affecting UNIX like behavior are
    grouped as follows:

       1    General corrections
       10   Enhancements
       20   UNIX style filenames
       30   UNIX style file attributes
       90   Full UNIX behavior - No concessions to OpenVMS

    Level 30 is appropriate for UNIX like programs such as BASH and
    GNV.

    The DECC$UNIX_LEVEL values and associated groups of affected
    feature logical names are:

    General Corrections          (DECC$UNIX_LEVEL 1)

       DECC$FIXED_LENGTH_SEEK_TO_EOF   1
       DECC$POSIX_SEEK_STREAM_FILE     1
       DECC$SELECT_IGNORES_INVALID_FD  1
       DECC$STRTOL_ERANGE              1
       DECC$VALIDATE_SIGNAL_IN_KILL    1

    General Enhancements        (DECC$UNIX_LEVEL 10)

       DECC$ARGV_PARSE_STYLE           1
       DECC$EFS_CASE_PRESERVE          1
       DECC$STDIO_CTX_EOL              1
       DECC$PIPE_BUFFER_SIZE           4096
       DECC$USE_RAB64                  1

    UNIX style filenames       (DECC$UNIX_LEVEL 20)

       DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION 1
       DECC$EFS_CHARSET                1
       DECC$FILENAME_UNIX_NO_VERSION   1
       DECC$FILENAME_UNIX_REPORT       1
       DECC$READDIR_DROPDOTNOTYPE      1
       DECC$RENAME_NO_INHERIT          1
       DECC$GLOB_UNIX_STYLE

    UNIX like file attributes     (DECC$UNIX_LEVEL 30)

       DECC$EFS_FILE_TIMESTAMPS        1
       DECC$EXEC_FILEATTR_INHERITANCE  1
       DECC$FILE_OWNER_UNIX            1
       DECC$FILE_PERMISSION_UNIX       1
       DECC$FILE_SHARING               1

    UNIX compliant behavior       (DECC$UNIX_LEVEL 90)

       DECC$FILENAME_UNIX_ONLY         1
       DECC$POSIX_STYLE_UID            1
       DECC$USE_JPI$_CREATOR           1
       DECC$DETACHED_CHILD_PROCESS     1

                                  NOTES

       o  Defining a logical name for an individual feature logical
          supersedes the default value established by DECC$UNIX_
          LEVEL for that feature.

       o  Future revisions of the C RTL may add new feature
          logicals to a given DECC$UNIX_LEVEL. For applications
          that specify that UNIX level, the effect is to enable
          those new feature logicals by default.

48  –  DECC$UNIX_PATH_BEFORE_LOGNAME

    With DECC$UNIX_PATH_BEFORE_LOGNAME enabled, when translating
    a UNIX filename not starting with a leading slash (/), an
    attempt is made to match this to a file or directory in the
    current directory. If this is not found and the name is valid
    as a logical name in an OpenVMS filename, an attempt is made to
    translate the logical name and, if found, is used as part of the
    resulting filename.

    Enabling DECC$UNIX_PATH_BEFORE_LOGNAME overrides the setting for
    DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION.

49  –  DECC$USE_JPI$_CREATOR

    When enabled, DECC$USE_JPI$_CREATOR determines the parent process
    ID in getppid by calling $GETJPI using item JPI$_CREATOR instead
    of JPI$_OWNER.

    This feature is only available on systems supporting POSIX style
    session identifiers.

50  –  DECC$USE_RAB64

    With DECC$USE_RAB64 enabled, open functions allocate a RAB64
    structure instead of the traditional RAB structure.

    This provides latent support for file buffers in 64-bit memory.

51  –  DECC$VALIDATE_SIGNAL_IN_KILL

    With DECC$VALIDATE_SIGNAL_IN_KILL enabled, a signal value that
    is in the range 0 to _SIG_MAX but is not supported by the C RTL
    generates an error with errno set to EINVAL, which makes the
    behavior the same as for raise.

    With this logical name disabled, validation of signals is
    restricted to checking that the signal value is in the range 0 to
    _SIG_MAX. If sys$sigprc fails, errno is set based on sys$sigprc
    exit status.

52  –  DECC$V62_RECORD_GENERATION

    OpenVMS Versions 6.2 and higher can output record files using
    different rules.

    With DECC$V62_RECORD_GENERATION enabled, the output mechanism
    follows the rules used for OpenVMS Version 6.2.

53  –  DECC$WRITE_SHORT_RECORDS

    The DECC$WRITE_SHORT_RECORDS feature logical supports a previous
    change to the fwrite function (to accommodate writing records
    with size less than the maximum record size), while retaining
    the legacy way of writing records to a fixed-length file as the
    default behavior:

    With DECC$WRITE_SHORT_RECORDS enabled, short-sized records
    (records with size less than the maximum record size) written at
    EOF are padded with zeros to align records on record boundaries.
    This is the behavior seen in OpenVMS Version 7.3-1 and some ACRTL
    ECOs of that time period.

    With DECC$WRITE_SHORT_RECORDS disabled, the legacy behavior
    of writing records with no padding is implemented. This is the
    recommended and default behavior.

54  –  DECC$XPG4_STRPTIME

    XPG5 support for strptime introduces pivoting year support so
    that years in the range 0 to 68 are in the 21st century, and
    years in the range 69-99 are in the 20th century.

    With DECC$XPG4_STRPTIME enabled, XPG5 support for the pivoting
    year is disabled and all years in the range 0 to 99 are in the
    current century.
Close Help