Import NetBSD mktemp

This commit is contained in:
Thomas Veerman 2012-06-06 14:28:48 +00:00
parent 2e2caf5919
commit 0b2db08aec
5 changed files with 4 additions and 6 deletions

View file

@ -33,7 +33,7 @@ SUBDIR= add_route arp ash at \
unstack update uud uue version vol wc \ unstack update uud uue version vol wc \
whereis which who write writeisofs fetch \ whereis which who write writeisofs fetch \
xargs yes zdump zmodem pkgin_cd \ xargs yes zdump zmodem pkgin_cd \
mktemp worldstone updateboot update_bootcfg worldstone updateboot update_bootcfg
.if ${MACHINE_ARCH} == "i386" .if ${MACHINE_ARCH} == "i386"
SUBDIR+= atnormalize dosread fdisk loadfont \ SUBDIR+= atnormalize dosread fdisk loadfont \

View file

@ -3,7 +3,7 @@
.include <bsd.own.mk> .include <bsd.own.mk>
# NetBSD imports # NetBSD imports
SUBDIR= login indent m4 make stat tic sed mkdep uniq seq du man \ SUBDIR= login indent m4 make mktemp stat tic sed mkdep uniq seq du man \
apropos chpass newgrp passwd bzip2 bzip2recover gzip su genassym \ apropos chpass newgrp passwd bzip2 bzip2recover gzip su genassym \
ldd/elf32 .WAIT ldd ldd/elf32 .WAIT ldd

View file

@ -49,11 +49,9 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#if 0
#if defined(__RCSID) && !defined(__lint) #if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: mktemp.c,v 1.11 2009/08/15 20:02:28 christos Exp $"); __RCSID("$NetBSD: mktemp.c,v 1.11 2009/08/15 20:02:28 christos Exp $");
#endif /* !__lint */ #endif /* !__lint */
#endif
static void usage(void) __dead; static void usage(void) __dead;
@ -81,7 +79,7 @@ main(int argc, char **argv)
case 'p': case 'p':
tmpdir = optarg; tmpdir = optarg;
break; break;
case 'q': case 'q':
qflag++; qflag++;
break; break;
@ -120,7 +118,7 @@ main(int argc, char **argv)
} else if (argc < 1) { } else if (argc < 1) {
usage(); usage();
} }
/* generate all requested files */ /* generate all requested files */
while (name != NULL || argc > 0) { while (name != NULL || argc > 0) {
if (name == NULL) { if (name == NULL) {