Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

tmpnam_guardian(3) Guardian Native C Library Calls Reference Manual
NAME
tmpnam_guardian - Constructs the name for a temporary le (Guardian tmpnam( ) 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>
char *tmpnam(
char *s);
char *tmpnam_guardian(
char *s);
PARAMETERS
s Species the address of an array of at least the number of bytes specied by
L_tmpnam, a constant dened in the stdio.h header le.
DESCRIPTION
The tmpnam( ) Guardian function and tmpnam_guardian() function generate lenames for
temporary les. The lename differs from all lenames in the default volume and subvolume;
consequently, you can use this name to create a new le.
These functions are identical in the Guardian environment. Unless otherwise noted, this refer-
ence page uses tmpnam() to refer to both the tmpnam() Guardian function and
tmpnam_guardian() function.
The tmpnam( ) function generates a different lename each time it is called. If it is called more
than TMP_MAX times by a single process, it starts reusing previously used names.
Interoperability Variants
The C run-time library supports two variants of the tmpnam() function: tmpnam_oss() and
tmpnam_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 tmpnam( ) to the variant that matches the target compilation
environment. The target environment is set with the systype pragma.
Explicit calls to the tmpnam_oss() and tmpnam_guardian() variants in source code are only
made when the behavior of one environment is desired from the other environment.
tmpnam_oss( ) is functionally identical to the tmpnam( ) function of the OSS environment. It is
the same as setting systype oss at compile-time. systype oss is the default setting for c89
in the OSS environment.
tmpnam_guardian() is functionally identical to the tmpnam( ) function of the Guardian
environment. It is the same as setting systype guardian at compile-time. systype guar-
dian is the default setting for the C and C++ compilers in the Guardian environment.
To use the tmpnam_oss( ) or tmpnam_guardian() functions, specify the
_TANDEM_SOURCE feature test macro.
RETURN VALUES
If the s parameter is a null pointer, the tmpnam( ) function places its result into an internal static
area and returns a pointer to that area. The next call to this function might modify the contents of
the area.
718 Hewlett-Packard Company 527192-005