Move bcopy() and friends into strings.h, move mkdir(), mknod() and friends into sys...
authorNick Downing <downing.nick@gmail.com>
Sun, 22 Jan 2017 01:41:18 +0000 (12:41 +1100)
committerNick Downing <downing.nick@gmail.com>
Sun, 22 Jan 2017 01:41:18 +0000 (12:41 +1100)
33 files changed:
lib/libx_c/Makefile
lib/libx_c/gen.h
lib/libx_c/gen/bcmp.c
lib/libx_c/gen/bcopy.c
lib/libx_c/gen/bzero.c
lib/libx_c/gen/calloc.c
lib/libx_c/gen/getpwnamuid.c
lib/libx_c/gen/malloc.c
lib/libx_c/gen/valloc.c
lib/libx_c/groups.txt
lib/libx_c/net/hosttable/gethostnamadr.c
lib/libx_c/net/named/gethostnamadr.c
lib/libx_c/net/rcmd.c
lib/libx_c/net/res_debug.c
lib/libx_c/net/res_mkquery.c
lib/libx_c/net/rexec.c
lib/libx_c/post.patch
lib/libx_c/stdio/doprnt.c
lib/libx_c/stdio/fread.c
lib/libx_c/stdio/fwrite.c
lib/libx_c/string.h
lib/libx_c/strings.h
lib/libx_c/sys/chmod.c
lib/libx_c/sys/dir.h
lib/libx_c/sys/fchmod.c
lib/libx_c/sys/file.h
lib/libx_c/sys/mkdir.c
lib/libx_c/sys/mknod.c
lib/libx_c/sys/select.h
lib/libx_c/sys/stat.h
lib/libx_c/sys/umask.c
xify/ld.c
xify/xifyfilt.c

index 6a0e455..3f752a8 100644 (file)
@@ -93,20 +93,19 @@ install-headers:
        ln -s sys/file.h fcntl.h; \
        ln -s a.out.h nlist.h; \
        ln -s sys/signal.h signal.h; \
-       ln -s sys/syslog.h syslog.h
-#      for i in `find . -name '*.h' -print`; \
+       ln -s gen.h stdlib.h; \
+       ln -s sys/syslog.h syslog.h; \
+       ln -s sys.h unistd.h
+#      for i in \
+#`find . -name '*.h' -print` \
+#frame.h errno.h fcntl.h nlist.h signal.h stdlib.h syslog.h unistd.h; \
 #      do \
-#              mkdir -p ${DESTDIR}/usr/include/.xify/`dirname $$i`; \
-#              ${ROOT}/cross/lib/xify $$i ${DESTDIR}/usr/include/.xify/`dirname $$i`/x_`basename $$i`; \
+#              mkdir -p ${DESTDIR}/usr/include/`dirname $$i`/.xify; \
+#              ${ROOT}/cross/lib/xify \
+#$$i \
+#${DESTDIR}/usr/include/`dirname $$i`/.xify/x_`basename $$i` \
+#${DESTDIR}/usr/include/`dirname $$i`/.xify/x_`basename $$i`.deps; \
 #      done
-#      cd ${DESTDIR}/usr/include/.xify; \
-#      ln -s vax machine; \
-#      ln -s machine/x_frame.h x_frame.h; \
-#      ln -s sys/x_errno.h x_errno.h; \
-#      ln -s sys/x_file.h x_fcntl.h; \
-#      ln -s x_a.out.h x_nlist.h; \
-#      ln -s sys/x_signal.h x_signal.h; \
-#      ln -s sys/x_syslog.h x_syslog.h
 
 install:
        ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
index 65bf224..d4245ca 100644 (file)
@@ -49,15 +49,6 @@ int atoi __P((register char *p));
 /* gen/atol.c */
 long atol __P((register char *p));
 
-/* gen/bcmp.c */
-int bcmp __P((void *_b1, void *_b2, register int length));
-
-/* gen/bcopy.c */
-int bcopy __P((void *_src, void *_dst, register int length));
-
-/* gen/bzero.c */
-int bzero __P((void *_b, register int length));
-
 /* gen/calloc.c */
 void *calloc __P((register unsigned num, register unsigned size));
 int cfree __P((void *p, unsigned num, unsigned size));
index 03f55f2..97cfb75 100644 (file)
@@ -1,4 +1,4 @@
-#include <gen.h>
+#include <strings.h>
 
 /*
  * Copyright (c) 1987 Regents of the University of California.
index c3615d2..338e7ef 100644 (file)
@@ -1,10 +1,10 @@
-#include <gen.h>
+#include <strings.h>
 #include <sys/types.h>
 
-#ifdef X_
-#define INT intptr_t
+#ifdef __STDC__
+#include <stdint.h>
 #else
-#define INT int
+typedef int intptr_t;
 #endif
 
 /*
@@ -25,7 +25,7 @@ int bcopy(_src, _dst, length) void *_src; void *_dst; register int length; {
 #define dst (*(char **)&_dst)
        if (length && src != dst)
                if (/*(u_int)*/dst < /*(u_int)*/src)
-                       if (((INT)src | (INT)dst | length) & 3)
+                       if (((intptr_t)src | (intptr_t)dst | length) & 3)
                                do      /* copy by bytes */
                                        *dst++ = *src++;
                                while (--length);
@@ -38,7 +38,7 @@ int bcopy(_src, _dst, length) void *_src; void *_dst; register int length; {
                else {                  /* copy backwards */
                        src += length;
                        dst += length;
-                       if (((INT)src | (INT)dst | length) & 3)
+                       if (((intptr_t)src | (intptr_t)dst | length) & 3)
                                do      /* copy by bytes */
                                        *--dst = *--src;
                                while (--length);
index ebe4d09..2de2cdf 100644 (file)
@@ -1,4 +1,4 @@
-#include <gen.h>
+#include <strings.h>
 
 /*
  * Copyright (c) 1987 Regents of the University of California.
index ead51f7..d0ab49a 100644 (file)
@@ -1,4 +1,5 @@
 #include <gen.h>
+#include <strings.h>
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)calloc.c   5.2 (Berkeley) 3/9/86";
index 8d28dc8..6d2ab2f 100644 (file)
@@ -1,4 +1,3 @@
-#include <gen.h>
 #include <ndbm.h>
 #include <pwd.h>
 #include <stdio.h>
index 2104b99..15d87dc 100644 (file)
@@ -1,13 +1,14 @@
 #include <gen.h>
 #include <stdio.h>
+#include <strings.h>
 #include <sys.h>
 #include <sys/proc.h>
 #include <sys/types.h>
 
-#ifdef X_
-#define INT intptr_t
+#ifdef __STDC__
+#include <stdint.h>
 #else
-#define INT int
+typedef int intptr_t;
 #endif
 
 /*
@@ -117,7 +118,7 @@ void *malloc(nbytes) unsigned nbytes; {
        if (pagesz == 0) {
                pagesz = n = getpagesize();
                op = (union overhead *)sbrk(0);
-               n = n - sizeof (*op) - ((INT)op & (n - 1));
+               n = n - sizeof (*op) - ((intptr_t)op & (n - 1));
                if (n < 0)
                        n += pagesz;
                if (n) {
@@ -145,7 +146,7 @@ void *malloc(nbytes) unsigned nbytes; {
                amt = 16;       /* size of first bucket */
                bucket = 1;
 #endif
-               n = -(INT)(sizeof (*op) + RSLOP);
+               n = -(intptr_t)(sizeof (*op) + RSLOP);
        } else {
                amt = pagesz;
                bucket = pagebucket;
@@ -213,7 +214,7 @@ void morecore(bucket) int bucket; {
        }
        op = (union overhead *)sbrk(amt);
        /* no more room! */
-       if ((INT)op == -1)
+       if ((intptr_t)op == -1)
                return;
        /*
         * Add new memory allocated to that on
index c488b67..7a088af 100644 (file)
@@ -1,10 +1,10 @@
 #include <gen.h>
 #include <sys.h>
 
-#ifdef X_
-#define INT intptr_t
+#ifdef __STDC__
+#include <stdint.h>
 #else
-#define INT int
+typedef int intptr_t;
 #endif
 
 /*
@@ -21,9 +21,9 @@ static char sccsid[] = "@(#)valloc.c  5.2 (Berkeley) 3/9/86";
 
 void *valloc(i) int i; {
        int valsiz = getpagesize();
-       INT j;
+       intptr_t j;
        char *cp = malloc(i + (valsiz-1));
 
-       j = ((INT)cp + (valsiz-1)) &~ (valsiz-1);
+       j = ((intptr_t)cp + (valsiz-1)) &~ (valsiz-1);
        return ((char *)j);
 }
index 84f40d2..502c90b 100644 (file)
@@ -32,9 +32,9 @@ gen/alarm.c sys/time.h
 gen/atof.c math.h
 gen/atoi.c
 gen/atol.c
-gen/bcmp.c
-gen/bcopy.c
-gen/bzero.c
+gen/bcmp.c strings.h
+gen/bcopy.c strings.h
+gen/bzero.c strings.h
 gen/calloc.c
 gen/closedir.c sys/dir.h
 gen/crypt.c
@@ -192,7 +192,7 @@ sys/adjtime.c sys/time.h
 sys/bind.c sys/socket.h
 sys/brk.c sys/proc.h
 sys/chdir.c sys/proc.h
-sys/chmod.c sys/file.h
+sys/chmod.c sys/stat.h
 sys/chown.c sys/file.h
 sys/chroot.c sys/proc.h
 sys/close.c sys/file.h
@@ -206,7 +206,7 @@ sys/exect.c sys/exec.h
 sys/execv.c sys/exec.h
 sys/execve.c sys/exec.h
 sys/_exit.c sys/proc.h
-sys/fchmod.c sys/file.h
+sys/fchmod.c sys/stat.h
 sys/fchown.c sys/file.h
 sys/fcntl.c sys/file.h
 sys/flock.c sys/file.h
@@ -242,8 +242,8 @@ sys/link.c sys/file.h
 sys/listen.c sys/socket.h
 sys/lseek.c sys/file.h
 sys/lstat.c sys/stat.h
-sys/mkdir.c sys/dir.h
-sys/mknod.c sys/file.h
+sys/mkdir.c sys/stat.h
+sys/mknod.c sys/stat.h
 sys/mount.c sys/mount.h
 sys/open.c sys/file.h
 sys/pipe.c sys/file.h
@@ -290,7 +290,7 @@ sys/swapon.c
 sys/symlink.c sys/file.h
 sys/sync.c sys/file.h
 sys/truncate.c sys/file.h
-sys/umask.c sys/file.h
+sys/umask.c sys/stat.h
 sys/umount.c sys/mount.h
 sys/unlink.c sys/file.h
 sys/utimes.c sys/time.h
index 18eeff6..8aab4c1 100644 (file)
@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include <gen.h>
 #include <ndbm.h>
 #include <netdb.h>
 #include <stdio.h>
index 136fc9a..c84c6c1 100644 (file)
@@ -1,7 +1,6 @@
 #include <arpa/inet.h>
 #include <arpa/nameser.h>
 #include <ctype.h>
-#include <gen.h>
 #include <net.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 
-#ifdef X_
-#define U_LONG uintptr_t
+#ifdef __STDC__
+#include <stdint.h>
 #else
-#define U_LONG u_long
+typedef u_long uintptr_t;
 #endif
 
 /*
@@ -216,9 +215,9 @@ static struct hostent *getanswer(msg, msglen, iquery) char *msg; int msglen; int
                        }
                }
 
-/* XXX bp = (char *)(((U_LONG)bp + sizeof(align) - 1) & ~sizeof(align)) */
+/* XXX bp = (char *)(((uintptr_t)bp + sizeof(align) - 1) & ~sizeof(align)); */
  abort();
-               bp += ((U_LONG)bp % sizeof(align));
+               bp += ((uintptr_t)bp % sizeof(align));
 
                if (bp + n >= &hostbuf[sizeof(hostbuf)]) {
 #ifdef DEBUG
index c0c5ee5..464d8d0 100644 (file)
@@ -1,6 +1,5 @@
 #include <arpa/inet.h>
 #include <ctype.h>
-#include <gen.h>
 #include <net.h>
 #include <netdb.h>
 #include <netinet/in.h>
index 0b136b0..b9b54bc 100644 (file)
@@ -1,9 +1,9 @@
 #include <arpa/inet.h>
 #include <arpa/nameser.h>
-#include <gen.h>
 #include <net.h>
 #include <netinet/in.h>
 #include <stdio.h>
+#include <strings.h>
 #include <sys/types.h>
 
 /*
index 69c8612..f040c89 100644 (file)
@@ -1,5 +1,4 @@
 #include <arpa/nameser.h>
-#include <gen.h>
 #include <net.h>
 #include <resolv.h>
 #include <stdio.h>
index a5f73e1..71f8356 100644 (file)
@@ -1,4 +1,3 @@
-#include <gen.h>
 #include <net.h>
 #include <netdb.h>
 #include <netinet/in.h>
index b881ec9..7ec179d 100644 (file)
@@ -1,6 +1,6 @@
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/compat-4.1/Makefile libx_c/compat-4.1/Makefile
---- libx_c.post/compat-4.1/Makefile    2017-01-21 22:50:06.040114532 +1100
-+++ libx_c/compat-4.1/Makefile 2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/compat-4.1/Makefile    2017-01-22 12:38:06.433558187 +1100
++++ libx_c/compat-4.1/Makefile 2017-01-22 12:38:06.465558365 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -13,8 +13,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  
 -
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/compat-sys5/Makefile libx_c/compat-sys5/Makefile
---- libx_c.post/compat-sys5/Makefile   2017-01-21 22:50:06.064114562 +1100
-+++ libx_c/compat-sys5/Makefile        2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/compat-sys5/Makefile   2017-01-22 12:38:06.457558320 +1100
++++ libx_c/compat-sys5/Makefile        2017-01-22 12:38:06.465558365 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -45,16 +45,16 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/bcopy.c libx_c/gen/bcopy.c
---- libx_c.post/gen/bcopy.c    2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/bcopy.c 2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/bcopy.c    2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/bcopy.c 2017-01-22 12:38:06.465558365 +1100
 @@ -1,6 +1,12 @@
- #include <gen.h>
+ #include <strings.h>
  #include <sys/types.h>
  
-+#ifdef X_
-+#define INT intptr_t
++#ifdef __STDC__
++#include <stdint.h>
 +#else
-+#define INT int
++typedef int intptr_t;
 +#endif
 +
  /*
@@ -67,7 +67,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -              if ((u_int)dst < (u_int)src)
 -                      if (((int)src | (int)dst | length) & 3)
 +              if (/*(u_int)*/dst < /*(u_int)*/src)
-+                      if (((INT)src | (INT)dst | length) & 3)
++                      if (((intptr_t)src | (intptr_t)dst | length) & 3)
                                do      /* copy by bytes */
                                        *dst++ = *src++;
                                while (--length);
@@ -76,13 +76,13 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
                        src += length;
                        dst += length;
 -                      if (((int)src | (int)dst | length) & 3)
-+                      if (((INT)src | (INT)dst | length) & 3)
++                      if (((intptr_t)src | (intptr_t)dst | length) & 3)
                                do      /* copy by bytes */
                                        *--dst = *--src;
                                while (--length);
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/getpass.c libx_c/gen/getpass.c
---- libx_c.post/gen/getpass.c  2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/getpass.c       2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/getpass.c  2017-01-22 12:38:06.461558343 +1100
++++ libx_c/gen/getpass.c       2017-01-22 12:38:06.465558365 +1100
 @@ -20,7 +20,7 @@
        FILE *fi;
        static char pbuf[9];
@@ -93,9 +93,9 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL)
                fi = stdin;
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/getpwnamuid.c libx_c/gen/getpwnamuid.c
---- libx_c.post/gen/getpwnamuid.c      2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/getpwnamuid.c   2017-01-21 22:50:06.076114575 +1100
-@@ -44,19 +44,37 @@
+--- libx_c.post/gen/getpwnamuid.c      2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/getpwnamuid.c   2017-01-22 12:38:06.465558365 +1100
+@@ -43,19 +43,37 @@
          cp = key.dptr;
        tp = line;
  
@@ -134,8 +134,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  }
  
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/Makefile libx_c/gen/Makefile
---- libx_c.post/gen/Makefile   2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/Makefile        2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/Makefile   2017-01-22 12:38:06.461558343 +1100
++++ libx_c/gen/Makefile        2017-01-22 12:38:06.465558365 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -339,22 +339,22 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/malloc.c libx_c/gen/malloc.c
---- libx_c.post/gen/malloc.c   2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/malloc.c        2017-01-21 22:50:06.076114575 +1100
-@@ -4,6 +4,12 @@
+--- libx_c.post/gen/malloc.c   2017-01-22 12:38:06.461558343 +1100
++++ libx_c/gen/malloc.c        2017-01-22 12:38:06.469558387 +1100
+@@ -5,6 +5,12 @@
  #include <sys/proc.h>
  #include <sys/types.h>
  
-+#ifdef X_
-+#define INT intptr_t
++#ifdef __STDC__
++#include <stdint.h>
 +#else
-+#define INT int
++typedef int intptr_t;
 +#endif
 +
  /*
   * Copyright (c) 1983 Regents of the University of California.
   * All rights reserved.  The Berkeley software License Agreement
-@@ -88,9 +94,6 @@
+@@ -89,9 +95,6 @@
  #if defined(DEBUG) || defined(RCHECK)
  #define       ASSERT(p)   if (!(p)) botch("p")
  /*#include <stdio.h>*/
@@ -364,7 +364,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  static void botch(s) char *s; {
        fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
        (void) fflush(stderr);          /* just in case user buffered it */
-@@ -100,6 +103,8 @@
+@@ -101,6 +104,8 @@
  #define       ASSERT(p)
  #endif
  
@@ -373,36 +373,36 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  void *malloc(nbytes) unsigned nbytes; {
        register union overhead *op;
        register int bucket;
-@@ -112,7 +117,7 @@
+@@ -113,7 +118,7 @@
        if (pagesz == 0) {
                pagesz = n = getpagesize();
                op = (union overhead *)sbrk(0);
 -              n = n - sizeof (*op) - ((int)op & (n - 1));
-+              n = n - sizeof (*op) - ((INT)op & (n - 1));
++              n = n - sizeof (*op) - ((intptr_t)op & (n - 1));
                if (n < 0)
                        n += pagesz;
                if (n) {
-@@ -140,7 +145,7 @@
+@@ -141,7 +146,7 @@
                amt = 16;       /* size of first bucket */
                bucket = 1;
  #endif
 -              n = -(sizeof (*op) + RSLOP);
-+              n = -(INT)(sizeof (*op) + RSLOP);
++              n = -(intptr_t)(sizeof (*op) + RSLOP);
        } else {
                amt = pagesz;
                bucket = pagebucket;
-@@ -208,7 +213,7 @@
+@@ -209,7 +214,7 @@
        }
        op = (union overhead *)sbrk(amt);
        /* no more room! */
 -      if ((int)op == -1)
-+      if ((INT)op == -1)
++      if ((intptr_t)op == -1)
                return;
        /*
         * Add new memory allocated to that on
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/ndbm.c libx_c/gen/ndbm.c
---- libx_c.post/gen/ndbm.c     2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/ndbm.c  2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/ndbm.c     2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/ndbm.c  2017-01-22 12:38:06.469558387 +1100
 @@ -70,14 +70,14 @@
                flags = (flags & ~03) | O_RDWR;
        strcpy(db->dbm_pagbuf, file);
@@ -421,8 +421,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        va_end(argp);
        if (db->dbm_dirf < 0)
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/qsort.c libx_c/gen/qsort.c
---- libx_c.post/gen/qsort.c    2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/qsort.c 2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/qsort.c    2017-01-22 12:38:06.461558343 +1100
++++ libx_c/gen/qsort.c 2017-01-22 12:38:06.469558387 +1100
 @@ -36,7 +36,7 @@
  
  static void qst __P((char *base, char *max));
@@ -433,8 +433,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        register char c, *i, *j, *lo, *hi;
        char *min, *max;
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/scandir.c libx_c/gen/scandir.c
---- libx_c.post/gen/scandir.c  2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/scandir.c       2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/scandir.c  2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/scandir.c       2017-01-22 12:38:06.469558387 +1100
 @@ -24,7 +24,7 @@
  /*#include <sys/stat.h>*/
  /*#include <sys/dir.h>*/
@@ -454,8 +454,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        return(nitems);
  }
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/signal.c libx_c/gen/signal.c
---- libx_c.post/gen/signal.c   2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/signal.c        2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/signal.c   2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/signal.c        2017-01-22 12:38:06.469558387 +1100
 @@ -15,12 +15,12 @@
   */
  /*#include <signal.h>*/
@@ -479,8 +479,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +      return ((void (*) __P((int sig)))osv.sv_handler);
  }
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/sleep.c libx_c/gen/sleep.c
---- libx_c.post/gen/sleep.c    2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/sleep.c 2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/sleep.c    2017-01-22 12:38:06.461558343 +1100
++++ libx_c/gen/sleep.c 2017-01-22 12:38:06.469558387 +1100
 @@ -15,7 +15,7 @@
  /*#include <signal.h>*/
  
@@ -491,8 +491,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  static int ringring;
  
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/system.c libx_c/gen/system.c
---- libx_c.post/gen/system.c   2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/system.c        2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/system.c   2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/system.c        2017-01-22 12:38:06.469558387 +1100
 @@ -11,7 +11,7 @@
  
  int system(s) char *s; {
@@ -503,8 +503,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        if ((pid = vfork()) == 0) {
                execl("/bin/sh", "sh", "-c", s, 0);
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/usleep.c libx_c/gen/usleep.c
---- libx_c.post/gen/usleep.c   2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/usleep.c        2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/usleep.c   2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/usleep.c        2017-01-22 12:38:06.469558387 +1100
 @@ -18,7 +18,7 @@
  #define TICK  10000           /* system clock resolution in microseconds */
  
@@ -515,16 +515,16 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  static int ringring;
  
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen/valloc.c libx_c/gen/valloc.c
---- libx_c.post/gen/valloc.c   2017-01-21 22:50:06.068114566 +1100
-+++ libx_c/gen/valloc.c        2017-01-21 22:50:06.076114575 +1100
+--- libx_c.post/gen/valloc.c   2017-01-22 12:38:06.457558320 +1100
++++ libx_c/gen/valloc.c        2017-01-22 12:38:06.469558387 +1100
 @@ -1,6 +1,12 @@
  #include <gen.h>
  #include <sys.h>
  
-+#ifdef X_
-+#define INT intptr_t
++#ifdef __STDC__
++#include <stdint.h>
 +#else
-+#define INT int
++typedef int intptr_t;
 +#endif
 +
  /*
@@ -536,17 +536,17 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  void *valloc(i) int i; {
 -      int valsiz = getpagesize(), j;
 +      int valsiz = getpagesize();
-+      INT j;
++      intptr_t j;
        char *cp = malloc(i + (valsiz-1));
  
 -      j = ((int)cp + (valsiz-1)) &~ (valsiz-1);
-+      j = ((INT)cp + (valsiz-1)) &~ (valsiz-1);
++      j = ((intptr_t)cp + (valsiz-1)) &~ (valsiz-1);
        return ((char *)j);
  }
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/gen.h libx_c/gen.h
---- libx_c.post/gen.h  2017-01-21 22:50:06.048114542 +1100
-+++ libx_c/gen.h       2017-01-21 22:50:06.080114580 +1100
-@@ -108,7 +108,7 @@
+--- libx_c.post/gen.h  2017-01-22 12:38:06.437558209 +1100
++++ libx_c/gen.h       2017-01-22 12:38:06.469558387 +1100
+@@ -99,7 +99,7 @@
  char *mktemp __P((char *as));
  
  /* gen/qsort.c */
@@ -556,8 +556,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  /* gen/random.c */
  int srandom __P((unsigned x));
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/inet/Makefile libx_c/inet/Makefile
---- libx_c.post/inet/Makefile  2017-01-21 22:50:06.044114538 +1100
-+++ libx_c/inet/Makefile       2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/inet/Makefile  2017-01-22 12:38:06.437558209 +1100
++++ libx_c/inet/Makefile       2017-01-22 12:38:06.469558387 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -581,7 +581,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/csu/crt0.c libx_c/linux/csu/crt0.c
 --- libx_c.post/linux/csu/crt0.c       1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/csu/crt0.c    2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/csu/crt0.c    2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,19 @@
 +#include <stdio.h>
 +
@@ -604,7 +604,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/csu/Makefile libx_c/linux/csu/Makefile
 --- libx_c.post/linux/csu/Makefile     1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/csu/Makefile  2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/csu/Makefile  2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,104 @@
 +ROOT=../../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -712,7 +712,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/gen/abort.c libx_c/linux/gen/abort.c
 --- libx_c.post/linux/gen/abort.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/gen/abort.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/gen/abort.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,7 @@
 +#include <nox_stdlib.h>
 +
@@ -723,7 +723,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/gen/Makefile libx_c/linux/gen/Makefile
 --- libx_c.post/linux/gen/Makefile     1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/gen/Makefile  2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/gen/Makefile  2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,52 @@
 +ROOT=../../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -779,7 +779,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/gen/modf.c libx_c/linux/gen/modf.c
 --- libx_c.post/linux/gen/modf.c       1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/gen/modf.c    2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/gen/modf.c    2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,7 @@
 +#include <nox_math.h>
 +
@@ -790,7 +790,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/Makefile libx_c/linux/Makefile
 --- libx_c.post/linux/Makefile 1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/Makefile      2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/Makefile      2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,43 @@
 +#
 +# Copyright (c) 1980 Regents of the University of California.
@@ -837,7 +837,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +              (cd $$i; make ${MFLAGS} DEFS=${DEFS} depend); done
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/close.c libx_c/linux/sys/close.c
 --- libx_c.post/linux/sys/close.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/close.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/close.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,13 @@
 +#include <nox_unistd.h>
 +
@@ -854,7 +854,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/_exit.c libx_c/linux/sys/_exit.c
 --- libx_c.post/linux/sys/_exit.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/_exit.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/_exit.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,7 @@
 +#include <nox_unistd.h>
 +
@@ -865,7 +865,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/fstat.c libx_c/linux/sys/fstat.c
 --- libx_c.post/linux/sys/fstat.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/fstat.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/fstat.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,17 @@
 +#include <sys/nox_stat.h>
 +#include <nox_unistd.h>
@@ -886,7 +886,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/getpagesize.c libx_c/linux/sys/getpagesize.c
 --- libx_c.post/linux/sys/getpagesize.c        1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/getpagesize.c     2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/getpagesize.c     2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,7 @@
 +#include <nox_unistd.h>
 +
@@ -897,7 +897,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/isatty.c libx_c/linux/sys/isatty.c
 --- libx_c.post/linux/sys/isatty.c     1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/isatty.c  2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/isatty.c  2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,13 @@
 +#include <nox_unistd.h>
 +
@@ -914,7 +914,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/lseek.c libx_c/linux/sys/lseek.c
 --- libx_c.post/linux/sys/lseek.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/lseek.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/lseek.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,15 @@
 +#include <nox_unistd.h>
 +#include <sys/nox_types.h>
@@ -933,7 +933,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/Makefile libx_c/linux/sys/Makefile
 --- libx_c.post/linux/sys/Makefile     1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/Makefile  2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/Makefile  2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,54 @@
 +ROOT=../../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -991,7 +991,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/read.c libx_c/linux/sys/read.c
 --- libx_c.post/linux/sys/read.c       1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/read.c    2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/read.c    2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,15 @@
 +#include <nox_unistd.h>
 +
@@ -1010,7 +1010,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/readv.c libx_c/linux/sys/readv.c
 --- libx_c.post/linux/sys/readv.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/readv.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/readv.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,26 @@
 +#include <nox_unistd.h>
 +#include <sys/nox_uio.h>
@@ -1040,7 +1040,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/sbrk.c libx_c/linux/sys/sbrk.c
 --- libx_c.post/linux/sys/sbrk.c       1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/sbrk.c    2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/sbrk.c    2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,14 @@
 +#include <nox_stdint.h>
 +#include <nox_unistd.h>
@@ -1058,7 +1058,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/vopen.c libx_c/linux/sys/vopen.c
 --- libx_c.post/linux/sys/vopen.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/vopen.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/vopen.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,49 @@
 +#include <nox_fcntl.h>
 +
@@ -1111,7 +1111,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/write.c libx_c/linux/sys/write.c
 --- libx_c.post/linux/sys/write.c      1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/write.c   2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/write.c   2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,15 @@
 +#include <nox_unistd.h>
 +
@@ -1130,7 +1130,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/linux/sys/writev.c libx_c/linux/sys/writev.c
 --- libx_c.post/linux/sys/writev.c     1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/linux/sys/writev.c  2017-01-21 22:50:06.080114580 +1100
++++ libx_c/linux/sys/writev.c  2017-01-22 12:38:06.469558387 +1100
 @@ -0,0 +1,26 @@
 +#include <nox_unistd.h>
 +#include <sys/nox_uio.h>
@@ -1159,8 +1159,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +      return res;
 +}
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/Makefile libx_c/Makefile
---- libx_c.post/Makefile       2017-01-21 22:50:06.048114542 +1100
-+++ libx_c/Makefile    2017-01-21 22:50:31.188144203 +1100
+--- libx_c.post/Makefile       2017-01-22 12:38:06.437558209 +1100
++++ libx_c/Makefile    2017-01-22 12:38:06.469558387 +1100
 @@ -1,3 +1,5 @@
 +ROOT=${shell pwd}/../..
 +DESTDIR=${ROOT}/cross
@@ -1211,7 +1211,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        ar ma findiop.o libc_p.a exit.o
        ar ma exit.o libc_p.a fakcu.o
        rm -rf t1 tmp
-@@ -71,7 +79,36 @@
+@@ -71,7 +79,35 @@
  
  FRC:
  
@@ -1230,28 +1230,27 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +      ln -s sys/file.h fcntl.h; \
 +      ln -s a.out.h nlist.h; \
 +      ln -s sys/signal.h signal.h; \
-+      ln -s sys/syslog.h syslog.h
-+      for i in `find . -name '*.h' -print`; \
-+      do \
-+              mkdir -p ${DESTDIR}/usr/include/.xify/`dirname $$i`; \
-+              ${ROOT}/cross/lib/xify $$i ${DESTDIR}/usr/include/.xify/`dirname $$i`/x_`basename $$i`; \
-+      done
-+      cd ${DESTDIR}/usr/include/.xify; \
-+      ln -s vax machine; \
-+      ln -s machine/x_frame.h x_frame.h; \
-+      ln -s sys/x_errno.h x_errno.h; \
-+      ln -s sys/x_file.h x_fcntl.h; \
-+      ln -s x_a.out.h x_nlist.h; \
-+      ln -s sys/x_signal.h x_signal.h; \
-+      ln -s sys/x_syslog.h x_syslog.h
++      ln -s gen.h stdlib.h; \
++      ln -s sys/syslog.h syslog.h; \
++      ln -s sys.h unistd.h
++#     for i in \
++#`find . -name '*.h' -print` \
++#frame.h errno.h fcntl.h nlist.h signal.h stdlib.h syslog.h unistd.h; \
++#     do \
++#             mkdir -p ${DESTDIR}/usr/include/`dirname $$i`/.xify; \
++#             ${ROOT}/cross/lib/xify \
++#$$i \
++#${DESTDIR}/usr/include/`dirname $$i`/.xify/x_`basename $$i` \
++#${DESTDIR}/usr/include/`dirname $$i`/.xify/x_`basename $$i`.deps; \
++#     done
 +
 +install:
        ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
        ranlib ${DESTDIR}/lib/libc.a
        ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/net/hosttable/Makefile libx_c/net/hosttable/Makefile
---- libx_c.post/net/hosttable/Makefile 2017-01-21 22:50:06.044114538 +1100
-+++ libx_c/net/hosttable/Makefile      2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/net/hosttable/Makefile 2017-01-22 12:38:06.433558187 +1100
++++ libx_c/net/hosttable/Makefile      2017-01-22 12:38:06.469558387 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -1271,8 +1270,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/net/Makefile libx_c/net/Makefile
---- libx_c.post/net/Makefile   2017-01-21 22:50:06.044114538 +1100
-+++ libx_c/net/Makefile        2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/net/Makefile   2017-01-22 12:38:06.433558187 +1100
++++ libx_c/net/Makefile        2017-01-22 12:38:06.469558387 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -1335,35 +1334,35 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/net/named/gethostnamadr.c libx_c/net/named/gethostnamadr.c
---- libx_c.post/net/named/gethostnamadr.c      2017-01-21 22:50:06.044114538 +1100
-+++ libx_c/net/named/gethostnamadr.c   2017-01-21 22:50:06.080114580 +1100
-@@ -12,6 +12,12 @@
+--- libx_c.post/net/named/gethostnamadr.c      2017-01-22 12:38:06.433558187 +1100
++++ libx_c/net/named/gethostnamadr.c   2017-01-22 12:38:06.469558387 +1100
+@@ -11,6 +11,12 @@
  #include <sys/socket.h>
  #include <sys/types.h>
  
-+#ifdef X_
-+#define U_LONG uintptr_t
++#ifdef __STDC__
++#include <stdint.h>
 +#else
-+#define U_LONG u_long
++typedef u_long uintptr_t;
 +#endif
 +
  /*
   * Copyright (c) 1985 Regents of the University of California.
   * All rights reserved.  The Berkeley software License Agreement
-@@ -210,7 +216,9 @@
+@@ -209,7 +215,9 @@
                        }
                }
  
 -              bp += ((u_long)bp % sizeof(align));
-+/* XXX bp = (char *)(((U_LONG)bp + sizeof(align) - 1) & ~sizeof(align)) */
++/* XXX bp = (char *)(((uintptr_t)bp + sizeof(align) - 1) & ~sizeof(align)); */
 + abort();
-+              bp += ((U_LONG)bp % sizeof(align));
++              bp += ((uintptr_t)bp % sizeof(align));
  
                if (bp + n >= &hostbuf[sizeof(hostbuf)]) {
  #ifdef DEBUG
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/net/named/Makefile libx_c/net/named/Makefile
---- libx_c.post/net/named/Makefile     2017-01-21 22:50:06.044114538 +1100
-+++ libx_c/net/named/Makefile  2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/net/named/Makefile     2017-01-22 12:38:06.433558187 +1100
++++ libx_c/net/named/Makefile  2017-01-22 12:38:06.469558387 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -1386,8 +1385,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/ns/Makefile libx_c/ns/Makefile
---- libx_c.post/ns/Makefile    2017-01-21 22:50:06.036114529 +1100
-+++ libx_c/ns/Makefile 2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/ns/Makefile    2017-01-22 12:38:06.429558165 +1100
++++ libx_c/ns/Makefile 2017-01-22 12:38:06.469558387 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -1404,54 +1403,53 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/stdio/doprnt.c libx_c/stdio/doprnt.c
---- libx_c.post/stdio/doprnt.c 2017-01-21 22:50:06.040114532 +1100
-+++ libx_c/stdio/doprnt.c      2017-01-21 22:50:06.080114580 +1100
-@@ -13,6 +13,14 @@
+--- libx_c.post/stdio/doprnt.c 2017-01-22 12:38:06.429558165 +1100
++++ libx_c/stdio/doprnt.c      2017-01-22 12:38:06.473558409 +1100
+@@ -12,6 +12,13 @@
  #define _va_start(argp, arg) va_start(argp)
  #endif
  
-+#ifdef X_
-+#define LONG intptr_t
-+#define U_LONG uintptr_t
++#ifdef __STDC__
++#include <stdint.h>
 +#else
-+#define LONG long
-+#define U_LONG u_long
++typedef long intptr_t;
++#ypedef u_long uintptr_t;
 +#endif
 +
  /*
   * Copyright (c) 1988 Regents of the University of California.
   * All rights reserved.
-@@ -79,7 +87,7 @@
+@@ -78,7 +85,7 @@
        register int n;         /* random handy integer */
        register char *t;       /* buffer pointer */
        double _double;         /* double precision arguments %[eEfgG] */
 -      u_long _ulong;          /* integer arguments %[diouxX] */
-+      U_LONG _ulong;          /* integer arguments %[diouxX] */
++      uintptr_t _ulong;               /* integer arguments %[diouxX] */
        int base;               /* base for [diouxX] conversion */
        int dprec;              /* decimal precision in [diouxX] */
        int fieldsz;            /* field size expanded by sign, etc */
-@@ -206,7 +214,8 @@
+@@ -205,7 +212,8 @@
                case 'd':
                case 'i':
                        ARG();
 -                      if ((long)_ulong < 0) {
-+                      if ((LONG)_ulong < 0)
++                      if ((intptr_t)_ulong < 0)
 +                      {
                                _ulong = -_ulong;
                                sign = '-';
                        }
-@@ -275,7 +284,7 @@
+@@ -274,7 +282,7 @@
                         *      -- ANSI X3J11
                         */
                        /* NOSTRICT */
 -                      _ulong = (u_long)va_arg(argp, void *);
-+                      _ulong = (U_LONG)va_arg(argp, void *);
++                      _ulong = (uintptr_t)va_arg(argp, void *);
                        base = 16;
                        goto nosign;
                case 's':
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/stdio/findiop.c libx_c/stdio/findiop.c
---- libx_c.post/stdio/findiop.c        2017-01-21 22:50:06.040114532 +1100
-+++ libx_c/stdio/findiop.c     2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/stdio/findiop.c        2017-01-22 12:38:06.429558165 +1100
++++ libx_c/stdio/findiop.c     2017-01-22 12:38:06.473558409 +1100
 @@ -105,7 +105,7 @@
                        *iov = (FILE *)calloc(1, sizeof **iov);
  }
@@ -1462,8 +1460,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        register FILE *fp;
  
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/stdio/Makefile libx_c/stdio/Makefile
---- libx_c.post/stdio/Makefile 2017-01-21 22:50:06.040114532 +1100
-+++ libx_c/stdio/Makefile      2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/stdio/Makefile 2017-01-22 12:38:06.429558165 +1100
++++ libx_c/stdio/Makefile      2017-01-22 12:38:06.473558409 +1100
 @@ -1,3 +1,5 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -1561,8 +1559,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 -# IF YOU PUT STUFF HERE IT WILL GO AWAY
 -# see make depend above
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/stdio.h libx_c/stdio.h
---- libx_c.post/stdio.h        2017-01-21 22:50:06.048114542 +1100
-+++ libx_c/stdio.h     2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/stdio.h        2017-01-22 12:38:06.441558232 +1100
++++ libx_c/stdio.h     2017-01-22 12:38:06.473558409 +1100
 @@ -82,7 +82,7 @@
  #endif
  
@@ -1617,9 +1615,22 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  
  /* stdio/puts.c */
  int puts __P((register char *s));
+diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/string.h libx_c/string.h
+--- libx_c.post/string.h       2017-01-22 12:38:06.437558209 +1100
++++ libx_c/string.h    2017-01-22 12:38:06.473558409 +1100
+@@ -9,7 +9,8 @@
+  *    @(#)string.h    5.1 (Berkeley) 85/08/05
+  */
+-/*#include <strings.h>*/
++#include <memory.h>
++#include <strings.h>
+ /*
+  * these next few are obsolete trash
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/sys/dir.h libx_c/sys/dir.h
---- libx_c.post/sys/dir.h      2017-01-21 22:50:06.052114547 +1100
-+++ libx_c/sys/dir.h   2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/sys/dir.h      2017-01-22 12:38:06.445558254 +1100
++++ libx_c/sys/dir.h   2017-01-22 12:38:06.473558409 +1100
 @@ -122,7 +122,7 @@
  struct direct *readdir __P((register DIR *dirp));
  
@@ -1631,7 +1642,7 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
  /* gen/seekdir.c */
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/sys/Makefile libx_c/sys/Makefile
 --- libx_c.post/sys/Makefile   1970-01-01 10:00:00.000000000 +1000
-+++ libx_c/sys/Makefile        2017-01-21 22:50:06.080114580 +1100
++++ libx_c/sys/Makefile        2017-01-22 12:38:06.473558409 +1100
 @@ -0,0 +1,90 @@
 +ROOT=../../..
 +CC=FAKEROOT=${ROOT}/cross ${ROOT}/cross/bin/cc -Dvax
@@ -1724,8 +1735,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
 +# DO NOT DELETE THIS LINE -- make depend uses it
 +
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/sys/open.c libx_c/sys/open.c
---- libx_c.post/sys/open.c     2017-01-21 22:50:06.052114547 +1100
-+++ libx_c/sys/open.c  2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/sys/open.c     2017-01-22 12:38:06.445558254 +1100
++++ libx_c/sys/open.c  2017-01-22 12:38:06.473558409 +1100
 @@ -17,7 +17,7 @@
        va_list argp;
        int res;
@@ -1736,8 +1747,8 @@ diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '
        va_end(argp);
        return res;
 diff --unified --recursive --new-file '--exclude=[abcdefghijklmnopqrstuvwxyz]' '--exclude=*.sh' '--exclude=*.a' '--exclude=*.o' '--exclude=*.[ch].nocomm' '--exclude=*.[ch].protos' '--exclude=*.[ch].protos.nocomm' '--exclude=*.temp' '--exclude=*.temp.c' '--exclude=*.[ch].usedby' '--exclude=*.[ch].uses' libx_c.post/sys/signal.h libx_c/sys/signal.h
---- libx_c.post/sys/signal.h   2017-01-21 22:50:06.052114547 +1100
-+++ libx_c/sys/signal.h        2017-01-21 22:50:06.080114580 +1100
+--- libx_c.post/sys/signal.h   2017-01-22 12:38:06.445558254 +1100
++++ libx_c/sys/signal.h        2017-01-22 12:38:06.473558409 +1100
 @@ -9,7 +9,7 @@
   *    @(#)signal.h    7.1 (Berkeley) 6/4/86
   */
index c710f41..dd691fb 100644 (file)
@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include <gen.h>
 #include <math.h>
 #include <memory.h>
 #include <stdio.h>
 #define _va_start(argp, arg) va_start(argp)
 #endif
 
-#ifdef X_
-#define LONG intptr_t
-#define U_LONG uintptr_t
+#ifdef __STDC__
+#include <stdint.h>
 #else
-#define LONG long
-#define U_LONG u_long
+typedef long intptr_t;
+#ypedef u_long uintptr_t;
 #endif
 
 /*
@@ -87,7 +85,7 @@ int _doprnt(fmt0, argp, fp) u_char *fmt0; va_list argp; register FILE *fp; {
        register int n;         /* random handy integer */
        register char *t;       /* buffer pointer */
        double _double;         /* double precision arguments %[eEfgG] */
-       U_LONG _ulong;          /* integer arguments %[diouxX] */
+       uintptr_t _ulong;               /* integer arguments %[diouxX] */
        int base;               /* base for [diouxX] conversion */
        int dprec;              /* decimal precision in [diouxX] */
        int fieldsz;            /* field size expanded by sign, etc */
@@ -214,7 +212,7 @@ rflag:              switch (*++fmt) {
                case 'd':
                case 'i':
                        ARG();
-                       if ((LONG)_ulong < 0)
+                       if ((intptr_t)_ulong < 0)
                        {
                                _ulong = -_ulong;
                                sign = '-';
@@ -284,7 +282,7 @@ rflag:              switch (*++fmt) {
                         *      -- ANSI X3J11
                         */
                        /* NOSTRICT */
-                       _ulong = (U_LONG)va_arg(argp, void *);
+                       _ulong = (uintptr_t)va_arg(argp, void *);
                        base = 16;
                        goto nosign;
                case 's':
index b213ca3..b6444ba 100644 (file)
@@ -1,5 +1,5 @@
-#include <gen.h>
 #include <stdio.h>
+#include <strings.h>
 
 /*
  * Copyright (c) 1980 Regents of the University of California.
index df14869..8b9e4aa 100644 (file)
@@ -1,5 +1,5 @@
-#include <gen.h>
 #include <stdio.h>
+#include <strings.h>
 
 /*
  * Copyright (c) 1980 Regents of the University of California.
index f0603f5..c52e47b 100644 (file)
@@ -9,7 +9,8 @@
  *     @(#)string.h    5.1 (Berkeley) 85/08/05
  */
 
-/*#include <strings.h>*/
+#include <memory.h>
+#include <strings.h>
 
 /*
  * these next few are obsolete trash
index e7da1d4..139103e 100644 (file)
 #endif
 #endif
 
+/* gen/bcmp.c */
+int bcmp __P((void *_b1, void *_b2, register int length));
+
+/* gen/bcopy.c */
+int bcopy __P((void *_src, void *_dst, register int length));
+
+/* gen/bzero.c */
+int bzero __P((void *_b, register int length));
+
 /* gen/index.c */
 char *index __P((register char *sp, int c));
 
index 7ca3826..de8a497 100644 (file)
@@ -1,5 +1,6 @@
 #include <gen.h>
 #include <sys/file.h>
+#include <sys/stat.h>
 
 int chmod(s, m) char *s; int m; {
        write(2, "chmod()\n", 8);
index 536e055..f816113 100644 (file)
@@ -131,9 +131,6 @@ void seekdir __P((register DIR *dirp, long loc));
 /* gen/telldir.c */
 long telldir __P((DIR *dirp));
 
-/* sys/mkdir.c */
-int mkdir __P((char *p, int m));
-
 /* sys/rmdir.c */
 int rmdir __P((char *p));
 #endif
index 9e73446..39e99bd 100644 (file)
@@ -1,5 +1,6 @@
 #include <gen.h>
 #include <sys/file.h>
+#include <sys/stat.h>
 
 int fchmod(f, m) int f; int m; {
        write(2, "fchmod()\n", 9);
index 1e56f30..5479738 100644 (file)
@@ -142,9 +142,6 @@ int nfile;
 /* sys/access.c */
 int access __P((char *p, int m));
 
-/* sys/chmod.c */
-int chmod __P((char *s, int m));
-
 /* sys/chown.c */
 int chown __P((char *s, int u, int g));
 
@@ -160,9 +157,6 @@ int dup2 __P((int o, int n));
 /* sys/dup.c */
 int dup __P((int f));
 
-/* sys/fchmod.c */
-int fchmod __P((int f, int m));
-
 /* sys/fchown.c */
 int fchown __P((int f, int u, int g));
 
@@ -187,9 +181,6 @@ int link __P((char *a, char *b));
 /* sys/lseek.c */
 off_t lseek __P((int f, off_t o, int d));
 
-/* sys/mknod.c */
-int mknod __P((char *n, int m, int a));
-
 /* sys/open.c */
 int open __P((char *f, int m, ...));
 
@@ -214,9 +205,6 @@ void sync __P((void));
 /* sys/truncate.c */
 int truncate __P((char *p, off_t l));
 
-/* sys/umask.c */
-int umask __P((int n));
-
 /* sys/unlink.c */
 int unlink __P((char *s));
 
index c133031..689196f 100644 (file)
@@ -1,6 +1,6 @@
 #include <gen.h>
-#include <sys/dir.h>
 #include <sys/file.h>
+#include <sys/stat.h>
 
 int mkdir(p, m) char *p; int m; {
        write(2, "mkdir()\n", 8);
index 2aadb31..2debbe2 100644 (file)
@@ -1,5 +1,6 @@
 #include <gen.h>
 #include <sys/file.h>
+#include <sys/stat.h>
 
 int mknod(n, m, a) char *n; int m; int a; {
        write(2, "mknod()\n", 8);
index 3402a2c..d4424cd 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _SYS_SELECT_H_
 #define _SYS_SELECT_H_
 
-#include <gen.h>
+#include <strings.h>
 #include <sys/param.h>
 #include <sys/time.h>
 
index 8b78a3c..cd12645 100644 (file)
@@ -54,14 +54,29 @@ struct      stat {
 #endif
 #endif
 
+/* sys/chmod.c */
+int chmod __P((char *s, int m));
+
+/* sys/fchmod.c */
+int fchmod __P((int f, int m));
+
 /* sys/fstat.c */
 int fstat __P((int f, struct stat *b));
 
 /* sys/lstat.c */
 int lstat __P((char *s, struct stat *b));
 
+/* sys/mkdir.c */
+int mkdir __P((char *p, int m));
+
+/* sys/mknod.c */
+int mknod __P((char *n, int m, int a));
+
 /* sys/stat.c */
 int stat __P((char *s, struct stat *b));
+
+/* sys/umask.c */
+int umask __P((int n));
 #endif
 
 #endif
index fa72be3..3e23c16 100644 (file)
@@ -1,5 +1,6 @@
 #include <gen.h>
 #include <sys/file.h>
+#include <sys/stat.h>
 
 int umask(n) int n; {
        write(2, "umask()\n", 8);
index be30be2..446108c 100644 (file)
--- a/xify/ld.c
+++ b/xify/ld.c
@@ -41,7 +41,6 @@ static char sccsid[] = "@(#)ld.c      5.4 (Berkeley) 11/26/85";
 #include <stdlib.h>
 #include <unistd.h>
 #else
-#include <gen.h> /* revisit, bcopy() and friends should be in strings.h */
 #include <sys.h>
 #endif
 
index 4707e7c..5902683 100644 (file)
@@ -49,8 +49,9 @@ int main() {
               l = m - 4;
             }
             else if (
-              (l != 0 || m != 8 || memcmp(p, "stdarg.h", 8) != 0) /*&&
-              (l != 0 || m != 9 || memcmp(p, "varargs.h", 9) != 0)*/
+              (l != 0 || m != 8 || memcmp(p, "stdarg.h", 8) != 0) &&
+              (l != 0 || m != 8 || memcmp(p, "stdint.h", 8) != 0) &&
+              (l != 0 || m != 9 || memcmp(p, "varargs.h", 9) != 0)
             ) {
               fwrite(p - 1, l + m + 2, 1, stderr); /* include <> or "" */
               fputc('\n', stderr);
@@ -99,10 +100,18 @@ int main() {
               (m != 4 || memcmp(q, "enum", 4) != 0) &&
               (m != 5 || memcmp(q, "float", 5) != 0) &&
               (m != 3 || memcmp(q, "int", 3) != 0) &&
+              (m != 6 || memcmp(q, "int8_t", 6) != 0) &&
+              (m != 7 || memcmp(q, "int16_t", 7) != 0) &&
+              (m != 7 || memcmp(q, "int32_t", 7) != 0) &&
+              (m != 7 || memcmp(q, "int64_t", 7) != 0) &&
               (m != 8 || memcmp(q, "intptr_t", 8) != 0) &&
               (m != 4 || memcmp(q, "long", 4) != 0) &&
               (m != 5 || memcmp(q, "short", 5) != 0) &&
               (m != 6 || memcmp(q, "struct", 6) != 0) &&
+              (m != 7 || memcmp(q, "uint8_t", 7) != 0) &&
+              (m != 8 || memcmp(q, "uint16_t", 8) != 0) &&
+              (m != 8 || memcmp(q, "uint32_t", 8) != 0) &&
+              (m != 8 || memcmp(q, "uint64_t", 8) != 0) &&
               (m != 9 || memcmp(q, "uintptr_t", 9) != 0) &&
               (m != 5 || memcmp(q, "union", 5) != 0) &&
               (m != 8 || memcmp(q, "unsigned", 8) != 0) &&
@@ -209,6 +218,10 @@ int main() {
           (l != 6 || memcmp(p, "extern", 6) != 0) &&
           (l != 5 || memcmp(p, "float", 5) != 0) &&
           (l != 2 || memcmp(p, "if", 2) != 0) &&
+          (l != 6 || memcmp(p, "int8_t", 6) != 0) &&
+          (l != 7 || memcmp(p, "int16_t", 7) != 0) &&
+          (l != 7 || memcmp(p, "int32_t", 7) != 0) &&
+          (l != 7 || memcmp(p, "int64_t", 7) != 0) &&
           (l != 8 || memcmp(p, "intptr_t", 8) != 0) &&
           (l != 3 || memcmp(p, "for", 3) != 0) &&
           (l != 4 || memcmp(p, "goto", 4) != 0) &&
@@ -219,6 +232,10 @@ int main() {
           (l != 6 || memcmp(p, "struct", 6) != 0) &&
           (l != 6 || memcmp(p, "switch", 6) != 0) &&
           (l != 7 || memcmp(p, "typedef", 7) != 0) &&
+          (l != 7 || memcmp(p, "uint8_t", 7) != 0) &&
+          (l != 8 || memcmp(p, "uint16_t", 8) != 0) &&
+          (l != 8 || memcmp(p, "uint32_t", 8) != 0) &&
+          (l != 8 || memcmp(p, "uint64_t", 8) != 0) &&
           (l != 9 || memcmp(p, "uintptr_t", 9) != 0) &&
           (l != 5 || memcmp(p, "union", 5) != 0) &&
           (l != 8 || memcmp(p, "va_alist", 8) != 0) &&