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



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

description:
Pull up revision 1.5 (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/stdio/fparseln.c |  6 +++---
 usr.bin/cksum/md5.c       |  8 ++++++--
 usr.bin/m4/trace.c        |  6 +++++-
 usr.sbin/config/mkdevsw.c |  6 +++++-
 usr.sbin/mtree/getid.c    |  6 +++++-
 5 files changed, 24 insertions(+), 8 deletions(-)

diffs (111 lines):

diff -r 50d72621b6e3 -r 2e3cb9d011cd lib/libc/stdio/fparseln.c
--- a/lib/libc/stdio/fparseln.c Tue Jun 22 07:17:18 2004 +0000
+++ b/lib/libc/stdio/fparseln.c Tue Jun 22 07:17:40 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fparseln.c,v 1.2.2.2 2004/06/22 07:04:44 tron Exp $    */
+/*     $NetBSD: fparseln.c,v 1.2.2.3 2004/06/22 07:17:40 tron Exp $    */
 
 /*
  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fparseln.c,v 1.2.2.2 2004/06/22 07:04:44 tron Exp $");
+__RCSID("$NetBSD: fparseln.c,v 1.2.2.3 2004/06/22 07:17:40 tron Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -56,7 +56,7 @@
 #define FUNLOCKFILE(fp)
 #endif
 
-#ifdef _REENTRANT
+#if defined(_REENTRANT) && !HAVE_NBTOOL_CONFIG_H
 #define __fgetln(f, l) __fgetstr(f, l, '\n')
 #else
 #define __fgetln(f, l) fgetln(f, l)
diff -r 50d72621b6e3 -r 2e3cb9d011cd usr.bin/cksum/md5.c
--- a/usr.bin/cksum/md5.c       Tue Jun 22 07:17:18 2004 +0000
+++ b/usr.bin/cksum/md5.c       Tue Jun 22 07:17:40 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md5.c,v 1.4 2002/03/31 14:43:22 bjh21 Exp $    */
+/*     $NetBSD: md5.c,v 1.4.4.1 2004/06/22 07:17:40 tron Exp $ */
 
 /*
  * MDDRIVER.C - test driver for MD2, MD4 and MD5
@@ -17,9 +17,13 @@
  *  documentation and/or software.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: md5.c,v 1.4 2002/03/31 14:43:22 bjh21 Exp $");
+__RCSID("$NetBSD: md5.c,v 1.4.4.1 2004/06/22 07:17:40 tron Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
diff -r 50d72621b6e3 -r 2e3cb9d011cd usr.bin/m4/trace.c
--- a/usr.bin/m4/trace.c        Tue Jun 22 07:17:18 2004 +0000
+++ b/usr.bin/m4/trace.c        Tue Jun 22 07:17:40 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trace.c,v 1.4 2002/01/21 21:49:58 tv Exp $     */
+/*     $NetBSD: trace.c,v 1.4.4.1 2004/06/22 07:17:40 tron Exp $       */
 /* $OpenBSD: trace.c,v 1.3 2001/09/29 15:47:18 espie Exp $ */
 
 /*
@@ -26,6 +26,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/types.h>
 #include <stddef.h>
 #include <stdio.h>
diff -r 50d72621b6e3 -r 2e3cb9d011cd usr.sbin/config/mkdevsw.c
--- a/usr.sbin/config/mkdevsw.c Tue Jun 22 07:17:18 2004 +0000
+++ b/usr.sbin/config/mkdevsw.c Tue Jun 22 07:17:40 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkdevsw.c,v 1.4 2003/05/17 18:53:01 itojun Exp $       */
+/*     $NetBSD: mkdevsw.c,v 1.4.2.1 2004/06/22 07:17:40 tron Exp $     */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -36,6 +36,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
diff -r 50d72621b6e3 -r 2e3cb9d011cd usr.sbin/mtree/getid.c
--- a/usr.sbin/mtree/getid.c    Tue Jun 22 07:17:18 2004 +0000
+++ b/usr.sbin/mtree/getid.c    Tue Jun 22 07:17:40 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getid.c,v 1.4 2003/08/07 11:25:35 agc Exp $    */
+/*     $NetBSD: getid.c,v 1.4.2.1 2004/06/22 07:17:40 tron Exp $       */
 /*     from: NetBSD: getpwent.c,v 1.48 2000/10/03 03:22:26 enami Exp */
 /*     from: NetBSD: getgrent.c,v 1.41 2002/01/12 23:51:30 lukem Exp */
 
@@ -67,6 +67,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/param.h>
 
 #include <grp.h>



Home | Main Index | Thread Index | Old Index