summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-04-04 21:15:37 +0000
committerimp <imp@FreeBSD.org>1999-04-04 21:15:37 +0000
commitd2a62e16376e5dfc38a2356fa706c28f86eba414 (patch)
treee193c586a21279aeb2b75ba809d5dbe9fb0f5729 /lib/libc/stdio
parent9c9c4fe46a1f8145607172776b42890cdfcd51e3 (diff)
downloadFreeBSD-src-d2a62e16376e5dfc38a2356fa706c28f86eba414.zip
FreeBSD-src-d2a62e16376e5dfc38a2356fa706c28f86eba414.tar.gz
Add mkstemps to the man page, and create a link for it.
Obtained from: OpenBSD Poked in the eye about committing new functions without a manpage: obrien
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/Makefile.inc4
-rw-r--r--lib/libc/stdio/mktemp.312
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/libc/stdio/Makefile.inc b/lib/libc/stdio/Makefile.inc
index e5f5e04..43deef4 100644
--- a/lib/libc/stdio/Makefile.inc
+++ b/lib/libc/stdio/Makefile.inc
@@ -1,5 +1,5 @@
# @(#)Makefile.inc 8.3 (Berkeley) 4/17/94
-# $Id: Makefile.inc,v 1.16 1999/02/08 21:32:37 dt Exp $
+# $Id: Makefile.inc,v 1.17 1999/03/05 13:01:22 bde Exp $
# stdio sources
.PATH: ${.CURDIR}/../libc/stdio
@@ -31,7 +31,7 @@ MLINKS+=fseek.3 fgetpos.3 fseek.3 fseeko.3 fseek.3 fsetpos.3 fseek.3 ftell.3 \
fseek.3 ftello.3 fseek.3 rewind.3
MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3
MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3
-MLINKS+=mktemp.3 mkdtemp.3 mktemp.3 mkstemp.3
+MLINKS+=mktemp.3 mkdtemp.3 mktemp.3 mkstemp.3 mktemp.3 mkstemps.3
MLINKS+=printf.3 asprintf.3 printf.3 fprintf.3 \
printf.3 snprintf.3 printf.3 sprintf.3 \
printf.3 vasprintf.3 \
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index 50d7de4..b6048ce 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -43,6 +43,8 @@
.Fn mktemp "char *template"
.Ft int
.Fn mkstemp "char *template"
+.Ft int
+.Fn mkstemps "char *template, int suffixlen"
.Ft char *
.Fn mkdtemp "char *template"
.Sh DESCRIPTION
@@ -82,6 +84,16 @@ This avoids the race between testing for a file's existence and opening it
for use.
.Pp
The
+.Fn mkstemps
+function acts the same as
+.Fn mkstemp ,
+except it permits a suffix to exist in the template. The template
+should be of the form
+.Pa /tmp/tmpXXXXXXsuffix .
+.Fn mkstemps
+is told the length of the suffix string, ie. strlen("suffix");
+.Pp
+The
.Fn mkdtemp
function makes the same replacement to the template as in
.Xr mktemp 3
OpenPOWER on IntegriCloud