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.15 (requested by jmc in ticket #527):



details:   https://anonhg.NetBSD.org/src/rev/17a317d37c7d
branches:  netbsd-2-0
changeset: 561516:17a317d37c7d
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 22 07:19:55 2004 +0000

description:
Pull up revision 1.15 (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:

 usr.bin/cksum/crc.c         |   8 ++++++--
 usr.bin/xlint/lint1/main1.c |   8 ++++++--
 usr.bin/yacc/main.c         |   8 ++++++--
 usr.sbin/installboot/ffs.c  |  11 +++++++++--
 4 files changed, 27 insertions(+), 8 deletions(-)

diffs (111 lines):

diff -r ddc7190a987f -r 17a317d37c7d usr.bin/cksum/crc.c
--- a/usr.bin/cksum/crc.c       Tue Jun 22 07:19:32 2004 +0000
+++ b/usr.bin/cksum/crc.c       Tue Jun 22 07:19:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crc.c,v 1.14 2003/12/20 23:41:38 kleink Exp $  */
+/*     $NetBSD: crc.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -32,12 +32,16 @@
  * SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
 #if 0
 static char sccsid[] = "@(#)crc.c      8.1 (Berkeley) 6/17/93";
 #else
-__RCSID("$NetBSD: crc.c,v 1.14 2003/12/20 23:41:38 kleink Exp $");
+__RCSID("$NetBSD: crc.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $");
 #endif
 #endif /* not lint */
 
diff -r ddc7190a987f -r 17a317d37c7d usr.bin/xlint/lint1/main1.c
--- a/usr.bin/xlint/lint1/main1.c       Tue Jun 22 07:19:32 2004 +0000
+++ b/usr.bin/xlint/lint1/main1.c       Tue Jun 22 07:19:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main1.c,v 1.14 2003/04/18 03:21:02 lukem Exp $ */
+/*     $NetBSD: main1.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $      */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -31,9 +31,13 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: main1.c,v 1.14 2003/04/18 03:21:02 lukem Exp $");
+__RCSID("$NetBSD: main1.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $");
 #endif
 
 #include <sys/types.h>
diff -r ddc7190a987f -r 17a317d37c7d usr.bin/yacc/main.c
--- a/usr.bin/yacc/main.c       Tue Jun 22 07:19:32 2004 +0000
+++ b/usr.bin/yacc/main.c       Tue Jun 22 07:19:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.14 2003/08/07 11:17:53 agc Exp $    */
+/*     $NetBSD: main.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $       */
 
 /*
  * Copyright (c) 1989 The Regents of the University of California.
@@ -32,6 +32,10 @@
  * SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #if defined(__COPYRIGHT) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1989 The Regents of the University of California.\n"
@@ -42,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     5.5 (Berkeley) 5/24/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.14 2003/08/07 11:17:53 agc Exp $");
+__RCSID("$NetBSD: main.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $");
 #endif
 #endif /* not lint */
 
diff -r ddc7190a987f -r 17a317d37c7d usr.sbin/installboot/ffs.c
--- a/usr.sbin/installboot/ffs.c        Tue Jun 22 07:19:32 2004 +0000
+++ b/usr.sbin/installboot/ffs.c        Tue Jun 22 07:19:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs.c,v 1.14 2004/03/21 21:18:40 dsl Exp $     */
+/*     $NetBSD: ffs.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $        */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -36,13 +36,20 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#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.14 2004/03/21 21:18:40 dsl Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.14.2.1 2004/06/22 07:19:55 tron Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
+
+#if !HAVE_NBTOOL_CONFIG_H
 #include <sys/mount.h>
+#endif
 
 #include <assert.h>
 #include <err.h>



Home | Main Index | Thread Index | Old Index