OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man3 / tempnam.3
index 6275e4d..b21d0fa 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 1999 Andries Brouwer (aeb@cwi.nl)
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -19,8 +20,9 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.TH TEMPNAM 3  2008-08-06 "" "Linux Programmer's Manual"
+.TH TEMPNAM 3  2014-02-27 "" "Linux Programmer's Manual"
 .SH NAME
 tempnam \- create a name for a temporary file
 .SH SYNOPSIS
@@ -38,6 +40,13 @@ Feature Test Macro Requirements for glibc (see
 .BR tempnam ():
 _BSD_SOURCE || _SVID_SOURCE
 .SH DESCRIPTION
+.I "Never use this function."
+Use
+.BR mkstemp (3)
+or
+.BR tmpfile (3)
+instead.
+
 The
 .BR tempnam ()
 function returns a pointer to a string that is a valid filename,
@@ -82,16 +91,18 @@ is allocated using
 .BR malloc (3)
 and hence should be freed by
 .BR free (3).
-.SH "RETURN VALUE"
-The
+.SH RETURN VALUE
+On success, the
 .BR tempnam ()
-function returns a pointer to a unique temporary
-filename, or NULL if a unique name cannot be generated.
+function returns a pointer to a unique temporary filename.
+It returns NULL if a unique name cannot be generated, with
+.I errno
+set to indicate the cause of the error.
 .SH ERRORS
 .TP
 .B ENOMEM
 Allocation of storage failed.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 SVr4, 4.3BSD, POSIX.1-2001.
 POSIX.1-2008 marks
 .BR tempnam ()
@@ -154,15 +165,16 @@ upon failure to find a unique name.
 .SH BUGS
 The precise meaning of "appropriate" is undefined;
 it is unspecified how accessibility of a directory is determined.
-
-Never use this function.
-Use
-.BR mkstemp (3)
-or
-.BR tmpfile (3)
-instead.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR mkstemp (3),
 .BR mktemp (3),
 .BR tmpfile (3),
 .BR tmpnam (3)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.