]> Zhao Yanbai Git Server - minix.git/commitdiff
[NBSD libc] Various fixes.
authorGianluca Guida <gianluca@minix3.org>
Wed, 6 Apr 2011 15:59:10 +0000 (15:59 +0000)
committerGianluca Guida <gianluca@minix3.org>
Wed, 6 Apr 2011 15:59:10 +0000 (15:59 +0000)
18 files changed:
lib/nbsd_libc/Makefile
lib/nbsd_libc/db/btree/bt_open.c
lib/nbsd_libc/db/hash/hash.c
lib/nbsd_libc/minix-config.inc
lib/nbsd_libc/minix-port.patch
lib/nbsd_libc/net/rcmd.c
lib/nbsd_libc/resolv/Makefile.inc
lib/nbsd_libc/stdio/fseeko.c
lib/nbsd_libc/stdio/makebuf.c
lib/nbsd_libc/sys-minix/stat.c
lib/nbsd_libc/time/strftime.c
nbsd_include/a.out.h
nbsd_include/arpa/nameser_compat.h
nbsd_include/minix-port.patch
nbsd_include/netdb.h
nbsd_include/pwd.h
nbsd_include/sys/signal.h
nbsd_include/sys/stat.h

index 40755769a6d914b8da631a862f36fa0dd8b9c30d..a76051ac3b9f78d9a0f5bd961d157dd43297f9a9 100644 (file)
@@ -142,7 +142,11 @@ LSRCS := ${LSRCS} ${unwanted_file}
 NLS=   C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
        no.msg pl.msg sk.msg sv.msg
 
+.if defined(__MINIX)
+realall: 
+.else
 realall: tags
+.endif
 tags: ${.OBJDIR}/tags
 ${.OBJDIR}/tags: ${SRCS}
        ${_MKTARGET_CREATE}
@@ -151,9 +155,11 @@ ${.OBJDIR}/tags: ${SRCS}
            sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
            >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
 
+.if !defined(__MINIX)
 FILES=         ${.OBJDIR}/tags
 FILESNAME=     libc.tags
 FILESDIR=      /var/db
+.endif
 
 
 # workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
index c5256d171084961b999566ffe689eb0d978ae87d..16eb4fe62c39b52a201ff03b0f181cd7ad2c3a6e 100644 (file)
@@ -262,7 +262,11 @@ __bt_open(const char *fname, int flags, mode_t mode, const BTREEINFO *openinfo,
                 * Don't overflow the page offset type.
                 */
                if (b.psize == 0) {
+#ifdef __minix
+                       b.psize = MINIX_ST_BLKSIZE;
+#else
                        b.psize = sb.st_blksize;
+#endif
                        if (b.psize < MINPSIZE)
                                b.psize = MINPSIZE;
                        if (b.psize > MAX_PAGE_OFFSET + 1)
index 358a0719a89671593febbd4f9bdf8d87c8db076e..d334e86400a7a8674b5349eb7de3ce9d741087bd 100644 (file)
@@ -301,7 +301,11 @@ init_hash(HTAB *hashp, const char *file, const HASHINFO *info)
        if (file != NULL) {
                if (stat(file, &statbuf))
                        return (NULL);
+#ifdef __minix
+               hashp->BSIZE = MIN(MINIX_ST_BLKSIZE, MAX_BSIZE);
+#else
                hashp->BSIZE = MIN(statbuf.st_blksize, MAX_BSIZE);
+#endif
                hashp->BSHIFT = __log2((uint32_t)hashp->BSIZE);
        }
 
index a47c480417c40c65dbe931c073f801d1a55b8661..4dde4e2636cf053d738e8b6d634895c0a7c9617b 100644 (file)
@@ -1,12 +1,6 @@
 NETBSDSRCDIR=  ${MINIXSRCDIR}
 NETBSDINCLUDES= /usr/netbsd/include/
 MACHINE_ARCH?=         i386
-LIBDIR= /usr/netbsd/lib
-
-CPPFLAGS+= -nostdinc -O -D__minix -D_POSIX_SOURCE -I${NETBSDINCLUDES}  -D_NETBSD_SOURCE -D__NBSD_LIBC
-AFLAGS+= -nostdinc -D__minix -I${NETBSDINCLUDES}
-
-
 
 CITRUS=yes 
 USE_INET6=no
index 6bc95be80ce2e08297e79ef2f06c797e09e1ae8e..ffe587c001d97210012adf7998fd7d5af7326f4f 100644 (file)
@@ -1,6 +1,6 @@
 diff -ru /home/netbsd/src/lib/libc/Makefile ./Makefile
 --- /home/netbsd/src/lib/libc/Makefile 2010-09-05 03:00:50.000000000 +0000
-+++ ./Makefile 2011-02-21 16:04:16.000000000 +0000
++++ ./Makefile 2038-01-19 03:14:07.000000000 +0000
 @@ -17,6 +17,9 @@
  # The Hesiod functions are always in libc. To choose that getpwent() and friends
  # actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
@@ -70,9 +70,33 @@ diff -ru /home/netbsd/src/lib/libc/Makefile ./Makefile
  .include "${.CURDIR}/uuid/Makefile.inc"
  .if (${MKYP} != "no")
  .include "${.CURDIR}/yp/Makefile.inc"
+@@ -121,7 +142,11 @@
+ NLS=  C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
+       no.msg pl.msg sk.msg sv.msg
++.if defined(__MINIX)
++realall: 
++.else
+ realall: tags
++.endif
+ tags: ${.OBJDIR}/tags
+ ${.OBJDIR}/tags: ${SRCS}
+       ${_MKTARGET_CREATE}
+@@ -130,9 +155,11 @@
+           sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
+           >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
++.if !defined(__MINIX)
+ FILES=                ${.OBJDIR}/tags
+ FILESNAME=    libc.tags
+ FILESDIR=     /var/db
++.endif
+ # workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
 diff -ru /home/netbsd/src/lib/libc/Makefile.inc ./Makefile.inc
 --- /home/netbsd/src/lib/libc/Makefile.inc     2010-05-31 03:02:07.000000000 +0000
-+++ ./Makefile.inc     2011-02-21 16:04:16.000000000 +0000
++++ ./Makefile.inc     2038-01-19 03:14:07.000000000 +0000
 @@ -19,14 +19,22 @@
  
  USE_FORT?=    yes
@@ -98,7 +122,7 @@ diff -ru /home/netbsd/src/lib/libc/Makefile.inc ./Makefile.inc
  CPPFLAGS+=    -DHESIOD
 diff -ru /home/netbsd/src/lib/libc/arch/i386/Makefile.inc ./arch/i386/Makefile.inc
 --- /home/netbsd/src/lib/libc/arch/i386/Makefile.inc   2006-06-17 18:04:23.000000000 +0000
-+++ ./arch/i386/Makefile.inc   2011-02-21 16:04:05.000000000 +0000
++++ ./arch/i386/Makefile.inc   2038-01-19 03:14:07.000000000 +0000
 @@ -1,3 +1,5 @@
  #     $NetBSD: Makefile.inc,v 1.20 2006/06/17 18:04:23 uwe Exp $
  
@@ -107,7 +131,7 @@ diff -ru /home/netbsd/src/lib/libc/arch/i386/Makefile.inc ./arch/i386/Makefile.i
 +.endif
 diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/Makefile.inc ./arch/i386/gen/Makefile.inc
 --- /home/netbsd/src/lib/libc/arch/i386/gen/Makefile.inc       2009-12-06 07:12:17.000000000 +0000
-+++ ./arch/i386/gen/Makefile.inc       2011-02-21 16:04:05.000000000 +0000
++++ ./arch/i386/gen/Makefile.inc       2038-01-19 03:14:07.000000000 +0000
 @@ -7,10 +7,18 @@
  
  SRCS+=        setjmp.S _setjmp.S sigsetjmp.S
@@ -129,7 +153,7 @@ diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/Makefile.inc ./arch/i386/gen/Ma
  SRCS+=        infinityf_ieee754.c infinity_ieee754.c
 diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/setjmp.S ./arch/i386/gen/setjmp.S
 --- /home/netbsd/src/lib/libc/arch/i386/gen/setjmp.S   2005-09-13 01:44:08.000000000 +0000
-+++ ./arch/i386/gen/setjmp.S   2011-02-21 16:04:05.000000000 +0000
++++ ./arch/i386/gen/setjmp.S   2038-01-19 03:14:07.000000000 +0000
 @@ -85,7 +85,11 @@
        PIC_PROLOGUE
        pushl   $0
@@ -144,7 +168,7 @@ diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/setjmp.S ./arch/i386/gen/setjmp
  #else
 diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/sigsetjmp.S ./arch/i386/gen/sigsetjmp.S
 --- /home/netbsd/src/lib/libc/arch/i386/gen/sigsetjmp.S        2005-09-13 01:44:08.000000000 +0000
-+++ ./arch/i386/gen/sigsetjmp.S        2011-02-21 16:04:05.000000000 +0000
++++ ./arch/i386/gen/sigsetjmp.S        2038-01-19 03:14:07.000000000 +0000
 @@ -85,7 +85,11 @@
        PIC_PROLOGUE
        pushl   $0
@@ -159,7 +183,7 @@ diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/sigsetjmp.S ./arch/i386/gen/sig
  #else
 diff -ru /home/netbsd/src/lib/libc/cdb/cdbr.c ./cdb/cdbr.c
 --- /home/netbsd/src/lib/libc/cdb/cdbr.c       2010-06-04 03:06:19.000000000 +0000
-+++ ./cdb/cdbr.c       2011-02-21 16:04:10.000000000 +0000
++++ ./cdb/cdbr.c       2038-01-19 03:14:07.000000000 +0000
 @@ -122,7 +122,22 @@
                cdbr->index_size = 4;
  
@@ -185,7 +209,7 @@ diff -ru /home/netbsd/src/lib/libc/cdb/cdbr.c ./cdb/cdbr.c
        if (cdbr->mmap_base == MAP_FAILED) {
 diff -ru /home/netbsd/src/lib/libc/citrus/citrus_mmap.c ./citrus/citrus_mmap.c
 --- /home/netbsd/src/lib/libc/citrus/citrus_mmap.c     2005-01-19 00:52:37.000000000 +0000
-+++ ./citrus/citrus_mmap.c     2011-02-21 16:03:57.000000000 +0000
++++ ./citrus/citrus_mmap.c     2038-01-19 03:14:07.000000000 +0000
 @@ -74,12 +74,25 @@
                goto error;
        }
@@ -214,7 +238,7 @@ diff -ru /home/netbsd/src/lib/libc/citrus/citrus_mmap.c ./citrus/citrus_mmap.c
  error:
 diff -ru /home/netbsd/src/lib/libc/compat-43/Makefile.inc ./compat-43/Makefile.inc
 --- /home/netbsd/src/lib/libc/compat-43/Makefile.inc   2006-04-24 17:15:06.000000000 +0000
-+++ ./compat-43/Makefile.inc   2011-02-21 16:04:13.000000000 +0000
++++ ./compat-43/Makefile.inc   2038-01-19 03:14:07.000000000 +0000
 @@ -4,12 +4,20 @@
  # compat-43 sources
  .PATH: ${ARCHDIR}/compat-43 ${.CURDIR}/compat-43
@@ -236,9 +260,24 @@ diff -ru /home/netbsd/src/lib/libc/compat-43/Makefile.inc ./compat-43/Makefile.i
  
  # XXX this is to get <compat/sys/signal.h>
  CPPFLAGS.sigcompat.c+=        -I${NETBSDSRCDIR}/sys
+diff -ru /home/netbsd/src/lib/libc/db/btree/bt_open.c ./db/btree/bt_open.c
+--- /home/netbsd/src/lib/libc/db/btree/bt_open.c       2008-09-11 12:58:00.000000000 +0000
++++ ./db/btree/bt_open.c       2011-03-16 12:41:30.000000000 +0000
+@@ -262,7 +262,11 @@
+                * Don't overflow the page offset type.
+                */
+               if (b.psize == 0) {
++#ifdef __minix
++                      b.psize = MINIX_ST_BLKSIZE;
++#else
+                       b.psize = sb.st_blksize;
++#endif
+                       if (b.psize < MINPSIZE)
+                               b.psize = MINPSIZE;
+                       if (b.psize > MAX_PAGE_OFFSET + 1)
 diff -ru /home/netbsd/src/lib/libc/db/db/db.c ./db/db/db.c
 --- /home/netbsd/src/lib/libc/db/db/db.c       2008-09-11 12:58:00.000000000 +0000
-+++ ./db/db/db.c       2011-02-21 16:03:53.000000000 +0000
++++ ./db/db/db.c       2038-01-19 03:14:07.000000000 +0000
 @@ -57,9 +57,15 @@
  {
  
@@ -255,9 +294,24 @@ diff -ru /home/netbsd/src/lib/libc/db/db/db.c ./db/db/db.c
  
        if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0)
                switch (type) {
+diff -ru /home/netbsd/src/lib/libc/db/hash/hash.c ./db/hash/hash.c
+--- /home/netbsd/src/lib/libc/db/hash/hash.c   2009-02-12 06:35:54.000000000 +0000
++++ ./db/hash/hash.c   2011-03-16 12:35:00.000000000 +0000
+@@ -301,7 +301,11 @@
+       if (file != NULL) {
+               if (stat(file, &statbuf))
+                       return (NULL);
++#ifdef __minix
++              hashp->BSIZE = MIN(MINIX_ST_BLKSIZE, MAX_BSIZE);
++#else
+               hashp->BSIZE = MIN(statbuf.st_blksize, MAX_BSIZE);
++#endif
+               hashp->BSHIFT = __log2((uint32_t)hashp->BSIZE);
+       }
 diff -ru /home/netbsd/src/lib/libc/gdtoa/gdtoa_locks.c ./gdtoa/gdtoa_locks.c
 --- /home/netbsd/src/lib/libc/gdtoa/gdtoa_locks.c      2006-01-25 15:36:13.000000000 +0000
-+++ ./gdtoa/gdtoa_locks.c      2011-02-21 16:04:11.000000000 +0000
++++ ./gdtoa/gdtoa_locks.c      2038-01-19 03:14:07.000000000 +0000
 @@ -7,4 +7,6 @@
  
  #include "gdtoaimp.h"
@@ -267,7 +321,7 @@ diff -ru /home/netbsd/src/lib/libc/gdtoa/gdtoa_locks.c ./gdtoa/gdtoa_locks.c
 +#endif /* _REENTRANT */
 diff -ru /home/netbsd/src/lib/libc/gen/Makefile.inc ./gen/Makefile.inc
 --- /home/netbsd/src/lib/libc/gen/Makefile.inc 2010-12-13 03:52:36.000000000 +0000
-+++ ./gen/Makefile.inc 2011-02-21 16:04:00.000000000 +0000
++++ ./gen/Makefile.inc 2038-01-19 03:14:07.000000000 +0000
 @@ -2,8 +2,56 @@
  #     from: @(#)Makefile.inc  8.6 (Berkeley) 5/4/95
  
@@ -348,7 +402,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/Makefile.inc ./gen/Makefile.inc
  CLEANFILES+= errlist.c
 diff -ru /home/netbsd/src/lib/libc/gen/_verr.c ./gen/_verr.c
 --- /home/netbsd/src/lib/libc/gen/_verr.c      2005-09-13 01:44:09.000000000 +0000
-+++ ./gen/_verr.c      2011-02-21 16:04:00.000000000 +0000
++++ ./gen/_verr.c      2038-01-19 03:14:07.000000000 +0000
 @@ -13,6 +13,9 @@
  #if defined(__indr_reference)
  __indr_reference(_verr, verr)
@@ -361,7 +415,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/_verr.c ./gen/_verr.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/_verrx.c ./gen/_verrx.c
 --- /home/netbsd/src/lib/libc/gen/_verrx.c     2005-09-13 01:44:09.000000000 +0000
-+++ ./gen/_verrx.c     2011-02-21 16:04:00.000000000 +0000
++++ ./gen/_verrx.c     2038-01-19 03:14:07.000000000 +0000
 @@ -13,6 +13,9 @@
  #if defined(__indr_reference)
  __indr_reference(_verrx, verrx)
@@ -374,7 +428,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/_verrx.c ./gen/_verrx.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/_vwarn.c ./gen/_vwarn.c
 --- /home/netbsd/src/lib/libc/gen/_vwarn.c     2005-09-13 01:44:09.000000000 +0000
-+++ ./gen/_vwarn.c     2011-02-21 16:04:01.000000000 +0000
++++ ./gen/_vwarn.c     2038-01-19 03:14:07.000000000 +0000
 @@ -13,6 +13,9 @@
  #if defined(__indr_reference)
  __indr_reference(_vwarn, vwarn)
@@ -387,7 +441,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/_vwarn.c ./gen/_vwarn.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/_vwarnx.c ./gen/_vwarnx.c
 --- /home/netbsd/src/lib/libc/gen/_vwarnx.c    2005-09-13 01:44:09.000000000 +0000
-+++ ./gen/_vwarnx.c    2011-02-21 16:04:01.000000000 +0000
++++ ./gen/_vwarnx.c    2038-01-19 03:14:07.000000000 +0000
 @@ -13,6 +13,9 @@
  #if defined(__indr_reference)
  __indr_reference(_vwarnx, vwarnx)
@@ -400,7 +454,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/_vwarnx.c ./gen/_vwarnx.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/_warn.c ./gen/_warn.c
 --- /home/netbsd/src/lib/libc/gen/_warn.c      2005-09-13 01:44:09.000000000 +0000
-+++ ./gen/_warn.c      2011-02-21 16:04:00.000000000 +0000
++++ ./gen/_warn.c      2038-01-19 03:14:07.000000000 +0000
 @@ -24,7 +24,11 @@
        va_list ap;
  
@@ -415,7 +469,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/_warn.c ./gen/_warn.c
  #endif
 diff -ru /home/netbsd/src/lib/libc/gen/_warnx.c ./gen/_warnx.c
 --- /home/netbsd/src/lib/libc/gen/_warnx.c     2005-09-13 01:44:09.000000000 +0000
-+++ ./gen/_warnx.c     2011-02-21 16:04:00.000000000 +0000
++++ ./gen/_warnx.c     2038-01-19 03:14:07.000000000 +0000
 @@ -24,7 +24,11 @@
        va_list ap;
  
@@ -430,7 +484,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/_warnx.c ./gen/_warnx.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/closedir.c ./gen/closedir.c
 --- /home/netbsd/src/lib/libc/gen/closedir.c   2010-09-26 03:01:02.000000000 +0000
-+++ ./gen/closedir.c   2011-02-21 16:04:00.000000000 +0000
++++ ./gen/closedir.c   2038-01-19 03:14:07.000000000 +0000
 @@ -38,6 +38,11 @@
  #endif
  #endif /* LIBC_SCCS and not lint */
@@ -445,7 +499,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/closedir.c ./gen/closedir.c
  #include "extern.h"
 diff -ru /home/netbsd/src/lib/libc/gen/fts.c ./gen/fts.c
 --- /home/netbsd/src/lib/libc/gen/fts.c        2009-11-02 17:17:34.000000000 +0000
-+++ ./gen/fts.c        2011-02-21 16:04:00.000000000 +0000
++++ ./gen/fts.c        2038-01-19 03:14:07.000000000 +0000
 @@ -56,8 +56,10 @@
  #include <unistd.h>
  
@@ -459,7 +513,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/fts.c ./gen/fts.c
  static FTSENT *fts_build(FTS *, int);
 diff -ru /home/netbsd/src/lib/libc/gen/getcwd.c ./gen/getcwd.c
 --- /home/netbsd/src/lib/libc/gen/getcwd.c     2011-01-20 03:02:11.000000000 +0000
-+++ ./gen/getcwd.c     2011-02-21 16:05:43.000000000 +0000
++++ ./gen/getcwd.c     2038-01-19 03:14:07.000000000 +0000
 @@ -54,8 +54,12 @@
  #include "extern.h"
  
@@ -475,7 +529,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/getcwd.c ./gen/getcwd.c
  #if defined(_FORTIFY_SOURCE) && !defined(__lint__)
 diff -ru /home/netbsd/src/lib/libc/gen/getgrent.c ./gen/getgrent.c
 --- /home/netbsd/src/lib/libc/gen/getgrent.c   2008-04-28 20:22:59.000000000 +0000
-+++ ./gen/getgrent.c   2011-02-21 16:04:00.000000000 +0000
++++ ./gen/getgrent.c   2038-01-19 03:14:07.000000000 +0000
 @@ -481,7 +481,11 @@
  _files_getgrgid(void *nsrv, void *nscb, va_list ap)
  {
@@ -610,7 +664,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/getgrent.c ./gen/getgrent.c
        case NS_SUCCESS:
 diff -ru /home/netbsd/src/lib/libc/gen/getgroupmembership.c ./gen/getgroupmembership.c
 --- /home/netbsd/src/lib/libc/gen/getgroupmembership.c 2008-04-28 20:22:59.000000000 +0000
-+++ ./gen/getgroupmembership.c 2011-02-21 16:04:00.000000000 +0000
++++ ./gen/getgroupmembership.c 2038-01-19 03:14:07.000000000 +0000
 @@ -101,7 +101,11 @@
  {
        int             *result = va_arg(ap, int *);
@@ -685,7 +739,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/getgroupmembership.c ./gen/getgroupmember
        if (*groupc > maxgrp)                   /* too many groups found */
 diff -ru /home/netbsd/src/lib/libc/gen/getlogin.c ./gen/getlogin.c
 --- /home/netbsd/src/lib/libc/gen/getlogin.c   2009-01-11 02:46:27.000000000 +0000
-+++ ./gen/getlogin.c   2011-02-21 16:04:00.000000000 +0000
++++ ./gen/getlogin.c   2038-01-19 03:14:07.000000000 +0000
 @@ -78,7 +78,9 @@
  #ifdef __weak_alias
  __weak_alias(getlogin,_getlogin)
@@ -711,7 +765,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/getlogin.c ./gen/getlogin.c
 +#endif 
 diff -ru /home/netbsd/src/lib/libc/gen/getpwent.c ./gen/getpwent.c
 --- /home/netbsd/src/lib/libc/gen/getpwent.c   2010-03-24 03:02:14.000000000 +0000
-+++ ./gen/getpwent.c   2011-02-21 16:04:00.000000000 +0000
++++ ./gen/getpwent.c   2038-01-19 03:14:07.000000000 +0000
 @@ -671,7 +671,11 @@
  _files_getpwuid(void *nsrv, void *nscb, va_list ap)
  {
@@ -855,7 +909,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/getpwent.c ./gen/getpwent.c
        case NS_SUCCESS:
 diff -ru /home/netbsd/src/lib/libc/gen/gr_private.h ./gen/gr_private.h
 --- /home/netbsd/src/lib/libc/gen/gr_private.h 2008-04-28 20:22:59.000000000 +0000
-+++ ./gen/gr_private.h 2011-02-21 16:04:00.000000000 +0000
++++ ./gen/gr_private.h 2038-01-19 03:14:07.000000000 +0000
 @@ -40,11 +40,13 @@
  #define _GROUP_COMPAT /* "group" defaults to compat, so always provide it */
  
@@ -872,7 +926,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/gr_private.h ./gen/gr_private.h
         * files methods
 diff -ru /home/netbsd/src/lib/libc/gen/initdir.c ./gen/initdir.c
 --- /home/netbsd/src/lib/libc/gen/initdir.c    2010-09-26 02:26:59.000000000 +0000
-+++ ./gen/initdir.c    2011-02-24 09:01:41.000000000 +0000
++++ ./gen/initdir.c    2038-01-19 03:14:07.000000000 +0000
 @@ -35,6 +35,14 @@
  #endif /* LIBC_SCCS and not lint */
  
@@ -902,7 +956,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/initdir.c ./gen/initdir.c
                                        free(dpv);
 diff -ru /home/netbsd/src/lib/libc/gen/opendir.c ./gen/opendir.c
 --- /home/netbsd/src/lib/libc/gen/opendir.c    2010-09-26 03:01:02.000000000 +0000
-+++ ./gen/opendir.c    2011-02-21 16:04:00.000000000 +0000
++++ ./gen/opendir.c    2038-01-19 03:14:07.000000000 +0000
 @@ -40,6 +40,12 @@
  
  #include "namespace.h"
@@ -939,7 +993,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/opendir.c ./gen/opendir.c
        error = _initdir(dirp, fd, name);
 diff -ru /home/netbsd/src/lib/libc/gen/readdir.c ./gen/readdir.c
 --- /home/netbsd/src/lib/libc/gen/readdir.c    2010-09-16 03:01:30.000000000 +0000
-+++ ./gen/readdir.c    2011-02-21 16:04:00.000000000 +0000
++++ ./gen/readdir.c    2038-01-19 03:14:07.000000000 +0000
 @@ -40,6 +40,12 @@
  
  #include "namespace.h"
@@ -966,7 +1020,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/readdir.c ./gen/readdir.c
  }
 diff -ru /home/netbsd/src/lib/libc/gen/rewinddir.c ./gen/rewinddir.c
 --- /home/netbsd/src/lib/libc/gen/rewinddir.c  2010-09-26 03:01:02.000000000 +0000
-+++ ./gen/rewinddir.c  2011-02-21 16:04:01.000000000 +0000
++++ ./gen/rewinddir.c  2038-01-19 03:14:07.000000000 +0000
 @@ -40,6 +40,11 @@
  
  #include "namespace.h"
@@ -981,7 +1035,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/rewinddir.c ./gen/rewinddir.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/scandir.c ./gen/scandir.c
 --- /home/netbsd/src/lib/libc/gen/scandir.c    2007-06-09 23:57:25.000000000 +0000
-+++ ./gen/scandir.c    2011-02-21 16:04:00.000000000 +0000
++++ ./gen/scandir.c    2038-01-19 03:14:07.000000000 +0000
 @@ -130,9 +130,13 @@
                        goto bad2;
                p->d_fileno = d->d_fileno;
@@ -998,7 +1052,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/scandir.c ./gen/scandir.c
        (void)closedir(dirp);
 diff -ru /home/netbsd/src/lib/libc/gen/seekdir.c ./gen/seekdir.c
 --- /home/netbsd/src/lib/libc/gen/seekdir.c    2006-05-17 20:36:50.000000000 +0000
-+++ ./gen/seekdir.c    2011-02-21 16:04:00.000000000 +0000
++++ ./gen/seekdir.c    2038-01-19 03:14:07.000000000 +0000
 @@ -40,6 +40,9 @@
  
  #include "namespace.h"
@@ -1011,7 +1065,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/seekdir.c ./gen/seekdir.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/syslog.c ./gen/syslog.c
 --- /home/netbsd/src/lib/libc/gen/syslog.c     2010-05-14 04:47:24.000000000 +0000
-+++ ./gen/syslog.c     2011-02-21 16:04:01.000000000 +0000
++++ ./gen/syslog.c     2038-01-19 03:14:07.000000000 +0000
 @@ -492,7 +492,9 @@
        /* AF_UNIX address of local logger */
        static const struct sockaddr_un sun = {
@@ -1024,7 +1078,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/syslog.c ./gen/syslog.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/telldir.c ./gen/telldir.c
 --- /home/netbsd/src/lib/libc/gen/telldir.c    2008-05-04 18:53:26.000000000 +0000
-+++ ./gen/telldir.c    2011-02-21 16:04:00.000000000 +0000
++++ ./gen/telldir.c    2038-01-19 03:14:07.000000000 +0000
 @@ -40,6 +40,11 @@
  
  #include "namespace.h"
@@ -1039,7 +1093,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/telldir.c ./gen/telldir.c
  
 diff -ru /home/netbsd/src/lib/libc/gen/ttyname.c ./gen/ttyname.c
 --- /home/netbsd/src/lib/libc/gen/ttyname.c    2008-06-25 11:47:29.000000000 +0000
-+++ ./gen/ttyname.c    2011-02-21 16:04:00.000000000 +0000
++++ ./gen/ttyname.c    2038-01-19 03:14:07.000000000 +0000
 @@ -72,7 +72,9 @@
                mode_t type;
                dev_t dev;
@@ -1080,7 +1134,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/ttyname.c ./gen/ttyname.c
                         * XXX: we return an error if *any* entry does not
 diff -ru /home/netbsd/src/lib/libc/gen/ttyslot.c ./gen/ttyslot.c
 --- /home/netbsd/src/lib/libc/gen/ttyslot.c    2009-01-11 02:46:27.000000000 +0000
-+++ ./gen/ttyslot.c    2011-02-21 16:04:00.000000000 +0000
++++ ./gen/ttyslot.c    2038-01-19 03:14:07.000000000 +0000
 @@ -59,14 +59,20 @@
        char *p;
        int cnt;
@@ -1104,7 +1158,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/ttyslot.c ./gen/ttyslot.c
                        continue;
 diff -ru /home/netbsd/src/lib/libc/gen/ulimit.c ./gen/ulimit.c
 --- /home/netbsd/src/lib/libc/gen/ulimit.c     2008-04-28 20:22:59.000000000 +0000
-+++ ./gen/ulimit.c     2011-02-21 16:04:00.000000000 +0000
++++ ./gen/ulimit.c     2038-01-19 03:14:07.000000000 +0000
 @@ -54,12 +54,14 @@
                if (getrlimit(RLIMIT_FSIZE, &rlimit) == 0)
                        result = (long int)(rlimit.rlim_cur / 512);
@@ -1122,7 +1176,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/ulimit.c ./gen/ulimit.c
        }
 diff -ru /home/netbsd/src/lib/libc/gen/utmpx.c ./gen/utmpx.c
 --- /home/netbsd/src/lib/libc/gen/utmpx.c      2009-01-11 02:46:27.000000000 +0000
-+++ ./gen/utmpx.c      2011-02-21 16:04:00.000000000 +0000
++++ ./gen/utmpx.c      2038-01-19 03:14:07.000000000 +0000
 @@ -336,16 +336,32 @@
        _DIAGASSERT(file != NULL);
        _DIAGASSERT(utx != NULL);
@@ -1197,7 +1251,7 @@ diff -ru /home/netbsd/src/lib/libc/gen/utmpx.c ./gen/utmpx.c
        data.data = ll;
 diff -ru /home/netbsd/src/lib/libc/gmon/gmon.c ./gmon/gmon.c
 --- /home/netbsd/src/lib/libc/gmon/gmon.c      2011-01-05 03:01:31.000000000 +0000
-+++ ./gmon/gmon.c      2011-02-21 16:04:11.000000000 +0000
++++ ./gmon/gmon.c      2038-01-19 03:14:07.000000000 +0000
 @@ -373,8 +373,10 @@
        struct gmonparam *p = &_gmonparam;
        struct gmonhdr gmonhdr, *hdr;
@@ -1242,7 +1296,7 @@ diff -ru /home/netbsd/src/lib/libc/gmon/gmon.c ./gmon/gmon.c
 +#endif /* !__minix */
 diff -ru /home/netbsd/src/lib/libc/include/env.h ./include/env.h
 --- /home/netbsd/src/lib/libc/include/env.h    2010-11-14 22:04:36.000000000 +0000
-+++ ./include/env.h    2011-02-21 16:04:09.000000000 +0000
++++ ./include/env.h    2038-01-19 03:14:07.000000000 +0000
 @@ -56,7 +56,11 @@
  }
  
@@ -1257,7 +1311,7 @@ diff -ru /home/netbsd/src/lib/libc/include/env.h ./include/env.h
  }
 diff -ru /home/netbsd/src/lib/libc/include/namespace.h ./include/namespace.h
 --- /home/netbsd/src/lib/libc/include/namespace.h      2010-12-17 03:01:54.000000000 +0000
-+++ ./include/namespace.h      2011-02-22 23:19:42.000000000 +0000
++++ ./include/namespace.h      2038-01-19 03:14:07.000000000 +0000
 @@ -47,7 +47,9 @@
  #define fork          _fork
  #define fseeko                _fseeko
@@ -1363,7 +1417,7 @@ diff -ru /home/netbsd/src/lib/libc/include/namespace.h ./include/namespace.h
  
 diff -ru /home/netbsd/src/lib/libc/libcincludes.mk ./libcincludes.mk
 --- /home/netbsd/src/lib/libc/libcincludes.mk  2008-10-26 07:28:06.000000000 +0000
-+++ ./libcincludes.mk  2011-02-22 10:32:29.000000000 +0000
++++ ./libcincludes.mk  2038-01-19 03:14:07.000000000 +0000
 @@ -3,6 +3,24 @@
  # Makefile fragment shared across several parts that want to look
  # inside libc's include tree.
@@ -1396,7 +1450,7 @@ diff -ru /home/netbsd/src/lib/libc/libcincludes.mk ./libcincludes.mk
 +.endif
 diff -ru /home/netbsd/src/lib/libc/locale/setlocale.c ./locale/setlocale.c
 --- /home/netbsd/src/lib/libc/locale/setlocale.c       2010-06-08 03:01:34.000000000 +0000
-+++ ./locale/setlocale.c       2011-02-21 16:03:55.000000000 +0000
++++ ./locale/setlocale.c       2038-01-19 03:14:07.000000000 +0000
 @@ -61,6 +61,38 @@
  extern const _locale_category_t _localeio_LC_MESSAGES_desc;
  #endif
@@ -1438,7 +1492,7 @@ diff -ru /home/netbsd/src/lib/libc/locale/setlocale.c ./locale/setlocale.c
  #ifdef WITH_RUNE
 diff -ru /home/netbsd/src/lib/libc/misc/initfini.c ./misc/initfini.c
 --- /home/netbsd/src/lib/libc/misc/initfini.c  2010-11-15 03:02:00.000000000 +0000
-+++ ./misc/initfini.c  2011-02-21 16:04:10.000000000 +0000
++++ ./misc/initfini.c  2038-01-19 03:14:07.000000000 +0000
 @@ -55,8 +55,10 @@
        /* Atomic operations */
        __libc_atomic_init();
@@ -1452,7 +1506,7 @@ diff -ru /home/netbsd/src/lib/libc/misc/initfini.c ./misc/initfini.c
        __libc_atexit_init();
 diff -ru /home/netbsd/src/lib/libc/misc/stack_protector.c ./misc/stack_protector.c
 --- /home/netbsd/src/lib/libc/misc/stack_protector.c   2010-12-08 03:01:48.000000000 +0000
-+++ ./misc/stack_protector.c   2011-02-21 16:04:10.000000000 +0000
++++ ./misc/stack_protector.c   2038-01-19 03:14:07.000000000 +0000
 @@ -56,24 +56,30 @@
  void
  __guard_setup(void)
@@ -1486,7 +1540,7 @@ diff -ru /home/netbsd/src/lib/libc/misc/stack_protector.c ./misc/stack_protector
  /*ARGSUSED*/
 diff -ru /home/netbsd/src/lib/libc/net/Makefile.inc ./net/Makefile.inc
 --- /home/netbsd/src/lib/libc/net/Makefile.inc 2009-10-02 02:45:29.000000000 +0000
-+++ ./net/Makefile.inc 2011-02-21 16:04:10.000000000 +0000
++++ ./net/Makefile.inc 2038-01-19 03:14:07.000000000 +0000
 @@ -2,8 +2,22 @@
  #     @(#)Makefile.inc        8.2 (Berkeley) 9/5/93
  
@@ -1530,7 +1584,7 @@ diff -ru /home/netbsd/src/lib/libc/net/Makefile.inc ./net/Makefile.inc
  YPREFIX=_nsyy
 diff -ru /home/netbsd/src/lib/libc/net/getaddrinfo.c ./net/getaddrinfo.c
 --- /home/netbsd/src/lib/libc/net/getaddrinfo.c        2009-10-02 07:41:08.000000000 +0000
-+++ ./net/getaddrinfo.c        2011-02-21 16:04:10.000000000 +0000
++++ ./net/getaddrinfo.c        2038-01-19 03:14:07.000000000 +0000
 @@ -855,7 +855,12 @@
        ai = calloc(sizeof(struct addrinfo) + addrlen, 1);
        if (ai) {
@@ -1546,7 +1600,7 @@ diff -ru /home/netbsd/src/lib/libc/net/getaddrinfo.c ./net/getaddrinfo.c
        return ai;
 diff -ru /home/netbsd/src/lib/libc/net/getnameinfo.c ./net/getnameinfo.c
 --- /home/netbsd/src/lib/libc/net/getnameinfo.c        2010-06-30 03:52:09.000000000 +0000
-+++ ./net/getnameinfo.c        2011-02-21 16:04:10.000000000 +0000
++++ ./net/getnameinfo.c        2038-01-19 03:14:07.000000000 +0000
 @@ -54,10 +54,12 @@
  #include <sys/types.h>
  #include <sys/socket.h>
@@ -1627,7 +1681,7 @@ diff -ru /home/netbsd/src/lib/libc/net/getnameinfo.c ./net/getnameinfo.c
  hexname(cp, len, host, hostlen)
 diff -ru /home/netbsd/src/lib/libc/net/rcmd.c ./net/rcmd.c
 --- /home/netbsd/src/lib/libc/net/rcmd.c       2007-01-03 11:46:22.000000000 +0000
-+++ ./net/rcmd.c       2011-02-21 16:04:10.000000000 +0000
++++ ./net/rcmd.c       2038-01-19 03:14:07.000000000 +0000
 @@ -48,7 +48,9 @@
  #include <sys/wait.h>
  
@@ -1638,18 +1692,7 @@ diff -ru /home/netbsd/src/lib/libc/net/rcmd.c ./net/rcmd.c
  #include <arpa/inet.h>
  #include <netgroup.h>
  
-@@ -70,6 +72,10 @@
- #include "pathnames.h"
-+#ifdef __minix
-+#undef BSD4_4
-+#endif
-+
- int   orcmd __P((char **, u_int, const char *, const char *, const char *,
-           int *));
- int   orcmd_af __P((char **, u_int, const char *, const char *, const char *,
-@@ -213,7 +219,11 @@
+@@ -213,7 +215,11 @@
        struct addrinfo *r;
        struct sockaddr_storage from;
        struct pollfd reads[2];
@@ -1661,7 +1704,7 @@ diff -ru /home/netbsd/src/lib/libc/net/rcmd.c ./net/rcmd.c
        pid_t pid;
        int s, lport, timo;
        int pollr;
-@@ -230,10 +240,14 @@
+@@ -230,10 +236,14 @@
        r = res;
        refused = 0;
        pid = getpid();
@@ -1676,7 +1719,7 @@ diff -ru /home/netbsd/src/lib/libc/net/rcmd.c ./net/rcmd.c
        for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
                s = rresvport_af(&lport, r->ai_family);
                if (s < 0) {
-@@ -245,11 +259,16 @@
+@@ -245,11 +255,16 @@
                                r = r->ai_next;
                                continue;
                        } else {
@@ -1693,7 +1736,7 @@ diff -ru /home/netbsd/src/lib/libc/net/rcmd.c ./net/rcmd.c
                if (connect(s, r->ai_addr, r->ai_addrlen) >= 0)
                        break;
                (void)close(s);
-@@ -286,7 +305,10 @@
+@@ -286,7 +301,10 @@
                }
                (void)fprintf(stderr, "%s: %s\n", res->ai_canonname,
                    strerror(errno));
@@ -1704,7 +1747,7 @@ diff -ru /home/netbsd/src/lib/libc/net/rcmd.c ./net/rcmd.c
                return (-1);
        }
        lport--;
-@@ -363,14 +385,18 @@
+@@ -363,14 +381,18 @@
                }
                goto bad2;
        }
@@ -1725,7 +1768,7 @@ diff -ru /home/netbsd/src/lib/libc/net/rcmd.c ./net/rcmd.c
  
 diff -ru /home/netbsd/src/lib/libc/net/send.c ./net/send.c
 --- /home/netbsd/src/lib/libc/net/send.c       2003-08-07 16:43:15.000000000 +0000
-+++ ./net/send.c       2011-02-21 16:04:10.000000000 +0000
++++ ./net/send.c       2038-01-19 03:14:07.000000000 +0000
 @@ -44,9 +44,15 @@
  
  #include <stddef.h>
@@ -1744,7 +1787,7 @@ diff -ru /home/netbsd/src/lib/libc/net/send.c ./net/send.c
  send(s, msg, len, flags)
 diff -ru /home/netbsd/src/lib/libc/nls/catopen.c ./nls/catopen.c
 --- /home/netbsd/src/lib/libc/nls/catopen.c    2009-03-10 13:15:40.000000000 +0000
-+++ ./nls/catopen.c    2011-02-21 16:03:54.000000000 +0000
++++ ./nls/catopen.c    2038-01-19 03:14:07.000000000 +0000
 @@ -169,6 +169,19 @@
                return (nl_catd)-1;
        }
@@ -1773,9 +1816,24 @@ diff -ru /home/netbsd/src/lib/libc/nls/catopen.c ./nls/catopen.c
  
        if (ntohl((u_int32_t)((struct _nls_cat_hdr *)data)->__magic) !=
            _NLS_MAGIC) {
+diff -ru /home/netbsd/src/lib/libc/resolv/Makefile.inc ./resolv/Makefile.inc
+--- /home/netbsd/src/lib/libc/resolv/Makefile.inc      2007-01-28 02:14:05.000000000 +0000
++++ ./resolv/Makefile.inc      2038-01-19 03:14:07.000000000 +0000
+@@ -2,7 +2,11 @@
+ # net sources
+ .PATH: ${.CURDIR}/resolv
++.if defined(__MINIX)
++CPPFLAGS+=-DCOMPAT__RES -DNEED_PSELECT
++.else
+ CPPFLAGS+=-DCOMPAT__RES -DUSE_POLL
++.endif
+ SRCS+=        __dn_comp.c __res_close.c __res_send.c h_errno.c \
+       herror.c res_comp.c res_data.c res_debug.c \
 diff -ru /home/netbsd/src/lib/libc/resolv/res_comp.c ./resolv/res_comp.c
 --- /home/netbsd/src/lib/libc/resolv/res_comp.c        2009-04-12 17:07:17.000000000 +0000
-+++ ./resolv/res_comp.c        2011-03-01 10:37:15.000000000 +0000
++++ ./resolv/res_comp.c        2038-01-19 03:14:07.000000000 +0000
 @@ -96,7 +96,7 @@
  #ifdef __weak_alias
  __weak_alias(dn_expand,_dn_expand)
@@ -1787,7 +1845,7 @@ diff -ru /home/netbsd/src/lib/libc/resolv/res_comp.c ./resolv/res_comp.c
  __weak_alias(res_ownok,__res_ownok)
 diff -ru /home/netbsd/src/lib/libc/resolv/res_init.c ./resolv/res_init.c
 --- /home/netbsd/src/lib/libc/resolv/res_init.c        2009-10-24 17:24:01.000000000 +0000
-+++ ./resolv/res_init.c        2011-02-23 03:40:29.000000000 +0000
++++ ./resolv/res_init.c        2038-01-19 03:14:07.000000000 +0000
 @@ -70,6 +70,10 @@
   * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
@@ -1858,9 +1916,53 @@ diff -ru /home/netbsd/src/lib/libc/resolv/res_init.c ./resolv/res_init.c
  }
  
  static void
+diff -ru /home/netbsd/src/lib/libc/stdio/fseeko.c ./stdio/fseeko.c
+--- /home/netbsd/src/lib/libc/stdio/fseeko.c   2009-01-31 00:08:05.000000000 +0000
++++ ./stdio/fseeko.c   2011-03-16 12:40:38.000000000 +0000
+@@ -150,7 +150,11 @@
+                       fp->_flags |= __SNPT;
+                       goto dumb;
+               }
++#ifdef __minix
++              fp->_blksize = MINIX_ST_BLKSIZE;
++#else
+               fp->_blksize = st.st_blksize;
++#endif
+               fp->_flags |= __SOPT;
+       }
+diff -ru /home/netbsd/src/lib/libc/stdio/makebuf.c ./stdio/makebuf.c
+--- /home/netbsd/src/lib/libc/stdio/makebuf.c  2008-03-13 15:40:00.000000000 +0000
++++ ./stdio/makebuf.c  2011-03-16 12:44:50.000000000 +0000
+@@ -114,18 +114,25 @@
+       /* could be a tty iff it is a character device */
+       *couldbetty = S_ISCHR(st.st_mode);
++#ifndef __minix
+       if (st.st_blksize == 0) {
+               *bufsize = BUFSIZ;
+               return (__SNPT);
+       }
++#endif
+       /*
+        * Optimise fseek() only if it is a regular file.  (The test for
+        * __sseek is mainly paranoia.)  It is safe to set _blksize
+        * unconditionally; it will only be used if __SOPT is also set.
+        */
++#ifdef __minix
++      *bufsize = MINIX_ST_BLKSIZE;
++      fp->_blksize = MINIX_ST_BLKSIZE;
++#else
+       *bufsize = st.st_blksize;
+       fp->_blksize = st.st_blksize;
++#endif
+       return ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek ?
+           __SOPT : __SNPT);
+ }
 diff -ru /home/netbsd/src/lib/libc/stdlib/Makefile.inc ./stdlib/Makefile.inc
 --- /home/netbsd/src/lib/libc/stdlib/Makefile.inc      2010-11-15 03:02:00.000000000 +0000
-+++ ./stdlib/Makefile.inc      2011-02-21 16:03:50.000000000 +0000
++++ ./stdlib/Makefile.inc      2038-01-19 03:14:07.000000000 +0000
 @@ -4,6 +4,21 @@
  # stdlib sources
  .PATH: ${ARCHDIR}/stdlib ${.CURDIR}/stdlib
@@ -1893,7 +1995,7 @@ diff -ru /home/netbsd/src/lib/libc/stdlib/Makefile.inc ./stdlib/Makefile.inc
  SRCS+=        abs.c labs.c llabs.c imaxabs.c
 diff -ru /home/netbsd/src/lib/libc/stdlib/atexit.c ./stdlib/atexit.c
 --- /home/netbsd/src/lib/libc/stdlib/atexit.c  2009-10-08 16:33:45.000000000 +0000
-+++ ./stdlib/atexit.c  2011-02-21 16:03:50.000000000 +0000
++++ ./stdlib/atexit.c  2038-01-19 03:14:07.000000000 +0000
 @@ -120,10 +120,12 @@
  void
  __libc_atexit_init(void)
@@ -1909,7 +2011,7 @@ diff -ru /home/netbsd/src/lib/libc/stdlib/atexit.c ./stdlib/atexit.c
  /*
 diff -ru /home/netbsd/src/lib/libc/stdlib/malloc.c ./stdlib/malloc.c
 --- /home/netbsd/src/lib/libc/stdlib/malloc.c  2008-02-03 22:56:53.000000000 +0000
-+++ ./stdlib/malloc.c  2011-02-21 16:03:50.000000000 +0000
++++ ./stdlib/malloc.c  2038-01-19 03:14:07.000000000 +0000
 @@ -65,8 +65,10 @@
  #       define malloc_pageshift         12U
  #       define malloc_minsize           16U
@@ -1957,7 +2059,7 @@ diff -ru /home/netbsd/src/lib/libc/stdlib/malloc.c ./stdlib/malloc.c
  
 diff -ru /home/netbsd/src/lib/libc/stdlib/system.c ./stdlib/system.c
 --- /home/netbsd/src/lib/libc/stdlib/system.c  2010-11-15 03:02:00.000000000 +0000
-+++ ./stdlib/system.c  2011-02-21 16:03:50.000000000 +0000
++++ ./stdlib/system.c  2038-01-19 03:14:07.000000000 +0000
 @@ -91,7 +91,11 @@
        }
  
@@ -1972,7 +2074,7 @@ diff -ru /home/netbsd/src/lib/libc/stdlib/system.c ./stdlib/system.c
                sigaction(SIGINT, &intsa, NULL);
 diff -ru /home/netbsd/src/lib/libc/termios/Makefile.inc ./termios/Makefile.inc
 --- /home/netbsd/src/lib/libc/termios/Makefile.inc     1998-02-14 20:20:44.000000000 +0000
-+++ ./termios/Makefile.inc     2011-02-21 16:04:06.000000000 +0000
++++ ./termios/Makefile.inc     2038-01-19 03:14:07.000000000 +0000
 @@ -2,9 +2,18 @@
  
  .PATH:        ${.CURDIR}/termios
@@ -1994,7 +2096,7 @@ diff -ru /home/netbsd/src/lib/libc/termios/Makefile.inc ./termios/Makefile.inc
  
 diff -ru /home/netbsd/src/lib/libc/termios/cfmakeraw.c ./termios/cfmakeraw.c
 --- /home/netbsd/src/lib/libc/termios/cfmakeraw.c      2003-08-07 16:44:12.000000000 +0000
-+++ ./termios/cfmakeraw.c      2011-02-21 16:04:06.000000000 +0000
++++ ./termios/cfmakeraw.c      2038-01-19 03:14:07.000000000 +0000
 @@ -59,7 +59,11 @@
  
        _DIAGASSERT(t != NULL);
@@ -2009,7 +2111,7 @@ diff -ru /home/netbsd/src/lib/libc/termios/cfmakeraw.c ./termios/cfmakeraw.c
        t->c_cflag &= ~(CSIZE|PARENB);
 diff -ru /home/netbsd/src/lib/libc/termios/tcflow.c ./termios/tcflow.c
 --- /home/netbsd/src/lib/libc/termios/tcflow.c 2003-08-07 16:44:13.000000000 +0000
-+++ ./termios/tcflow.c 2011-02-21 16:04:06.000000000 +0000
++++ ./termios/tcflow.c 2038-01-19 03:14:07.000000000 +0000
 @@ -54,6 +54,10 @@
  tcflow(fd, action)
        int fd, action;
@@ -2029,7 +2131,7 @@ diff -ru /home/netbsd/src/lib/libc/termios/tcflow.c ./termios/tcflow.c
  }
 diff -ru /home/netbsd/src/lib/libc/termios/tcflush.c ./termios/tcflush.c
 --- /home/netbsd/src/lib/libc/termios/tcflush.c        2003-08-07 16:44:13.000000000 +0000
-+++ ./termios/tcflush.c        2011-02-21 16:04:06.000000000 +0000
++++ ./termios/tcflush.c        2038-01-19 03:14:07.000000000 +0000
 @@ -54,6 +54,10 @@
  tcflush(fd, which)
        int fd, which;
@@ -2049,7 +2151,7 @@ diff -ru /home/netbsd/src/lib/libc/termios/tcflush.c ./termios/tcflush.c
  }
 diff -ru /home/netbsd/src/lib/libc/termios/tcsendbreak.c ./termios/tcsendbreak.c
 --- /home/netbsd/src/lib/libc/termios/tcsendbreak.c    2003-08-07 16:44:14.000000000 +0000
-+++ ./termios/tcsendbreak.c    2011-02-21 16:04:06.000000000 +0000
++++ ./termios/tcsendbreak.c    2038-01-19 03:14:07.000000000 +0000
 @@ -41,7 +41,9 @@
  #include "namespace.h"
  #include <sys/types.h>
@@ -2079,7 +2181,7 @@ diff -ru /home/netbsd/src/lib/libc/termios/tcsendbreak.c ./termios/tcsendbreak.c
  }
 diff -ru /home/netbsd/src/lib/libc/termios/tcsetattr.c ./termios/tcsetattr.c
 --- /home/netbsd/src/lib/libc/termios/tcsetattr.c      2003-08-07 16:44:14.000000000 +0000
-+++ ./termios/tcsetattr.c      2011-02-21 16:04:06.000000000 +0000
++++ ./termios/tcsetattr.c      2038-01-19 03:14:07.000000000 +0000
 @@ -60,11 +60,15 @@
        _DIAGASSERT(fd != -1);
        _DIAGASSERT(t != NULL);
@@ -2096,9 +2198,24 @@ diff -ru /home/netbsd/src/lib/libc/termios/tcsetattr.c ./termios/tcsetattr.c
        switch (opt & ~TCSASOFT) {
        case TCSANOW:
                return (ioctl(fd, TIOCSETA, t));
+diff -ru /home/netbsd/src/lib/libc/time/strftime.c ./time/strftime.c
+--- /home/netbsd/src/lib/libc/time/strftime.c  2010-12-17 03:01:55.000000000 +0000
++++ ./time/strftime.c  2038-01-19 03:14:07.000000000 +0000
+@@ -553,6 +553,11 @@
+                               pt = _conv(diff, "%04d", pt, ptlim);
+                               }
+                               continue;
++#ifdef __minix
++                      case '+':
++                              pt = _fmt(sp, Locale->c_fmt, t, pt, ptlim, warnp);
++                              continue;
++#endif /* !__minix */
+ #if 0
+                       case '+':
+                               pt = _fmt(sp, Locale->date_fmt, t, pt, ptlim,
 diff -ru /home/netbsd/src/lib/libc/yp/yplib.c ./yp/yplib.c
 --- /home/netbsd/src/lib/libc/yp/yplib.c       2006-11-03 20:18:49.000000000 +0000
-+++ ./yp/yplib.c       2011-02-21 16:03:54.000000000 +0000
++++ ./yp/yplib.c       2038-01-19 03:14:07.000000000 +0000
 @@ -172,8 +172,10 @@
                        }
                        (void)memset(&ysd->dom_server_addr, 0,
index fd87c811c29b5b2fcd7582b65fd19a12c54a4a7f..e70c2f9e7ed2ab0300e2336c0f63d9d189a00bc0 100644 (file)
@@ -72,10 +72,6 @@ __RCSID("$NetBSD: rcmd.c,v 1.65 2007/01/03 11:46:22 ws Exp $");
 
 #include "pathnames.h"
 
-#ifdef __minix
-#undef BSD4_4
-#endif
-
 int    orcmd __P((char **, u_int, const char *, const char *, const char *,
            int *));
 int    orcmd_af __P((char **, u_int, const char *, const char *, const char *,
index 6b52829258612c43e77b368fa7b445645f8781ae..6479cb2af8dcd35cdef6107cf29aa1cd5fcfd6b2 100644 (file)
@@ -2,7 +2,11 @@
 
 # net sources
 .PATH: ${.CURDIR}/resolv
+.if defined(__MINIX)
+CPPFLAGS+=-DCOMPAT__RES -DNEED_PSELECT
+.else
 CPPFLAGS+=-DCOMPAT__RES -DUSE_POLL
+.endif
 
 SRCS+= __dn_comp.c __res_close.c __res_send.c h_errno.c \
        herror.c res_comp.c res_data.c res_debug.c \
index a8708af7f588da3d96f649154330977859e8b9fd..1008e777eb4d911de0effb5b9c75e917cd728909 100644 (file)
@@ -150,7 +150,11 @@ fseeko(FILE *fp, off_t offset, int whence)
                        fp->_flags |= __SNPT;
                        goto dumb;
                }
+#ifdef __minix
+               fp->_blksize = MINIX_ST_BLKSIZE;
+#else
                fp->_blksize = st.st_blksize;
+#endif
                fp->_flags |= __SOPT;
        }
 
index cf0e6807caa64a8338b352978674975ce1753599..dc37f864572732a7e5c381b6779b7a646d37e107 100644 (file)
@@ -114,18 +114,25 @@ __swhatbuf(fp, bufsize, couldbetty)
 
        /* could be a tty iff it is a character device */
        *couldbetty = S_ISCHR(st.st_mode);
+#ifndef __minix
        if (st.st_blksize == 0) {
                *bufsize = BUFSIZ;
                return (__SNPT);
        }
+#endif
 
        /*
         * Optimise fseek() only if it is a regular file.  (The test for
         * __sseek is mainly paranoia.)  It is safe to set _blksize
         * unconditionally; it will only be used if __SOPT is also set.
         */
+#ifdef __minix
+       *bufsize = MINIX_ST_BLKSIZE;
+       fp->_blksize = MINIX_ST_BLKSIZE;
+#else
        *bufsize = st.st_blksize;
        fp->_blksize = st.st_blksize;
+#endif
        return ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek ?
            __SOPT : __SNPT);
 }
index 5c08b5150efd19a5b297d925fe78ab5de324349a..7aa47f67559916bbb9da8917a758769efaaaed16 100644 (file)
@@ -47,42 +47,6 @@ struct __minix_stat *buffer;
   return __orig_minix_stat(name, buffer);
 }
 
-int __ext_minix_stat(name, buffer)
-const char *name;
-struct stat *buffer;
-{
-  int r;
-  r = __orig_minix_stat(name, buffer);
-  if ( r < 0)
-    return r;
-  buffer->st_blksize = MINIX_ST_BLKSIZE;
-  return r;
-} 
-
-int __ext_minix_fstat(fd, buffer)
-int fd;
-struct stat *buffer;
-{
-  int r;
-  r = __orig_minix_fstat(fd, buffer);
-  if ( r < 0 )
-    return r;
-  buffer->st_blksize = MINIX_ST_BLKSIZE;  
-  return r;
-}
-
-int __ext_minix_lstat(name, buffer)
-const char *name;
-struct stat *buffer;
-{
-  int r;
-  r = __orig_minix_lstat(name, buffer);
-  if ( r < 0 )
-    return r;
-  buffer->st_blksize = MINIX_ST_BLKSIZE;
-  return r;
-}
-
 /*
  * NetBSD Fields Emulation.
  */
index 1cd8ac4447c8b673030f450b4e837f30f2546455..62020d6c2bb8ba788be1b1024fd79a71325e5280 100644 (file)
@@ -553,6 +553,11 @@ label:
                                pt = _conv(diff, "%04d", pt, ptlim);
                                }
                                continue;
+#ifdef __minix
+                       case '+':
+                               pt = _fmt(sp, Locale->c_fmt, t, pt, ptlim, warnp);
+                               continue;
+#endif /* !__minix */
 #if 0
                        case '+':
                                pt = _fmt(sp, Locale->date_fmt, t, pt, ptlim,
index 325cf4b516bbdd0d73b03c0b275b0a45f752dad3..912cc3d9fbcab087d4fac917d83679d596d8f83d 100644 (file)
 #ifndef        _AOUT_H_
 #define        _AOUT_H_
 
+#ifdef __minix
+#include <compat/a.out.h>
+#else /* !__minix */
+
 #include <sys/exec_aout.h>
 
 #define        _AOUT_INCLUDE_
 #include <nlist.h>
 
+#endif /* !__minix */
 #endif /* !_AOUT_H_ */
index 3f2d66c0315ee5dde0173330ea25ca2c6eb65bb7..7bd56e53b718a5c0b2df8ed2bdb2a704282cf3fd 100644 (file)
@@ -133,6 +133,14 @@ typedef struct {
        unsigned        arcount :16;    /*%< number of resource entries */
 } HEADER;
 
+#ifdef _MINIX
+#define dh_id id
+#define dh_qdcount qdcount
+#define dh_ancount ancount
+#define dh_nscount nscount
+#define dh_arcount arcount
+#endif
+
 #define PACKETSZ       NS_PACKETSZ
 #define MAXDNAME       NS_MAXDNAME
 #define MAXCDNAME      NS_MAXCDNAME
index ce0f162dea868eb8ab9a0b244b51f33082a76993..006013d630b78196ffe3cb9c47726709d131fa1e 100644 (file)
@@ -1,6 +1,6 @@
 diff -ru /home/netbsd/src/include/Makefile ./Makefile
 --- /home/netbsd/src/include/Makefile  2010-08-01 03:01:48.000000000 +0000
-+++ ./Makefile 2038-01-19 03:14:07.000000000 +0000
++++ ./Makefile 2011-01-19 03:14:07.000000000 +0000
 @@ -7,6 +7,24 @@
  
  # Missing: mp.h
@@ -63,9 +63,45 @@ diff -ru /home/netbsd/src/include/Makefile ./Makefile
  
  .include <bsd.prog.mk>
  .include <bsd.subdir.mk>
+diff -ru /home/netbsd/src/include/a.out.h ./a.out.h
+--- /home/netbsd/src/include/a.out.h   2009-08-19 20:23:46.000000000 +0000
++++ ./a.out.h  2011-04-06 05:07:37.000000000 +0000
+@@ -60,9 +60,14 @@
+ #ifndef       _AOUT_H_
+ #define       _AOUT_H_
++#ifdef __minix
++#include <compat/a.out.h>
++#else /* !__minix */
++
+ #include <sys/exec_aout.h>
+ #define       _AOUT_INCLUDE_
+ #include <nlist.h>
++#endif /* !__minix */
+ #endif /* !_AOUT_H_ */
+diff -ru /home/netbsd/src/include/arpa/nameser_compat.h ./arpa/nameser_compat.h
+--- /home/netbsd/src/include/arpa/nameser_compat.h     2009-04-13 03:03:27.000000000 +0000
++++ ./arpa/nameser_compat.h    2011-03-28 10:57:33.000000000 +0000
+@@ -133,6 +133,14 @@
+       unsigned        arcount :16;    /*%< number of resource entries */
+ } HEADER;
++#ifdef _MINIX
++#define dh_id id
++#define dh_qdcount qdcount
++#define dh_ancount ancount
++#define dh_nscount nscount
++#define dh_arcount arcount
++#endif
++
+ #define PACKETSZ      NS_PACKETSZ
+ #define MAXDNAME      NS_MAXDNAME
+ #define MAXCDNAME     NS_MAXCDNAME
 diff -ru /home/netbsd/src/include/dirent.h ./dirent.h
 --- /home/netbsd/src/include/dirent.h  2010-09-26 03:01:02.000000000 +0000
-+++ ./dirent.h 2038-01-19 03:14:07.000000000 +0000
++++ ./dirent.h 2011-01-19 03:14:07.000000000 +0000
 @@ -43,16 +43,20 @@
   */
  #include <sys/dirent.h>
@@ -89,7 +125,7 @@ diff -ru /home/netbsd/src/include/dirent.h ./dirent.h
  struct _dirdesc {
 diff -ru /home/netbsd/src/include/fts.h ./fts.h
 --- /home/netbsd/src/include/fts.h     2009-08-19 20:23:46.000000000 +0000
-+++ ./fts.h    2038-01-19 03:14:07.000000000 +0000
++++ ./fts.h    2011-01-19 03:14:07.000000000 +0000
 @@ -75,7 +75,9 @@
  #define       FTS_PHYSICAL    0x010           /* physical walk */
  #define       FTS_SEEDOT      0x020           /* return dot and dot-dot */
@@ -102,7 +138,7 @@ diff -ru /home/netbsd/src/include/fts.h ./fts.h
  #define       FTS_NAMEONLY    0x100           /* (private) child names only */
 diff -ru /home/netbsd/src/include/limits.h ./limits.h
 --- /home/netbsd/src/include/limits.h  2010-06-08 03:01:32.000000000 +0000
-+++ ./limits.h 2038-01-19 03:14:07.000000000 +0000
++++ ./limits.h 2011-01-19 03:14:07.000000000 +0000
 @@ -113,4 +113,9 @@
  #include <machine/limits.h>
  #include <sys/syslimits.h>
@@ -113,9 +149,22 @@ diff -ru /home/netbsd/src/include/limits.h ./limits.h
 +#endif
 +
  #endif /* !_LIMITS_H_ */
+diff -ru /home/netbsd/src/include/netdb.h ./netdb.h
+--- /home/netbsd/src/include/netdb.h   2010-05-06 03:02:39.000000000 +0000
++++ ./netdb.h  2011-03-23 16:09:44.000000000 +0000
+@@ -131,6 +131,9 @@
+ #ifndef _PATH_SERVICES_DB
+ #define       _PATH_SERVICES_DB "/var/db/services.db"
+ #endif
++#ifdef __minix
++#define       _PATH_SERVACCES "/etc/serv.access"
++#endif
+ #endif
+ __BEGIN_DECLS
 diff -ru /home/netbsd/src/include/paths.h ./paths.h
 --- /home/netbsd/src/include/paths.h   2010-12-30 03:02:34.000000000 +0000
-+++ ./paths.h  2038-01-19 03:14:07.000000000 +0000
++++ ./paths.h  2011-01-19 03:14:07.000000000 +0000
 @@ -124,5 +124,9 @@
  #define       _PATH_VI        "/usr/bin/vi"
  #endif
@@ -126,9 +175,27 @@ diff -ru /home/netbsd/src/include/paths.h ./paths.h
 +
  #endif /* !_PATHS_H_ */
  
+diff -ru /home/netbsd/src/include/pwd.h ./pwd.h
+--- /home/netbsd/src/include/pwd.h     2009-01-11 03:05:43.000000000 +0000
++++ ./pwd.h    2011-03-22 11:35:06.000000000 +0000
+@@ -61,6 +61,14 @@
+  * SUCH DAMAGE.
+  */
++#if defined(__minix) && defined(_MINIX_COMPAT)
++#include <compat/pwd.h>
++/* Avoid inclusion of the rest of the header. */
++#ifndef _PWD_H_
++#define _PWD_H_
++#endif
++#endif /* __minix && _MINIX_COMPAT */
++
+ #ifndef _PWD_H_
+ #define       _PWD_H_
 diff -ru /home/netbsd/src/include/rpc/Makefile ./rpc/Makefile
 --- /home/netbsd/src/include/rpc/Makefile      2003-01-11 13:28:43.000000000 +0000
-+++ ./rpc/Makefile     2038-01-19 03:14:07.000000000 +0000
++++ ./rpc/Makefile     2011-01-19 03:14:07.000000000 +0000
 @@ -7,7 +7,11 @@
        svc.h svc_auth.h svc_soc.h types.h xdr.h
  RPC_INCS=     rpcb_prot.h
@@ -143,7 +210,7 @@ diff -ru /home/netbsd/src/include/rpc/Makefile ./rpc/Makefile
  .include <bsd.prog.mk>
 diff -ru /home/netbsd/src/include/sched.h ./sched.h
 --- /home/netbsd/src/include/sched.h   2009-01-11 03:05:43.000000000 +0000
-+++ ./sched.h  2038-01-19 03:14:07.000000000 +0000
++++ ./sched.h  2011-01-19 03:14:07.000000000 +0000
 @@ -29,6 +29,9 @@
   * POSSIBILITY OF SUCH DAMAGE.
   */
@@ -156,7 +223,7 @@ diff -ru /home/netbsd/src/include/sched.h ./sched.h
  
 diff -ru /home/netbsd/src/include/signal.h ./signal.h
 --- /home/netbsd/src/include/signal.h  2010-08-28 03:00:54.000000000 +0000
-+++ ./signal.h 2038-01-19 03:14:07.000000000 +0000
++++ ./signal.h 2011-01-19 03:14:07.000000000 +0000
 @@ -62,6 +62,7 @@
  int   __libc_sigaction14(int, const struct sigaction * __restrict,
            struct sigaction * __restrict);
@@ -222,7 +289,7 @@ diff -ru /home/netbsd/src/include/signal.h ./signal.h
  #endif /* _NETBSD_SOURCE */
 diff -ru /home/netbsd/src/include/stdio.h ./stdio.h
 --- /home/netbsd/src/include/stdio.h   2010-09-25 03:01:11.000000000 +0000
-+++ ./stdio.h  2038-01-19 03:14:07.000000000 +0000
++++ ./stdio.h  2011-01-19 03:14:07.000000000 +0000
 @@ -274,7 +274,7 @@
                __printflike(2, 0);
  #endif
@@ -234,7 +301,7 @@ diff -ru /home/netbsd/src/include/stdio.h ./stdio.h
  int    rename (const char *, const char *);
 diff -ru /home/netbsd/src/include/stdlib.h ./stdlib.h
 --- /home/netbsd/src/include/stdlib.h  2010-12-23 03:03:09.000000000 +0000
-+++ ./stdlib.h 2038-01-19 03:14:07.000000000 +0000
++++ ./stdlib.h 2011-01-19 03:14:07.000000000 +0000
 @@ -265,9 +265,11 @@
  void   csetexpandtc(int);
  
@@ -259,7 +326,7 @@ diff -ru /home/netbsd/src/include/stdlib.h ./stdlib.h
  int    getenv_r(const char *, char *, size_t);
 diff -ru /home/netbsd/src/include/time.h ./time.h
 --- /home/netbsd/src/include/time.h    2010-12-17 03:01:54.000000000 +0000
-+++ ./time.h   2038-01-19 03:14:07.000000000 +0000
++++ ./time.h   2011-01-19 03:14:07.000000000 +0000
 @@ -65,12 +65,18 @@
  #undef        _BSD_CLOCKID_T_
  #endif
@@ -333,7 +400,7 @@ diff -ru /home/netbsd/src/include/time.h ./time.h
  #endif /* !_TIME_H_ */
 diff -ru /home/netbsd/src/include/unistd.h ./unistd.h
 --- /home/netbsd/src/include/unistd.h  2011-01-20 03:02:09.000000000 +0000
-+++ ./unistd.h 2011-03-07 11:01:50.000000000 +0000
++++ ./unistd.h 2011-01-19 03:14:07.000000000 +0000
 @@ -88,7 +88,7 @@
  int    access(const char *, int);
  unsigned int alarm(unsigned int);
@@ -483,7 +550,7 @@ diff -ru /home/netbsd/src/include/unistd.h ./unistd.h
  #endif /* !_UNISTD_H_ */
 diff -ru /home/netbsd/src/include/utmp.h ./utmp.h
 --- /home/netbsd/src/include/utmp.h    2009-01-11 03:05:43.000000000 +0000
-+++ ./utmp.h   2038-01-19 03:14:07.000000000 +0000
++++ ./utmp.h   2011-01-19 03:14:07.000000000 +0000
 @@ -39,12 +39,26 @@
  #ifndef       _UTMP_H_
  #define       _UTMP_H_
index 24761fa3cabaf8e5f64e631a2558ce20a0aaa034..98a150d856659eb329fb76689fff008f2e9dec18 100644 (file)
@@ -131,6 +131,9 @@ typedef _BSD_SIZE_T_        size_t;
 #ifndef _PATH_SERVICES_DB
 #define        _PATH_SERVICES_DB "/var/db/services.db"
 #endif
+#ifdef __minix
+#define        _PATH_SERVACCES "/etc/serv.access"
+#endif
 #endif
 
 __BEGIN_DECLS
index 4a471f027488cb0eb2192acb396f0828bac63fa2..eec6b9cf024e30ca2a5e9137be3c61eda2e15f8d 100644 (file)
  * SUCH DAMAGE.
  */
 
+#if defined(__minix) && defined(_MINIX_COMPAT)
+#include <compat/pwd.h>
+/* Avoid inclusion of the rest of the header. */
+#ifndef _PWD_H_
+#define _PWD_H_
+#endif
+#endif /* __minix && _MINIX_COMPAT */
+
 #ifndef _PWD_H_
 #define        _PWD_H_
 
index 9340428564df699f8ef725a5a146f0f468ccca3d..9744b298829150f0dba1aae00261824610633cdf 100644 (file)
@@ -4,11 +4,13 @@
 #include <sys/featuretest.h>
 #include <sys/sigtypes.h>
 
-#define _NSIG          26
-
+#ifdef _SYSTEM
+#define _NSIG          31
+#else
+#define _NSIG          27
+#endif
 #if defined(_NETBSD_SOURCE)
 #define NSIG _NSIG
-
 #endif /* _NETBSD_SOURCE */
 
 
@@ -43,9 +45,6 @@
 #define SIGTTIN           22   /* background process wants to read */
 #define SIGTTOU           23   /* background process wants to write */
 
-#define _NSIG             26   /* highest signal number plus one */
-#define NSIG             _NSIG
-
 #ifdef _MINIX
 #define SIGIOT             SIGABRT /* for people who speak PDP-11 */
 
index 0f56f40ab06dd4ad02d8a1d541d7b38816989c03..92cd78517b3329ac239fc870f81cb3dcae190a22 100644 (file)
@@ -16,7 +16,7 @@
 #ifdef __MINIX_EMULATE_NETBSD_STAT
 #define __netbsd_stat stat
 #else
-#define __ext_stat stat
+#define __minix_stat stat
 #endif
 
 struct __minix_stat {
@@ -33,23 +33,6 @@ struct __minix_stat {
        time_t st_ctime;                /* time of last file status change */
 };
 
-struct __ext_stat {
-       dev_t st_dev;                   /* major/minor device number */
-       ino_t st_ino;                   /* i-node number */
-       mode_t st_mode;                 /* file mode, protection bits, etc. */
-       nlink_t st_nlink;               /* # links; */
-       uid_t st_uid;                   /* uid of the file's owner */ 
-       gid_t st_gid;                   /* gid */
-       dev_t st_rdev;
-       off_t st_size;                  /* file size */
-       time_t st_atime;                /* time of last access */
-       time_t st_mtime;                /* time of last data modification */
-       time_t st_ctime;                /* time of last file status change */
-
-       /* Extended values. */
-       blksize_t st_blksize;           /* optimal blocksize for I/O */
-};
-
 #if defined(_NETBSD_SOURCE)
 struct __netbsd_stat {
        dev_t st_dev;                   /* major/minor device number */
@@ -174,8 +157,8 @@ int mkfifo(const char *, mode_t);
 int    stat(const char *, struct stat *) __RENAME(__emu_netbsd_stat);
 int    fstat(int, struct stat *) __RENAME(__emu_netbsd_fstat);
 #else
-int    stat(const char *, struct stat *) __RENAME(__ext_minix_stat);
-int    fstat(int, struct stat *) __RENAME(__ext_minix_fstat);
+int    stat(const char *, struct stat *) __RENAME(__orig_minix_stat);
+int    fstat(int, struct stat *) __RENAME(__orig_minix_fstat);
 #endif
 mode_t umask(mode_t);
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
@@ -183,7 +166,7 @@ int fchmod(int, mode_t);
 #ifdef __MINIX_EMULATE_NETBSD_STAT
 int    lstat(const char *, struct stat *) __RENAME(__emu_netbsd_lstat);
 #else
-int    lstat(const char *, struct stat *) __RENAME(__ext_minix_lstat);
+int    lstat(const char *, struct stat *) __RENAME(__orig_minix_lstat);
 #endif
 int    mknod(const char *, mode_t, dev_t) __RENAME(__mknod50);
 #endif /* defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) */