]> Zhao Yanbai Git Server - minix.git/commitdiff
Import NetBSD mktemp
authorThomas Veerman <thomas@minix3.org>
Wed, 6 Jun 2012 14:28:48 +0000 (14:28 +0000)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:54:48 +0000 (10:54 +0000)
commands/Makefile
usr.bin/Makefile
usr.bin/mktemp/Makefile [moved from commands/mktemp/Makefile with 100% similarity]
usr.bin/mktemp/mktemp.1 [moved from commands/mktemp/mktemp.1 with 100% similarity]
usr.bin/mktemp/mktemp.c [moved from commands/mktemp/mktemp.c with 99% similarity]

index a52473970e73f1e684fbdebd9be7091a20dfc196..97c96af06d72052efa24b24283cfecbca7f9eafd 100644 (file)
@@ -33,7 +33,7 @@ SUBDIR=       add_route arp ash at \
        unstack update uud uue version vol wc \
        whereis which who write writeisofs fetch \
        xargs yes zdump zmodem pkgin_cd \
-       mktemp worldstone updateboot update_bootcfg
+       worldstone updateboot update_bootcfg
 
 .if ${MACHINE_ARCH} == "i386"
 SUBDIR+=       atnormalize dosread fdisk loadfont \
index 468adfc79611b4969857c480dd5b3e6a922ab07b..f2db6633d8365d6904abd6269b92c4e243c6dd76 100644 (file)
@@ -3,7 +3,7 @@
 .include <bsd.own.mk>
 
 # 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 \
        ldd/elf32 .WAIT ldd
 
similarity index 99%
rename from commands/mktemp/mktemp.c
rename to usr.bin/mktemp/mktemp.c
index b0ea03605880538c85f4bf52a46fdd3aecaf3c76..34a88dbfd3784508b6eed4d4b1f16c30ed61df7d 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
-#if 0
 #if defined(__RCSID) && !defined(__lint)
 __RCSID("$NetBSD: mktemp.c,v 1.11 2009/08/15 20:02:28 christos Exp $");
 #endif /* !__lint */
-#endif
 
 static void usage(void) __dead;
 
@@ -81,7 +79,7 @@ main(int argc, char **argv)
                case 'p':
                        tmpdir = optarg;
                        break;
-
+                       
                case 'q':
                        qflag++;
                        break;
@@ -120,7 +118,7 @@ main(int argc, char **argv)
        } else if (argc < 1) {
                usage();
        }
-
+               
        /* generate all requested files */
        while (name != NULL || argc > 0) {
                if (name == NULL) {