Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src Pull up revision 1.29 (requested by jmc in ticket #527):



details:   https://anonhg.NetBSD.org/src/rev/93346226a72d
branches:  netbsd-2-0
changeset: 561539:93346226a72d
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 22 07:28:35 2004 +0000

description:
Pull up revision 1.29 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944

diffstat:

 lib/libc/gen/pwcache.c       |   6 +++---
 usr.sbin/makefs/ffs.c        |  11 +++++++++--
 usr.sbin/pwd_mkdb/pwd_mkdb.c |  16 ++++++++--------
 3 files changed, 20 insertions(+), 13 deletions(-)

diffs (97 lines):

diff -r 9958e35a0465 -r 93346226a72d lib/libc/gen/pwcache.c
--- a/lib/libc/gen/pwcache.c    Tue Jun 22 07:28:12 2004 +0000
+++ b/lib/libc/gen/pwcache.c    Tue Jun 22 07:28:35 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pwcache.c,v 1.25 2003/10/13 07:41:22 agc Exp $ */
+/*     $NetBSD: pwcache.c,v 1.25.2.1 2004/06/22 07:28:35 tron Exp $    */
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -71,7 +71,7 @@
 #if 0
 static char sccsid[] = "@(#)cache.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pwcache.c,v 1.25 2003/10/13 07:41:22 agc Exp $");
+__RCSID("$NetBSD: pwcache.c,v 1.25.2.1 2004/06/22 07:28:35 tron Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -95,7 +95,7 @@
 __weak_alias(pwcache_groupdb,_pwcache_groupdb)
 #endif
 
-#if !HAVE_PWCACHE_USERDB
+#if !HAVE_PWCACHE_USERDB || HAVE_NBTOOL_CONFIG_H
 #include "pwcache.h"
 
 /*
diff -r 9958e35a0465 -r 93346226a72d usr.sbin/makefs/ffs.c
--- a/usr.sbin/makefs/ffs.c     Tue Jun 22 07:28:12 2004 +0000
+++ b/usr.sbin/makefs/ffs.c     Tue Jun 22 07:28:35 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs.c,v 1.25.2.1 2004/04/28 06:00:41 jmc Exp $ */
+/*     $NetBSD: ffs.c,v 1.25.2.2 2004/06/22 07:28:36 tron Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -65,13 +65,20 @@
  *     @(#)ffs_alloc.c 8.19 (Berkeley) 7/13/95
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.25.2.1 2004/04/28 06:00:41 jmc Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.25.2.2 2004/06/22 07:28:36 tron Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
+
+#if !HAVE_NBTOOL_CONFIG_H
 #include <sys/mount.h>
+#endif
 
 #include <assert.h>
 #include <errno.h>
diff -r 9958e35a0465 -r 93346226a72d usr.sbin/pwd_mkdb/pwd_mkdb.c
--- a/usr.sbin/pwd_mkdb/pwd_mkdb.c      Tue Jun 22 07:28:12 2004 +0000
+++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c      Tue Jun 22 07:28:35 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pwd_mkdb.c,v 1.28 2003/10/27 00:12:44 lukem Exp $      */
+/*     $NetBSD: pwd_mkdb.c,v 1.28.2.1 2004/06/22 07:28:36 tron Exp $   */
 
 /*
  * Copyright (c) 1991, 1993, 1994
@@ -65,9 +65,15 @@
 Copyright (c) 1991, 1993, 1994\n\
        The Regents of the University of California.  All rights reserved.\n");
 __SCCSID("from: @(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94");
-__RCSID("$NetBSD: pwd_mkdb.c,v 1.28 2003/10/27 00:12:44 lukem Exp $");
+__RCSID("$NetBSD: pwd_mkdb.c,v 1.28.2.1 2004/06/22 07:28:36 tron Exp $");
 #endif /* not lint */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "compat_pwd.h"
+#else
+#include <pwd.h>
+#endif
+
 #include <sys/param.h>
 #include <sys/stat.h>
 
@@ -83,12 +89,6 @@
 #include <unistd.h>
 #include <util.h>
 
-#if HAVE_NBTOOL_CONFIG_H
-#include "compat_pwd.h"
-#else
-#include <pwd.h>
-#endif
-
 #define        MAX_CACHESIZE   8*1024*1024
 #define        MIN_CACHESIZE   2*1024*1024
 



Home | Main Index | Thread Index | Old Index