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



details:   https://anonhg.NetBSD.org/src/rev/6284aee60a39
branches:  netbsd-2-0
changeset: 561517:6284aee60a39
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 22 07:20:18 2004 +0000

description:
Pull up revision 1.16 (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/string/strmode.c          |  6 ++++--
 usr.bin/m4/expr.c                  |  8 ++++++--
 usr.sbin/config/pack.c             |  6 +++++-
 usr.sbin/installboot/arch/i386.c   |  6 +++---
 usr.sbin/installboot/installboot.c |  8 ++++++--
 5 files changed, 24 insertions(+), 10 deletions(-)

diffs (128 lines):

diff -r 17a317d37c7d -r 6284aee60a39 lib/libc/string/strmode.c
--- a/lib/libc/string/strmode.c Tue Jun 22 07:19:55 2004 +0000
+++ b/lib/libc/string/strmode.c Tue Jun 22 07:20:18 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strmode.c,v 1.15 2003/08/07 16:43:51 agc Exp $ */
+/*     $NetBSD: strmode.c,v 1.15.2.1 2004/06/22 07:20:18 tron Exp $    */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)strmode.c  8.3 (Berkeley) 8/15/94";
 #else
-__RCSID("$NetBSD: strmode.c,v 1.15 2003/08/07 16:43:51 agc Exp $");
+__RCSID("$NetBSD: strmode.c,v 1.15.2.1 2004/06/22 07:20:18 tron Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -80,9 +80,11 @@
        case S_IFLNK:                   /* symbolic link */
                *p++ = 'l';
                break;
+#ifdef S_IFSOCK
        case S_IFSOCK:                  /* socket */
                *p++ = 's';
                break;
+#endif
 #ifdef S_IFIFO
        case S_IFIFO:                   /* fifo */
                *p++ = 'p';
diff -r 17a317d37c7d -r 6284aee60a39 usr.bin/m4/expr.c
--- a/usr.bin/m4/expr.c Tue Jun 22 07:19:55 2004 +0000
+++ b/usr.bin/m4/expr.c Tue Jun 22 07:20:18 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expr.c,v 1.15 2003/08/07 11:14:31 agc Exp $    */
+/*     $NetBSD: expr.c,v 1.15.2.1 2004/06/22 07:20:18 tron Exp $       */
 /*     $OpenBSD: expr.c,v 1.11 2000/01/11 14:00:57 espie Exp $ */
 
 /*
@@ -33,12 +33,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[] = "@(#)expr.c     8.2 (Berkeley) 4/29/95";
 #else
-__RCSID("$NetBSD: expr.c,v 1.15 2003/08/07 11:14:31 agc Exp $");
+__RCSID("$NetBSD: expr.c,v 1.15.2.1 2004/06/22 07:20:18 tron Exp $");
 #endif
 #endif /* not lint */
 
diff -r 17a317d37c7d -r 6284aee60a39 usr.sbin/config/pack.c
--- a/usr.sbin/config/pack.c    Tue Jun 22 07:19:55 2004 +0000
+++ b/usr.sbin/config/pack.c    Tue Jun 22 07:20:18 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pack.c,v 1.15 2003/11/24 21:44:37 christos Exp $       */
+/*     $NetBSD: pack.c,v 1.15.2.1 2004/06/22 07:20:18 tron Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -40,6 +40,10 @@
  *     from: @(#)pack.c        8.1 (Berkeley) 6/6/93
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/param.h>
 #include <stdlib.h>
 #include <string.h>
diff -r 17a317d37c7d -r 6284aee60a39 usr.sbin/installboot/arch/i386.c
--- a/usr.sbin/installboot/arch/i386.c  Tue Jun 22 07:19:55 2004 +0000
+++ b/usr.sbin/installboot/arch/i386.c  Tue Jun 22 07:20:18 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i386.c,v 1.15 2004/03/14 23:05:47 lukem Exp $ */
+/* $NetBSD: i386.c,v 1.15.2.1 2004/06/22 07:20:18 tron Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(__lint)
-__RCSID("$NetBSD: i386.c,v 1.15 2004/03/14 23:05:47 lukem Exp $");
+__RCSID("$NetBSD: i386.c,v 1.15.2.1 2004/06/22 07:20:18 tron Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
@@ -63,7 +63,7 @@
 {
        int             retval, i, bpbsize;
        uint8_t         *bootstrapbuf;
-       uint            bootstrapsize;
+       u_int           bootstrapsize;
        ssize_t         rv;
        uint32_t        magic;
        struct x86_boot_params  *bp;
diff -r 17a317d37c7d -r 6284aee60a39 usr.sbin/installboot/installboot.c
--- a/usr.sbin/installboot/installboot.c        Tue Jun 22 07:19:55 2004 +0000
+++ b/usr.sbin/installboot/installboot.c        Tue Jun 22 07:20:18 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: installboot.c,v 1.15 2004/03/13 22:51:50 dsl Exp $     */
+/*     $NetBSD: installboot.c,v 1.15.2.1 2004/06/22 07:20:19 tron Exp $        */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -36,9 +36,13 @@
  * 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: installboot.c,v 1.15 2004/03/13 22:51:50 dsl Exp $");
+__RCSID("$NetBSD: installboot.c,v 1.15.2.1 2004/06/22 07:20:19 tron Exp $");
 #endif /* !__lint */
 
 #include <sys/utsname.h>



Home | Main Index | Thread Index | Old Index