Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

rename_guardian(2) OSS System Calls Reference Manual
NAME
rename_guardian - Renames a file (Guardian rename( ) function)
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <stdio.h>
int rename(
const char *from,
const char *to);
int rename_guardian(
const char *from,
const char *to);
PARAMETERS
from Specifies the current Guardian filename of the file to be renamed.
to Specifies the new Guardian filename of the file to be renamed.
If the to parameter points to an existing file, that file is replaced by the contents
of the object identified by the from parameter.
DESCRIPTION
The Guardian rename() function and rename_guardian() function rename a file within the
Guardian file system.
These functions are identical in the Guardian environment. (Refer to Interoperability Variants
later in this reference page.) Unless otherwise noted, this reference page uses rename() to refer
to both the Guardian rename() function and rename_guardian() function.
The rename() function cannot rename an open file.
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 le 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.
644 Hewlett-Packard Company 527186-023