]> Zhao Yanbai Git Server - minix.git/commitdiff
Move OpenBSD diff(1) into minix/usr.bin 85/3185/2
authorDavid van Moolenbroek <david@minix3.org>
Sat, 19 Sep 2015 23:21:24 +0000 (23:21 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Wed, 23 Sep 2015 12:03:08 +0000 (12:03 +0000)
Editor's note: NetBSD uses GNU diff.

Change-Id: I15d4441c73e0c626d0e5fda8c8683d131fbcbc38

minix/commands/Makefile
minix/usr.bin/Makefile
minix/usr.bin/diff/Makefile [moved from minix/commands/diff/Makefile with 100% similarity]
minix/usr.bin/diff/diff.1 [moved from minix/commands/diff/diff.1 with 100% similarity]
minix/usr.bin/diff/diff.c [moved from minix/commands/diff/diff.c with 100% similarity]
minix/usr.bin/diff/diff.h [moved from minix/commands/diff/diff.h with 100% similarity]
minix/usr.bin/diff/diffdir.c [moved from minix/commands/diff/diffdir.c with 98% similarity]
minix/usr.bin/diff/diffreg.c [moved from minix/commands/diff/diffreg.c with 100% similarity]
minix/usr.bin/diff/pathnames.h [moved from minix/commands/diff/pathnames.h with 100% similarity]
minix/usr.bin/diff/xmalloc.c [moved from minix/commands/diff/xmalloc.c with 100% similarity]
minix/usr.bin/diff/xmalloc.h [moved from minix/commands/diff/xmalloc.h with 100% similarity]

index cb9ca97d7b41b102ba6a397059ae143c647fc8b3..48716f07122af79887792669d0517d62bf7f2b06 100644 (file)
@@ -7,7 +7,7 @@ SUBDIR= add_route arp at backup btrace \
        ci cleantmp co \
        compress crc cron crontab \
        decomp16 DESCRIBE devmand devsize dhcpd \
-       dhrystone diff diskctl \
+       dhrystone diskctl \
        eject fbdctl \
        fix format fsck.mfs \
        gcov-pull host \
index 4a115a3f8d4fccd91bcffcccd0be19f538b7246f..2ca8843bec0dbc514b7a58e37f6ebe3904dd32f3 100644 (file)
@@ -4,6 +4,7 @@
 SUBDIR+=       eepromread
 .endif # ${MACHINE_ARCH} == "earm"
 
+SUBDIR+=       diff
 SUBDIR+=       grep
 SUBDIR+=       mined
 SUBDIR+=       ministat
similarity index 98%
rename from minix/commands/diff/diffdir.c
rename to minix/usr.bin/diff/diffdir.c
index 2d6f091beb193b089b430bbde8fd8284ac59842f..cc4fb992cc6db919033ab9064950f25a7fc78afc 100644 (file)
@@ -176,7 +176,11 @@ getdiffdirentries(int fd, char *buf, int nbytes)
        if(!(read_de = malloc(readlen)))
                errx(1, "getdiffdirentries: can't malloc");
 
+#ifndef __minix
        dentsbytes_actual = getdents(fd, (struct dirent *) read_de, readlen);
+#else /* __minix */
+       dentsbytes_actual = getdents(fd, read_de, readlen);
+#endif /* __minix */
 
        if(dentsbytes_actual <= 0)
                return dentsbytes_actual;