VMS Help
V73 Features, Programming Features, Compaq C Run-Time Library Enhancements
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The following sections describe the Compaq C RTL enhancements
included in OpenVMS Version 7.3. For more details, refer to the
revision of the Compaq C RTL Reference Manual that ships with
Compaq C Version 6.3 or later.
1 - Strptime Function Is XPG5-Compliant
|
The strptime function has been modified to be compliant with
X/Open CAE Specification System Interfaces and Headers Issue
5 (commonly known as XPG5). The change for XPG5 is in how the
strptime function processes the "%y" directive for a two-digit
year within the century if no century is specified.
When a century is not otherwise specified, XPG5 requires that
values for the "%y" directive in the range 69-99 refer to years
in the twentieth century (1969 to 1999 inclusive), while values
in the range 00-68 refer to years in the twenty-first century
(2000 to 2068 inclusive). Essentially, for the "%y" directive,
strptime became a "pivoting" function, with 69 being a pivoting
year.
Before this change, the strptime function interpreted a two-digit
year with no century as a year within twentieth century.
With OpenVMS Version 7.3, XPG5-compliant strptime becomes a
default strptime function in the Compaq C RTL. However, the
previous nonpivoting XPG4-compliant strptime function is retained
for compatibility.
The pivoting is controlled by the DECC$XPG4_STRPTIME logical
name. To use the nonpivoting version of strptime, either:
o Define DECC$XPG4_STRPTIME to any value before invoking the
application.
OR
o Call the nonpivoting strptime directly as the function
decc$strptime_xpg4.
2 - Nested Directory Levels Limitation Lifted (Alpha)
|
The Compaq C RTL I/O subsystem was enhanced to remove the
restriction of eight nested directory levels for an ODS-5 device.
This affects Compaq C RTL functions such as access, mkdir,
opendir, rmdir, and stat.
3 - Improved Support for Extended File Specifications (Alpha)
|
The following sections describe improved Compaq C RTL support for
extended file specifications.
3.1 - Case Preservation
Programs linked against the Compaq C Run-Time Library DECC$SHR
can now preserve the case of file names on ODS level 5 disks.
This applies when creating or reporting file names. By default,
this feature is disabled. To enable this feature, enter the
following command:
$ DEFINE DECC$EFS_CASE_PRESERVE ENABLE
If file names are all in uppercase, use the following command to
convert the names to lowercase when reporting the name in UNIX
style:
$ DEFINE DECC$EFS_CASE_SPECIAL ENABLE
If file names are not all in uppercase, then DEFINE DECC$EFS_
CASE_SPECIAL ENABLE preserves case.
The commands to disable the preceding logical-name settings are:
$ DEFINE DECC$EFS_CASE_PRESERVE DISABLE
$ DEFINE DECC$EFS_CASE_SPECIAL DISABLE
The setting for the DECC$EFS_CASE_SPECIAL logical name, if not
set to DISABLE, supersedes any setting for the DECC$EFS_CASE_
PRESERVE logical name.
The DECC$EFS_CASE_PRESERVE and DECC$EFS_CASE_SPECIAL logicals
are checked only once per image activation, not on a file-by-file
basis.
3.2 - Long File Names
For OpenVMS Alpha Version 7.2, some basic Compaq C RTL I/O
functions (creat, stat, and the functions from the open family
of functions) were enhanced to accept long OpenVMS-style file
names for an ODS-5 device.
For OpenVMS Alpha Version 7.3, all other Compaq C RTL functions,
except chdir and the functions from the exec family of functions,
were also enhanced to accept long OpenVMS-style file names for an
ODS-5 device.
All C RTL functions that accept or report full file
specifications will process file specifications up to 4095 bytes
long, subject to the rules defined for the media format. For
file specifications in OpenVMS format, there are no special
restrictions. In situations where a full file specification
cannot be reported because the buffer is too short, the function
attempts to report the abbreviated name.
UNIX file names have the following restrictions:
o Names containing special characters, such as multiple periods,
caret, or multinational characters, may be rejected.
o A function call may report failure if the output buffer is
not large enough to receive the full name. For OpenVMS style
names, the reported name would contain a file ID-abbreviated
name. There is no representation of file ID-abbreviated names
defined for UNIX.
4 - Exact Case Argv Arguments (Alpha)
|
Nonquoted command-line arguments passed to C and C++ programs
(argv arguments) can now optionally have their case preserved,
rather than being lowercased as in previous versions.
By default, this feature is disabled.
To enable this case preservation feature, define the logical
name DECC$ARGV_PARSE_STYLE to "ENABLE" and set the process-level
DCL parse style flag to "EXTENDED" in the process running the
program:
$ DEFINE DECC$ARGV_PARSE_STYLE ENABLE
$ SET PROCESS/PARSE_STYLE=EXTENDED
Enabling this feature also ensures that the image name returned
in argv[0] is also case-preserved.
To disable this feature, use any one of the following commands:
$ SET PROCESS/PARSE_STYLE=TRADITIONAL
or
$ DEFINE/SYSTEM DECC$ARGV_PARSE_STYLE DISABLE
or
$ DEASSIGN DECC$ARGV_PARSE_STYLE
The value of the DECC$ARGV_PARSE_STYLE logical is case-
insensitive.
5 - Implicitly Opening Files for Shared Access
|
The Compaq C RTL was enhanced to open all files for shared access
as if the "shr=del,get,put,upd" option was specified in the open*
or creat call.
To enable this feature, define the logical name DECC$FILE_SHARING
to the value "ENABLE". The value is case-insensitive.
DECC$FILE_SHARING is checked only once per image activation, not
on a file-by-file basis.
6 - Translating UNIX File Specifications
|
The Compaq C RTL was enhanced to allow interpreting the leading
part of a UNIX-style file specification as either a subdirectory
name or a device name.
The default translation of a "foo/bar" UNIX-style name to a
"foo:bar" VMS-style name remains the default.
To translate a "foo/bar" UNIX-style name to a "[.foo]bar" VMS-
style name, define the logical name DECC$DISABLE_TO_VMS_LOGNAME_
TRANSLATION to ENABLE.
DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION is checked only once per
image activation, not on a file-by-file basis.
The Compaq C RTL has added the following functions in OpenVMS
Version 7.3:
fchown
link
utime
utimes
writev
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.