Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
rename_oss(2) OSS System Calls Reference Manual
Interoperability Variants
The C run-time library supports two variants of the rename() function: rename_oss() and
rename_guardian(). The variants support the unique file-naming conventions and structures of
the OSS and Guardian file systems, respectively.
The header file maps calls to rename() to the variant that matches the target compilation
environment. The target environment is set with the systype pragma.
Explicit calls to the rename_oss() and rename_guardian() variants in source code are made
only when the behavior of one environment is desired from the other environment.
rename_oss() is functionally identical to the rename() function of the OSS environment. It is
the same as setting systype oss at compile time. systype oss is the default setting for use
of the c89 utility in the OSS environment.
rename_guardian() is functionally identical to the rename() function of the Guardian environ-
ment. It is the same as setting systype guardian at compile time. systype guardian is the
default setting for the C and C++ compilers in the Guardian environment.
To use the rename_oss() and rename_guardian() functions, specify the
_TANDEM_SOURCE feature-test macro.
RETURN VALUES
Upon successful completion, the rename() function returns the value 0 (zero). Otherwise, the
value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the rename() function sets errno to the corresponding
value. The file or directory name remains unchanged.
[EACCES] One of the following conditions exists:
• A component of either pathname denies search permission.
• One of the directories containing from or to denies write permission.
• The S_ISVTX flag is set on the directory containing the file referred to
by the from parameter. However, the calling process is not any of the
following:
— The file owner
— The directory owner
— A process with appropriate privileges
• The S_ISVTX flag is set on the directory containing an existing file
referred to by the to parameter. However, the calling process is not any
of the following:
— The file owner
— The directory owner
— A process with appropriate privileges
6−48 Hewlett-Packard Company 527186-023