summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/mktemp.354
-rw-r--r--lib/libc/stdio/stdio.38
-rw-r--r--lib/libc/stdio/tmpnam.348
3 files changed, 55 insertions, 55 deletions
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index 432d0de..43cef21 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -190,6 +190,33 @@ so that it will store string constants in a writable segment of memory.
See
.Xr gcc 1
for more information.
+.Sh SEE ALSO
+.Xr chmod 2 ,
+.Xr getpid 2 ,
+.Xr mkdir 2 ,
+.Xr open 2 ,
+.Xr stat 2
+.Sh HISTORY
+A
+.Fn mktemp
+function appeared in
+.At v7 .
+The
+.Fn mkstemp
+function appeared in
+.Bx 4.4 .
+The
+.Fn mkdtemp
+function first appeared in
+.Ox 2.2 ,
+and later in
+.Fx 3.2 .
+The
+.Fn mkstemps
+function first appeared in
+.Ox 2.4 ,
+and later in
+.Fx 3.4 .
.Sh BUGS
This family of functions produces filenames which can be guessed,
though the risk is minimized when large numbers of
@@ -226,30 +253,3 @@ which is not reentrant.
You must provide your own locking around this and other consumers of the
.Xr arc4random 3
API.
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr getpid 2 ,
-.Xr mkdir 2 ,
-.Xr open 2 ,
-.Xr stat 2
-.Sh HISTORY
-A
-.Fn mktemp
-function appeared in
-.At v7 .
-The
-.Fn mkstemp
-function appeared in
-.Bx 4.4 .
-The
-.Fn mkdtemp
-function first appeared in
-.Ox 2.2 ,
-and later in
-.Fx 3.2 .
-The
-.Fn mkstemps
-function first appeared in
-.Ox 2.4 ,
-and later in
-.Fx 3.4 .
diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3
index ab5d1fd..e839bea 100644
--- a/lib/libc/stdio/stdio.3
+++ b/lib/libc/stdio/stdio.3
@@ -237,10 +237,6 @@ definitions are explicitly removed.
.Xr open 2 ,
.Xr read 2 ,
.Xr write 2
-.Sh BUGS
-The standard buffered functions do not interact well with certain other
-library and system functions, especially
-.Xr vfork 2 .
.Sh STANDARDS
The
.Nm
@@ -331,3 +327,7 @@ library conforms to
.It "vwprintf formatted wide character output conversion"
.It "wprintf formatted wide character output conversion"
.El
+.Sh BUGS
+The standard buffered functions do not interact well with certain other
+library and system functions, especially
+.Xr vfork 2 .
diff --git a/lib/libc/stdio/tmpnam.3 b/lib/libc/stdio/tmpnam.3
index 7937a0a..825c3c9 100644
--- a/lib/libc/stdio/tmpnam.3
+++ b/lib/libc/stdio/tmpnam.3
@@ -156,6 +156,30 @@ return a pointer to a file name on success, and a
.Dv NULL
pointer
on error.
+.Sh COMPATIBILITY
+These interfaces are provided from System V and
+.Tn ANSI
+compatibility only.
+.Pp
+Most historic implementations of these functions provide
+only a limited number of possible temporary file names
+(usually 26)
+before file names will start being recycled.
+System V implementations of these functions
+(and of
+.Xr mktemp 3 )
+use the
+.Xr access 2
+system call to determine whether or not the temporary file
+may be created.
+This has obvious ramifications for setuid or setgid programs,
+complicating the portable use of these interfaces in such programs.
+.Pp
+The
+.Fn tmpfile
+interface should not be used in software expected to be used on other systems
+if there is any possibility that the user does not wish the temporary file to
+be publicly readable and writable.
.Sh ERRORS
The
.Fn tmpfile
@@ -202,30 +226,6 @@ It is strongly suggested that
be used in place of these functions.
(See
the FSA.)
-.Sh COMPATIBILITY
-These interfaces are provided from System V and
-.Tn ANSI
-compatibility only.
-.Pp
-Most historic implementations of these functions provide
-only a limited number of possible temporary file names
-(usually 26)
-before file names will start being recycled.
-System V implementations of these functions
-(and of
-.Xr mktemp 3 )
-use the
-.Xr access 2
-system call to determine whether or not the temporary file
-may be created.
-This has obvious ramifications for setuid or setgid programs,
-complicating the portable use of these interfaces in such programs.
-.Pp
-The
-.Fn tmpfile
-interface should not be used in software expected to be used on other systems
-if there is any possibility that the user does not wish the temporary file to
-be publicly readable and writable.
.Sh SEE ALSO
.Xr mkstemp 3 ,
.Xr mktemp 3
OpenPOWER on IntegriCloud