Source-Changes-HG archive

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

[src/netbsd-2-0]: src/usr.sbin/installboot Pull up revision 1.3 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/23dcf3414bac
branches:  netbsd-2-0
changeset: 561503:23dcf3414bac
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 22 07:15:04 2004 +0000

description:
Pull up revision 1.3 (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.sbin/installboot/arch/amiga.c   |  8 ++++++--
 usr.sbin/installboot/arch/next68k.c |  8 ++++----
 usr.sbin/installboot/sum.c          |  8 ++++++--
 3 files changed, 16 insertions(+), 8 deletions(-)

diffs (84 lines):

diff -r 0df65002eda0 -r 23dcf3414bac usr.sbin/installboot/arch/amiga.c
--- a/usr.sbin/installboot/arch/amiga.c Tue Jun 22 07:04:44 2004 +0000
+++ b/usr.sbin/installboot/arch/amiga.c Tue Jun 22 07:15:04 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amiga.c,v 1.2 2003/04/15 14:22:14 dsl Exp $    */
+/*     $NetBSD: amiga.c,v 1.2.2.1 2004/06/22 07:15:04 tron Exp $       */
 
 /*-
  * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -39,9 +39,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: amiga.c,v 1.2 2003/04/15 14:22:14 dsl Exp $");
+__RCSID("$NetBSD: amiga.c,v 1.2.2.1 2004/06/22 07:15:04 tron Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
diff -r 0df65002eda0 -r 23dcf3414bac usr.sbin/installboot/arch/next68k.c
--- a/usr.sbin/installboot/arch/next68k.c       Tue Jun 22 07:04:44 2004 +0000
+++ b/usr.sbin/installboot/arch/next68k.c       Tue Jun 22 07:15:04 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: next68k.c,v 1.2 2003/10/27 22:38:39 lukem Exp $ */
+/* $NetBSD: next68k.c,v 1.2.2.1 2004/06/22 07:15:04 tron Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(__lint)
-__RCSID("$NetBSD: next68k.c,v 1.2 2003/10/27 22:38:39 lukem Exp $");
+__RCSID("$NetBSD: next68k.c,v 1.2.2.1 2004/06/22 07:15:04 tron Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
@@ -67,7 +67,7 @@
 {
        const uint16_t *buf = vbuf;
        const uint16_t *limit = vlimit;
-       uint sum = 0;
+       u_int sum = 0;
 
        while (buf < limit) {
                sum += be16toh(*buf++);
@@ -81,7 +81,7 @@
 {
        int retval, labelupdated;
        uint8_t *bootbuf;
-       uint bootsize;
+       u_int bootsize;
        ssize_t rv;
        uint32_t cd_secsize;
        int sec_netonb_mult;
diff -r 0df65002eda0 -r 23dcf3414bac usr.sbin/installboot/sum.c
--- a/usr.sbin/installboot/sum.c        Tue Jun 22 07:04:44 2004 +0000
+++ b/usr.sbin/installboot/sum.c        Tue Jun 22 07:15:04 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sum.c,v 1.2 2002/04/19 07:08:53 lukem Exp $    */
+/*     $NetBSD: sum.c,v 1.2.4.1 2004/06/22 07:15:04 tron Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -66,9 +66,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: sum.c,v 1.2 2002/04/19 07:08:53 lukem Exp $");
+__RCSID("$NetBSD: sum.c,v 1.2.4.1 2004/06/22 07:15:04 tron Exp $");
 #endif /* !__lint */
 
 #include <sys/types.h>



Home | Main Index | Thread Index | Old Index