Source-Changes-HG archive

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

[src/netbsd-2-0]: src/tools/compat Pull up revision 1.1 (requested by jmc in ...



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

description:
Pull up revision 1.1 (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/compat_getopt.h |  13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 23f10b54d012 -r abad9f11a3e2 tools/compat/compat_getopt.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/compat/compat_getopt.h      Tue Jun 22 07:31:16 2004 +0000
@@ -0,0 +1,13 @@
+/*      $NetBSD: compat_getopt.h,v 1.1.2.2 2004/06/22 07:31:16 tron Exp $ */
+
+/* We unconditionally use the NetBSD getopt.h in libnbcompat. */
+
+#if HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
+#define option __nbcompat_option
+#ifdef _GETOPT_H_
+#undef _GETOPT_H_
+#endif
+#include "../../include/getopt.h"



Home | Main Index | Thread Index | Old Index