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.6 (requested by jmc in ticket #527):
details: https://anonhg.NetBSD.org/src/rev/eb8099145cd0
branches: netbsd-2-0
changeset: 561512:eb8099145cd0
user: tron <tron%NetBSD.org@localhost>
date: Tue Jun 22 07:18:25 2004 +0000
description:
Pull up revision 1.6 (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:
include/getopt.h | 6 ++++--
usr.bin/menuc/avl.c | 8 ++++++--
usr.bin/xlint/common/inittyp.c | 8 ++++++--
usr.sbin/mtree/crc.c | 8 ++++++--
4 files changed, 22 insertions(+), 8 deletions(-)
diffs (104 lines):
diff -r b9259a9c50fd -r eb8099145cd0 include/getopt.h
--- a/include/getopt.h Tue Jun 22 07:18:03 2004 +0000
+++ b/include/getopt.h Tue Jun 22 07:18:25 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getopt.h,v 1.5 2003/04/28 23:16:13 bjh21 Exp $ */
+/* $NetBSD: getopt.h,v 1.5.2.1 2004/06/22 07:18:25 tron Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
/*
* Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
*/
-#if defined(_NETBSD_SOURCE)
+#if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H)
#define no_argument 0
#define required_argument 1
#define optional_argument 2
@@ -64,7 +64,9 @@
/* if flag not NULL, value to set *flag to; else return value */
int val;
};
+#endif
+#if defined(_NETBSD_SOURCE)
__BEGIN_DECLS
int getopt_long __P((int, char * const *, const char *,
const struct option *, int *));
diff -r b9259a9c50fd -r eb8099145cd0 usr.bin/menuc/avl.c
--- a/usr.bin/menuc/avl.c Tue Jun 22 07:18:03 2004 +0000
+++ b/usr.bin/menuc/avl.c Tue Jun 22 07:18:25 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: avl.c,v 1.5 2003/07/17 08:33:43 lukem Exp $ */
+/* $NetBSD: avl.c,v 1.5.2.1 2004/06/22 07:18:25 tron Exp $ */
/*
* Copyright (c) 1997 Philip A. Nelson.
@@ -46,10 +46,14 @@
* } id_rec;
*/
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: avl.c,v 1.5 2003/07/17 08:33:43 lukem Exp $");
+__RCSID("$NetBSD: avl.c,v 1.5.2.1 2004/06/22 07:18:25 tron Exp $");
#endif
diff -r b9259a9c50fd -r eb8099145cd0 usr.bin/xlint/common/inittyp.c
--- a/usr.bin/xlint/common/inittyp.c Tue Jun 22 07:18:03 2004 +0000
+++ b/usr.bin/xlint/common/inittyp.c Tue Jun 22 07:18:25 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inittyp.c,v 1.5 2003/05/29 18:12:17 christos Exp $ */
+/* $NetBSD: inittyp.c,v 1.5.2.1 2004/06/22 07:18:25 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: inittyp.c,v 1.5 2003/05/29 18:12:17 christos Exp $");
+__RCSID("$NetBSD: inittyp.c,v 1.5.2.1 2004/06/22 07:18:25 tron Exp $");
#endif
#include <ctype.h>
diff -r b9259a9c50fd -r eb8099145cd0 usr.sbin/mtree/crc.c
--- a/usr.sbin/mtree/crc.c Tue Jun 22 07:18:03 2004 +0000
+++ b/usr.sbin/mtree/crc.c Tue Jun 22 07:18:25 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crc.c,v 1.5 2003/08/07 11:25:35 agc Exp $ */
+/* $NetBSD: crc.c,v 1.5.2.1 2004/06/22 07:18:25 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.5 2003/08/07 11:25:35 agc Exp $");
+__RCSID("$NetBSD: crc.c,v 1.5.2.1 2004/06/22 07:18:25 tron Exp $");
#endif
#endif /* not lint */
Home |
Main Index |
Thread Index |
Old Index