HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS Alpha Version 7.3--2 Release Notes

Previous Contents Index

Chapter 5
Programming Release Notes

This chapter provides release notes about application and system programming on OpenVMS systems.

5.1 Backup API: Journaling Callback Events Restriction

Permanent Restriction

If an application registers a callback routine for any of the journaling events, it must register a callback routine for all the journaling callback events. The following is a list of the journaling callback events:


Refer to the Backup API chapter in the OpenVMS Utility Routines Manual for more information about registering callback routines.

5.2 C Programs: Compiling with case=sensitive Settings

Permanent Restriction

If you are compiling C programs with the setting case=sensitive , any #include files in your C program specified with the .h file type (lowercase h) will not be seen and executed. In addition, if a system #include file specifies another #include file with a .h file type, the second #include file will not be seen and an error will be generated.

To avoid this behavior, compile with case set to blind. If it is necessary to use case=sensitive , specify any #include files in your C programs either with no file type (for example, #include <stdio> ) or with an uppercase H file type (for example, #include <stdio.H> ).

Note that this does not correct the scenario where system #include files, such as stdlib.h, in turn specify #include files with a .h file type and cause an error to be generated.

5.3 C Run-Time Library

The following sections describe changes and corrections to the C Run-Time Library (RTL).

5.3.1 Undefined Symbol GETADDRINFO_COMPAT43 Fixed


In some circumstances, the OpenVMS Linker flagged the GETADDRINFO_COMPAT43 symbol as undefined. This has been fixed.

5.3.2 64-Bit Pointers Now Supported for Some Socket Routines


The following socket routines did not have 64-bit pointer support. Now they do.


5.3.3 fwrite Function No Longer Writes Inappropriate Records to a File


In OpenVMS Version 7.3-1, a change was made to the way the C RTL wrote fixed-length records whose size was less than the record size defined for the file. In this case, the C RTL would pad the record with zeros to create a record size equal to the maximum record size defined for the file.

Because this was a change in behavior, a feature logical should have been included to control this behavior. This feature logical has now been added. This new feature logical, DECC$WRITE_SHORT_RECORDS, supports the previous change to the fwrite function 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 are padded with zeros to align records on record boundaries.

With DECC$WRITE_SHORT_RECORDS disabled, the legacy behavior of writing records is implemented. This is the default behavior.

5.3.4 FILE_TYPE Macro Removed from <stdio.h> Header


The <stdio.h> header file contained the nonstandard macro FILE_TYPE. This macro has been removed from the <stdio.h> header file to prevent name space pollution.

5.3.5 tm_t Structure Removed from <time.h> Header


The <time.h> header file included a definition of nonstandard structure tm_t . This structure definition has been removed from the <time.h> header file to prevent name space pollution.

5.3.6 <ftw.h> Header File Now Compatible with Local-Time Function ftw


Recent versions of the C RTL, along with header files supplied with Version 6.5 of the C compiler, incorrectly made a local-time version of the ftw function the default when compiling with the _VMS_V6_SOURCE macro defined.


This behavior was incompatible with previous C RTL versions, and has been restored to default to the UTC-based ftw function under the same circumstances. A new macro, __LOCAL_TIME_FTW, has been added to control whether a UTC-based or local-time-based version of ftw is used. To get the local-time ftw , you now must compile with /DEFINE=__LOCAL_TIME_FTW, in addition to the macros _VMS_V6_SOURCE and _DECC_V4_SOURCE.

5.3.7 Incomplete Support for 64-bit iconv() Removed


Incomplete support for 64-bit iconv was mistakenly put into Spring 2002 ECO kits and OpenVMS Version 7.3-1. This gave the illusion of 64-bit iconv support under some circumstances (linking with STARLET.OLB). This was never supported and still is not supported.


Because 64-bit iconv is neither functional nor supported, DECC$_ICONV64 has been removed.

Users compiling with /POINTER=LONG should now expect a compiler error message such as the following:

%CC-W-PTRMISMATCH, In this statement, the referenced type of the
pointer value "(char ...)0" is "long pointer to char", which is
not compatible with "short pointer to char".

5.3.8 dlsym Function No Longer Fails on Images Linked with Warnings


Previously, the dlsym function could not activate a shareable image linked against modules that had compiler warnings. This has been fixed.

5.3.9 dlsym Function Now Recognizes Lowercase Names


Previously, library symbols containing lowercase characters could not be loaded using the dlsym function. This has been fixed.

More generally, the functions that dynamically load libraries ( dlopen , dlsym , dlclose , dlerror ) have been enhanced to provide the following capabilities:

  • Support for libraries with mixed-case symbol names
  • Ability to pass a full file path to dlopen
  • Validation of the specified library name

5.3.10 catopen Function Now Supports UNIX® Style Path Names


Previously, the catopen function did not accept a UNIX style path name containing a slash (/). This has been fixed. Now, if the path contains a slash character, it is treated as a UNIX style directory name and is converted to OpenVMS format.

5.3.11 Memory Management Functions Are Now Reentrant


Previously, the memory-mapping functions mmap , munmap , msync , and mprotect were not reentrant. Now they are.

5.3.12 Angle Brackets in File Specs Now Handled Correctly


Previously, on OpenVMS Version 7.3-1 or after installing ECO kits VMS73_ACRTL-V0200 or VMS722_ACRTLV0100, directory definitions that used angle brackets may not have been processed correctly, resulting in various errors related to the file or directory paths. This problem has been fixed.

5.3.13 Race Condition in sleep and usleep Is Fixed


Previously, in multithreaded applications with upcalls enabled, concurrent use of the sleep and usleep functions could cause an application to hang. This has been fixed.

5.3.14 UNIX to OpenVMS Name Translation Errors Fixed


The following UNIX to OpenVMS translation errors have been fixed:

  • The decc$translate_vms function failed to translate the file name a.b.c. ODS-5 support handles names only in the form returned from RMS. RMS reports the file a.b.c as a^.b.c, which is translated successfully.
  • The decc$translate_vms function incorrectly translated the file name ^% to ? instead of %.
  • The decc$to_vms function incorrectly translated the file name % to the OpenVMS name "%." instead of ^%.
  • The decc$translate_vms function failed to translate the name [crtl.][]. The function now correctly replaces [] with the current directory.

5.3.15 Behavior Changed for tzset with Invalid TZ


Previously, if the TZ environment variable contained an invalid value, the tzset function interpreted the invalid value as a colon (:), which is Greenwich Mean Time (GMT). This caused OpenVMS to interpret all file times expressed in Coordinated Universal Time (UTC) as if they were recorded in GMT.

This has been changed for OpenVMS Version 7.3-2. Now, for an invalid TZ value, /SYS$LOCALTIME is used.

On Tru64 UNIX systems, an invalid TZ value causes tzset to use the file /etc/zoneinfo/localtime . The OpenVMS equivalent of /etc/zoneinfo/localtime is the system logical name SYS$LOCALTIME. The OpenVMS behavior is now the same as the Tru64 UNIX behavior.

5.3.16 Attempt to Perform a pread or pwrite on an Unseekable File Is Now Properly Flagged as an Error


The X/Open® specification states that an attempt to perform a pread or pwrite on a file that is not seekable should result in an error. Previously, however, the C RTL implementation of the pread and pwrite functions did not return an error for a file descriptor (FD) associated with an unseekable file. Instead, the offset parameter was ignored and the operation was treated like a normal read/write, so the pread or pwrite call would succeed.

The pread and pwrite functions have been modified so that when the file is not a seekable file, the error code ESPIPE is returned to indicate that the FD is associated with a pipe or FIFO and thus is not seekable.

5.3.17 Open Files Removal Now Controlled With Feature Logical


In OpenVMS Version 7.3-1, the behavior of the C RTL was changed so that users could call the remove function on systems supporting the lib$delete_file qualifier LIB$M_FIL_IGNORE_ACCESS, and could find that files open for exclusive access by another process were unlinked. Although this is POSIX conformant behavior, it needed to be controlled by a feature logical so that existing behavior would not change unexpectedly.

OpenVMS Version 7.3-2 fixes this by adding a C RTL feature logical called DECC$ALLOW_REMOVE_OPEN_FILES. With this feature logical enabled, the POSIX conformant behavior of the remove function is allowed. If the feature logical is not enabled, the previous behavior (disallowing the removal) occurs.

5.3.18 fstat Function Now Checks Whether Disk Access Dates Were Enabled


Previously, on an ODS-5 disk with DECC$EFS_FILE_TIMESTAMPS enabled and the access dates option turned off, the fstat function returned the actual access time for the st_atime field when it should have returned the same value as the st_mtime field.

The fstat function now checks whether disk access dates were enabled.

5.3.19 Problem With Redefinition of Structures When Including <time.h> or <signal.h>


There is a potential problem with redefinition of structures in programs that directly or indirectly include either the <time.h> or <signal.h> header file. Prior to OpenVMS Version 7.3-2, the marker symbol _TIMESPEC_T_ was used to indicate that the timespec structure and timespec_t typedef had already been defined. If the <time.h> or <signal.h> header file is included before a definition of the timespec structure that conforms to the protocol prior to OpenVMS Version 7.3-2, the compiler issues a REDEFSTRUCT error.

To correct this problem, modify the program to use the new marker symbols __TIMESPEC and __TIMESPEC_T to indicate a prior definition of the timespec structure and timespec_t typedef, respectively.

Definitions Prior to Version 7.3-2:

Before OpenVMS Version 7.3-2, the <timers.h> header file included the following definitions:

#ifndef _TIMESPEC_T_
#   define _TIMESPEC_T_
    typedef struct timespec {
        unsigned long       tv_sec;         /* seconds */
        long                tv_nsec;        /* nanoseconds */
    } timespec_t;

In this definition, the marker symbol _TIMESPEC_T_ is used to avoid redefinition of the timespec structure and the timespec_t typedef.

Definitions in Version 7.3-2:

In OpenVMS Version 7.3-2, the <timers.h> header file is modified to include the following definition:

#ifndef _TIMESPEC_T_
   #   define _TIMESPEC_T_

#    ifndef __TIMESPEC
#       define __TIMESPEC
        struct timespec {
            unsigned long       tv_sec;     /* seconds */
            long                tv_nsec;    /* nanoseconds */
#    endif

#    ifndef __TIMESPEC_T
#       define __TIMESPEC_T
        typedef struct timespec timespec_t;
#    endif


The modification in this example performs the following functions:

  • Separates the structure definition from the typedef definition.
  • Preserves the _TIMESPEC_T_ marker symbol, which continues to indicate that both the timespec_t typedef and the timespec structure have been defined.
  • Adds two new marker symbols, __TIMESPEC_T and __TIMESPEC, to indicate the definition of the timespec_t typedef and timespec structure, respectively.

In addition, the standard header files <signal.h> and <time.h> are modified to include the following structure definition:

#   if (!defined __TIMESPEC && !defined _TIMESPEC_T_)
#     define __TIMESPEC
      struct timespec {
        unsigned long       tv_sec;         /* seconds */
        long                tv_nsec;        /* nanoseconds */
#   endif

5.3.20 Mixed Logical Name Search Lists Now Work


Previously, using mixed (rooted and nonrooted) logical name search lists worked on OpenVMS Version 7.1-2, but could generate an error for OpenVMS Version 7.2-2 and higher.

Starting with OpenVMS Version 7.3-2, this problem has been fixed with the addition of a new feature logical. The DECC$NO_ROOTED_SEARCH_LISTS feature logical controls how the decc$to_vms function resolves search-list logicals.

When the decc$to_vms function evaluates a UNIX-style path string and determines the first element to be a logical name, it does the following:

  • For rooted logicals or devices, the function appends ":[000000]" to the logical name.
    For example, if LOG1 is a rooted logical ($ DEFINE LOG1 [directory.]), then /LOG1/filename.ext translates to LOG1:[000000]filename.ext.
  • For nonrooted logicals, the function appends just a colon (:) to the logical name.
    For example, if LOG2 is a nonrooted logical ($ DEFINE LOG2 [directory]), then /LOG2/filename.ext translates to LOG2:filename.ext.
  • 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 described previously.

The preceding three cases lead to predictable, expected results.

In cases where the first element is a search list consisting of a mixture of rooted and nonrooted logicals, translating paths as described previously can result in behavior that differs from that of older OpenVMS versions (prior to Version 7.3-1), as follows:

  • Before OpenVMS Version 7.3-1, the decc$to_vms function appended only a colon (:) regardless of the contents of the logical. For search lists consisting of a mixture of rooted and nonrooted logicals, this resulted in certain expected behaviors.
  • 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 behavior that differs 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 pre-Version 7.3-1 behavior.

With DECC$NO_ROOTED_SEARCH_LISTS enabled, the following actions occur:

  • If a logical is detected in a file specification, and it is a search list, a colon (:) is appended when forming the OpenVMS file specification.
  • 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, the responses are as follows:

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

5.3.21 Program Deadlock Problem is Fixed


Previously, a deadlock could occur when one process received a signal from another process, resulting in unexpected program hangs.

This problem was reported with a particular Oracle application, but could be seen by other programs as well.

This problem has been fixed.

5.3.22 inet_ntop function Now Defined as Returning "const char *"


Previous versions of the C RTL defined the inet_ntop function as returning type "char *" . To conform to industry standards, the declaration of inet_ntop has been changed to return "const char *" .

5.3.23 exec No Longer Gets 0x35DF94 Error


Previously, C programs that make use of vfork / exec * calls could see unexpected %X35DF94 errors returned from the exec * call.

This problem has been fixed.

5.3.24 Compiler Errors Gone After Upgrading to OpenVMS Version 7.3-1


Compiler errors no longer occur after upgrading to OpenVMS Version 7.3-1 or later.

5.3.25 Missing Entry Points for BSD 4.4 Functions Fixed


Previously, the getaddrinfo , freeaddrinfo , getnameinfo , and gai_strerror functions were erroneously prefixed with __bsd44_, resulting in a link-time undefined-symbol error such as the following:

%LINK-W-USEUNDEF, undefined symbol __BSD44_GETNAMEINFO referenced

This problem is fixed in the <netdb.h> header file that ships with OpenVMS Version 7.3-2, so that these functions are no longer prefixed with __bsd_44_.

5.3.26 Correct IPv6 Symbol Names Now in UCX$IPC_XHR.EXE


Nine IPv6 related functions (inet6_xxxx) that were added to the C RTL for OpenVMS Version 7.3 had names that did not match the corresponding function names in the underlying TCP/IP layer. User applications that used these functions in the C RTL got an error indicating that the functions were not implemented. This problem has been fixed.

5.3.27 Translation Problem with Certain UNIX File Names Is Fixed


Previously, UNIX file names such as /logname were not translated successfully when logname resolved to a file like sys$login:login.com . This is now fixed.

5.3.28 rename Function Now Handles Logical Names Correctly


In some recent versions of the C RTL, the rename function did not allow conversion to a directory specification when an ambiguous file specification was passed as a logical name for the second argument. The ambiguity was about whether the logical represented a UNIX pathname or an OpenVMS directory specification. This was a change in behavior from earlier OpenVMS versions, which did handle these rename operations correctly.

This problem has now been fixed with a new feature logical, DECC$RENAME_ALLOW_DIR.

Enabling DECC$RENAME_ALLOW_DIR restores the earlier OpenVMS behavior of the rename function by allowing conversion to a directory specification where the second argument is an ambiguous file specification passed as a logical name. 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 code results in the following construction:


This example renames a file from one directory into another directory, which is the same behavior as in versions of OpenVMS prior to Version 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 the following construction:


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


  • 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.
  • On failure, the rename function returns - 1 and sets errno to one of the following values:
    • EISDIR --- The new argument points to a directory, and the old argument points to a file that is not a directory.
    • EEXIST --- The new argument points to a directory that already exists.
    • ENOTDIR --- The old argument names a directory, and the new argument names a nondirectory file.

Previous Next Contents Index