mktemp (ULTRIX) mktemp (ULTRIX)
NAME
mktemp, mkstemp - Constructs a unique filename
LIBRARY
Standard C Library (libc.a)
System V Compatibility Library (libsys5.a)
Berkeley Compatibility Library (libbsd.a)
ABSTRACT
#include <stdlib.h>
char *mktemp ( char *template );
char *mkstemp ( char *template );
BSD COMPATIBILITY
The Digital UNIX system provides the libbsd.a library to allow you to
use library functions that are compatible with ULTRIX BSD library func‐
tions. To use the BSD functions, your program needs to be compiled with
-D_BSD and the -lbsd options.
The BSD mktemp() function replaces the contents of the template vari‐
able with a unique filename. The function expects the template vari‐
able to look like a filename with six trailing X's, which will be
replaced with the current process ID and a pseudo-random letter. Unlike
the standard Digital UNIX mktemp(), the BSD function is not thread
safe.
SYSTEM V COMPATIBILITY
Digital UNIX provides the libsys5.a library to allow you to use library
functions that are compatible with System V library functions. This
library contains functions for those libc functions whose behavior is
incompatible with POSIX or X/Open standards. The ULTRIX system also
provides a System V compatibility library, libcV.a, which supplies a
number of features similar to those that libsys5.a provides. The most
significant behavior of the functions in this library is the compati‐
bility with System V nonblocked signals. For more information about
the System V (SVID-2) features in Digital UNIX, please refer to the
System V Compatibility User's Guide.
Under libsys.5, the filename is created with the getpid() function.
Unlike the standard Digital UNIX mktemp() function, the System V func‐
tion is not thread safe.
The mkstemp() function is not available in the libsys5.a library.
RELATED INFORMATION
Digital UNIX Functions:
mktemp, mkstemp, tmpfile(3), tmpnam(3), getpid(2) delim off
mktemp (ULTRIX)