1 --- tmpnam.3.bsdnew 2009-11-11 13:33:17.000000000 -0800
2 +++ tmpnam.3 2009-11-11 15:17:16.000000000 -0800
4 .\" @(#)tmpnam.3 8.2 (Berkeley) 11/17/93
5 .\" $FreeBSD: src/lib/libc/stdio/tmpnam.3,v 1.20 2007/03/16 21:46:24 maxim Exp $
21 -.Fn tmpnam "char *str"
26 -.Fn tempnam "const char *tmpdir" "const char *prefix"
28 +.Fa "const char *dir"
29 +.Fa "const char *pfx"
34 @@ -63,12 +70,13 @@ returns, causing the file to be automati
35 reference to it is closed.
36 The file is opened with the access value
38 -The file is created in the directory determined by the environment variable
39 +If the environment variable
42 -The default location if
44 +the file is created in the specified directory.
45 +The default location, if
52 @@ -83,7 +91,7 @@ past.
53 is defined in the include file
60 the file name is copied to the buffer it references.
61 @@ -93,7 +101,7 @@ In either case,
62 returns a pointer to the file name.
64 The buffer referenced by
67 is expected to be at least
70 @@ -109,21 +117,23 @@ is similar to
71 but provides the ability to specify the directory which will
72 contain the temporary file and the file name prefix.
74 -The environment variable
76 -(if set), the argument
85 +the environment variable
90 +and finally, the current directory,
91 are tried, in the listed order, as directories in which to store the
99 is used to specify a file name prefix, which will be the
100 @@ -235,6 +245,12 @@ It is strongly suggested that
101 be used in place of these functions.
104 +.Sh LEGACY DESCRIPTION
105 +In legacy mode, the order directories are tried by the
107 +function is different; the environment variable
109 +(if defined) is used first.