HP C
Run-Time Library Reference Manual for OpenVMS Systems


Previous Contents Index

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

DECC$FILENAME_UNIX_ONLY

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


:   [   ^ 

DECC$FILENAME_UNIX_NO_VERSION

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

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

DECC$FILENAME_UNIX_REPORT

With DECC$FILENAME_UNIX_REPORT enabled, all file names 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, file names are reported in OpenVMS style.

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.

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.

DECC$FIXED_LENGTH_SEEK_TO_EOF

With DECC$FIXED_LENGTH_SEEK_TO_EOF enabled, lseek , fseeko , and fseek with the direction paremeter 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.

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.

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

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.

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:

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):

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:

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

With DECC$NO_ROOTED_SEARCH_LISTS disabled:

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

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

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

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.

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 Section 12.3.1 for more information.

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.

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.

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 file name contains a period.

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

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".

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:

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

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

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 file name because on UNIX systems, renaming a file to a directory is not allowed. So rename internally converts the "logical_name" to a file name, 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.

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.

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.

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.

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.

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.

DECC$TZ_CACHE_SIZE

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

Default: 2

Maximum: 2147483647

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

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 file names
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 file names       (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

  • Defining a logical name for an individual feature logical supersedes the default value established by DECC$UNIX_LEVEL for that feature.
  • 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.

DECC$UNIX_PATH_BEFORE_LOGNAME

With DECC$UNIX_PATH_BEFORE_LOGNAME enabled, when translating a UNIX file name 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 file name, an attempt is made to translate the logical name and, if found, is used as part of the resulting file name.

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

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.

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.

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.

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.

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.

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.


Previous Next Contents Index