Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (t - z) tmpnam_guardian(3)
NAME
tmpnam_guardian - Constructs the name for a temporary file (Guardian tmpnam( ) 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>
char *tmpnam(
char *s);
char *tmpnam_guardian(
char *s);
PARAMETERS
s Species the address of an array of at least the number of bytes specified by
L_tmpnam, a constant defined in the stdio.h header file.
DESCRIPTION
The tmpnam() Guardian function and tmpnam_guardian() function generate filenames for
temporary files. The filename differs from all filenames in the default volume and subvolume;
consequently, you can use this name to create a new file.
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 filename 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 file naming conventions and structures of
the OSS and Guardian file systems, respectively.
The header file 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.
527192-018 Hewlett-Packard Company 731