hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP OpenVMS Alpha Version 7.3--2 Release Notes

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:

BCK_EVENT_K_JOURNAL_OPEN
BCK_EVENT_K_JOURNAL_WRITE
BCK_EVENT_K_JOURNAL_CLOSE

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 settingcase=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 usecase=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

V7.3-2

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

V7.3-2

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


accept getpeername getsockname inet_ntop inet_pton 

5.3.3 fwrite Function No Longer Writes Inappropriate Records to a File

V7.3-2

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

V7.3-2

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

V7.3-2

The<time.h> header file included a definition of nonstandard structuretm_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

V7.3-2

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 theftw function the default when compiling with the _VMS_V6_SOURCE macro defined.

Workaround

This behavior was incompatible with previous C RTL versions, and has been restored to default to the UTC-basedftw 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 offtwis used. To get the local-timeftw, 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

V7.3-2

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

Workaround

Because 64-biticonv 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

V7.3-2

Previously, thedlsym 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

V7.3-2

Previously, library symbols containing lowercase characters could not be loaded using thedlsym 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:

5.3.10 catopen Function Now Supports UNIX® Style Path Names

V7.3-2

Previously, thecatopen 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

V7.3-2

Previously, the memory-mapping functionsmmap,munmap,msync, andmprotectwere not reentrant. Now they are.

5.3.12 Angle Brackets in File Specs Now Handled Correctly

V7.3-2

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

V7.3-2

Previously, in multithreaded applications with upcalls enabled, concurrent use of thesleep andusleepfunctions could cause an application to hang. This has been fixed.

5.3.14 UNIX to OpenVMS Name Translation Errors Fixed

V7.3-2

The following UNIX to OpenVMS translation errors have been fixed:

5.3.15 Behavior Changed for tzset with Invalid TZ

V7.3-2

Previously, if the TZ environment variable contained an invalid value, thetzset 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 causestzsetto 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

V7.3-2

The X/Open® specification states that an attempt to perform apreadorpwrite on a file that is not seekable should result in an error. Previously, however, the C RTL implementation of thepreadandpwrite 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 thepread orpwrite call would succeed.

Thepread andpwrite 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

V7.3-2

In OpenVMS Version 7.3-1, the behavior of the C RTL was changed so that users could call theremove 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 theremove 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

V7.3-2

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

Thefstat function now checks whether disk access dates were enabled.

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

V7.3-2

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 thetimespec structure andtimespec_t typedef had already been defined. If the<time.h> or<signal.h> header file is included before a definition of thetimespec 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 thetimespec structure andtimespec_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; #endif 

In this definition, the marker symbol _TIMESPEC_T_ is used to avoid redefinition of thetimespec structure and thetimespec_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  #endif 

The modification in this example performs the following functions:

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

V7.3-2

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 thedecc$to_vms function resolves search-list logicals.

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

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:

DECC$NO_ROOTED_SEARCH_LISTS controls how thedecc$to_vmsfunction 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:

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:

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

5.3.21 Program Deadlock Problem is Fixed

V7.3-2

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

V7.3-2

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

5.3.23 exec No Longer Gets 0x35DF94 Error

V7.3-2

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

This problem has been fixed.

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

V7.3-2

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

V7.3-2

Previously, thegetaddrinfo,freeaddrinfo,getnameinfo, andgai_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

V7.3-2

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

V7.3-2

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

5.3.28 rename Function Now Handles Logical Names Correctly

V7.3-2

In some recent versions of the C RTL, therename 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 therename 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:


dev:[dir.subdir]file.ext

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, ifdev:[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 ofrename. 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:


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. Sorename 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 causingrename to a directory to take precedence overrename to a file. Consider this example:


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

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

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

Notes

  • 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, therename function returns - 1 and setserrno 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