summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2011-01-10 20:59:15 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2011-01-10 20:59:15 +0000
commitcb5ac835f136e12778cf5930568c918d89ab16ee (patch)
treeca8c76d551d8ee16299618f1648860aeba31eb38 /lib/libc
parentb2faf0be2bd30422bc9ec35f47d7e276787868c9 (diff)
mkdtemp() is present in POSIX 1003.1-2008
Add a warning about using less than 6 Xs causing an error on some systems
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/mktemp.320
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index 34c2a341fd6..9991792223d 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mktemp.3,v 1.46 2011/01/07 21:57:01 nicm Exp $
+.\" $OpenBSD: mktemp.3,v 1.47 2011/01/10 20:59:14 millert Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: January 7 2011 $
+.Dd $Mdocdate: January 10 2011 $
.Dt MKTEMP 3
.Os
.Sh NAME
@@ -61,6 +61,9 @@ depends on the number of Xs provided; six Xs will result in
.Fn mktemp
testing roughly 62 ** 6 combinations.
At least 6 Xs should be used, though 10 is much better.
+Some
+.No non- Ns Bx
+implementations return an error if fewer than 6 Xs are used.
.Pp
The
.Fn mktemp
@@ -256,23 +259,18 @@ function.
.Xr tmpnam 3
.Sh STANDARDS
The
-.Fn mktemp
+.Fn mkdtemp
and
.Fn mkstemp
functions conform to the
-.St -xpg4 ,
-but
-.Fn mktemp
-is marked as legacy.
+.St -p1003.1-2008 .
The ability to specify more than six Xs and setting
.Xr errno 2
-in case of errors are extensions to this standard.
+in case of errors are extensions to the standard.
.Pp
The
-.Fn mkdtemp
-and
.Fn mkstemps
-functions are non-standard and should not be used if portability is required.
+function is non-standard and should not be used if portability is required.
.Sh HISTORY
A
.Fn mktemp