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



details:   https://anonhg.NetBSD.org/src/rev/c5055dab07ca
branches:  netbsd-2-0
changeset: 561506:c5055dab07ca
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 22 07:16:11 2004 +0000

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

 tools/compat/nbtool_config.h.in |  22 +++++++++++++++++++++-
 usr.bin/m4/gnum4.c              |   6 +++++-
 usr.bin/menuc/util.c            |   8 ++++++--
 usr.bin/xlint/common/emit.c     |   8 ++++++--
 4 files changed, 38 insertions(+), 6 deletions(-)

diffs (114 lines):

diff -r 26094da7d515 -r c5055dab07ca tools/compat/nbtool_config.h.in
--- a/tools/compat/nbtool_config.h.in   Tue Jun 22 07:15:49 2004 +0000
+++ b/tools/compat/nbtool_config.h.in   Tue Jun 22 07:16:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nbtool_config.h.in,v 1.2 2003/11/12 19:43:58 dbj Exp $ */
+/*     $NetBSD: nbtool_config.h.in,v 1.2.2.1 2004/06/22 07:16:11 tron Exp $    */
 
 #ifndef        __NETBSD_NBTOOL_CONFIG_H__
 #define        __NETBSD_NBTOOL_CONFIG_H__
@@ -11,6 +11,7 @@
 #undef HAVE_DIRENT_H
 #undef HAVE_ERR_H
 #undef HAVE_FEATURES_H
+#undef HAVE_GETOPT_H
 #undef HAVE_INTTYPES_H
 #undef HAVE_LIBGEN_H
 #undef HAVE_NDIR_H
@@ -34,8 +35,27 @@
 #undef HAVE_SOCKLEN_T
 #undef HAVE_LONG_LONG
 #undef HAVE_U_LONG
+#undef HAVE_U_CHAR
+#undef HAVE_U_INT
+#undef HAVE_U_SHORT
 #undef HAVE_U_QUAD_T
 
+#undef HAVE_BSWAP16
+#undef HAVE_BSWAP32
+#undef HAVE_BSWAP64
+#undef HAVE_HTOBE16
+#undef HAVE_HTOBE32
+#undef HAVE_HTOBE64
+#undef HAVE_HTOLE16
+#undef HAVE_HTOLE32
+#undef HAVE_HTOLE64
+#undef HAVE_BE16TOH
+#undef HAVE_BE32TOH
+#undef HAVE_BE64TOH
+#undef HAVE_LE16TOH
+#undef HAVE_LE32TOH
+#undef HAVE_LE64TOH
+
 #undef HAVE_DIR_DD_FD
 #undef HAVE_STRUCT_DIRENT_D_NAMLEN
 #undef HAVE_STRUCT_STAT_ST_FLAGS
diff -r 26094da7d515 -r c5055dab07ca usr.bin/m4/gnum4.c
--- a/usr.bin/m4/gnum4.c        Tue Jun 22 07:15:49 2004 +0000
+++ b/usr.bin/m4/gnum4.c        Tue Jun 22 07:16:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gnum4.c,v 1.2 2002/01/21 21:49:57 tv Exp $     */
+/*     $NetBSD: gnum4.c,v 1.2.4.1 2004/06/22 07:16:11 tron Exp $       */
 /* $OpenBSD: gnum4.c,v 1.15 2001/10/13 20:18:48 espie Exp $ */
 
 /*
@@ -26,6 +26,10 @@
  * SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 /* 
  * functions needed to support gnu-m4 extensions, including a fake freezing
  */
diff -r 26094da7d515 -r c5055dab07ca usr.bin/menuc/util.c
--- a/usr.bin/menuc/util.c      Tue Jun 22 07:15:49 2004 +0000
+++ b/usr.bin/menuc/util.c      Tue Jun 22 07:16:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.3 2003/07/17 08:33:44 lukem Exp $   */
+/*     $NetBSD: util.c,v 1.3.2.1 2004/06/22 07:16:11 tron Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -38,10 +38,14 @@
 
 /* util.c - utility routines. */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: util.c,v 1.3 2003/07/17 08:33:44 lukem Exp $");
+__RCSID("$NetBSD: util.c,v 1.3.2.1 2004/06/22 07:16:11 tron Exp $");
 #endif
 
 
diff -r 26094da7d515 -r c5055dab07ca usr.bin/xlint/common/emit.c
--- a/usr.bin/xlint/common/emit.c       Tue Jun 22 07:15:49 2004 +0000
+++ b/usr.bin/xlint/common/emit.c       Tue Jun 22 07:16:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emit.c,v 1.3 2002/01/31 19:36:53 tv Exp $      */
+/*     $NetBSD: emit.c,v 1.3.4.1 2004/06/22 07:16:11 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: emit.c,v 1.3 2002/01/31 19:36:53 tv Exp $");
+__RCSID("$NetBSD: emit.c,v 1.3.4.1 2004/06/22 07:16:11 tron Exp $");
 #endif
 
 #include <ctype.h>



Home | Main Index | Thread Index | Old Index