Penguin
Annotated edit history of tmpnam(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 TMPNAM
2 !!!TMPNAM
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 NOTES
9 BUGS
10 CONFORMING TO
11 SEE ALSO
12 ----
13 !!NAME
14
15
16 tmpnam - create a name for a temporary file
17 !!SYNOPSIS
18
19
20 __#include
21 __''s''__);
22 __
23 !!DESCRIPTION
24
25
26 The __tmpnam()__ function returns a pointer to a string
27 that is a valid filename, and such that a file with this
28 name did not exist at some point in time, so that naive
29 programmers may think it a suitable name for a temporary
30 file. If the argument ''s'' is NULL this name is
31 generated in an internal static buffer and may be
32 overwritten by the next call to __tmpnam()__. If ''s''
33 is not NULL, the name is copied to the character array (of
34 length at least ''L_tmpnam'') pointed at by ''s'' and
35 the value ''s'' is returned in case of
36 success.
37
38
39 The path name that is created, has a directory prefix
40 ''P_tmpdir''. (Both ''L_tmpnam'' and ''P_tmpdir''
41 are defined in '''', just like the TMP_MAX
42 mentioned below.)
43 !!RETURN VALUE
44
45
46 The __tmpnam()__ function returns a pointer to a unique
47 temporary filename, or NULL if a unique name cannot be
48 generated.
49 !!ERRORS
50
51
52 No errors are defined.
53 !!NOTES
54
55
56 Portable applications that use threads cannot call
57 __tmpnam()__ with NULL parameter if either
58 _POSIX_THREAD_SAFE_FUNCTIONS or _POSIX_THREADS is
59 defined.
60
61
62 The __tmpnam()__ function generates a different string
63 each time it is called, up to TMP_MAX times. If it is called
64 more than TMP_MAX times, the behaviour is implementation
65 defined.
66 !!BUGS
67
68
69 Never use this function. Use tmpfile(3)
70 instead.
71 !!CONFORMING TO
72
73
74 SVID 2, POSIX, BSD 4.3, ISO 9899
75 !!SEE ALSO
76
77
78 mktemp(3), mkstemp(3), tempnam(3),
79 tmpfile(3)
80 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.