Open System Services System Calls Reference Manual (G06.25+, H06.03+)

rename_guardian(2) OSS System Calls Reference Manual
NAME
rename_guardian - Renames a le (Guardian rename( ) function)
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
int rename(
const char *from,
const char *to);
int rename_guardian(
const char *from,
const char *to);
PARAMETERS
from Species the current Guardian lename of the le to be renamed.
to Species the new Guardian lename of the le to be renamed.
If the to parameter points to an existing le, that le is replaced by the contents
of the object identied by the from parameter.
DESCRIPTION
The Guardian rename() function and rename_guardian() function rename a le within the
Guardian le 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 le.
Interoperability Variants
The C run-time library supports two variants of the rename() function: rename_oss() and
rename_guardian(). The variants support the unique le-naming conventions and structures of
the OSS and Guardian le 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.
624 Hewlett-Packard Company 527186-003