aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2004-02-20 11:55:14 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2004-02-20 11:55:14 +0000
commitf3b62198578f50112630652a18ae6c6f7081f7b7 (patch)
treeca91d96f35dfb3255f54393f0e8f190068fb019f
parent7d72cc5625961c9de70d94afe514c4c94052575b (diff)
downloadsrc-f3b62198578f50112630652a18ae6c6f7081f7b7.tar.gz
src-f3b62198578f50112630652a18ae6c6f7081f7b7.zip
Notes
-rw-r--r--lib/libc/stdlib/getopt_long.c2
-rw-r--r--tools/build/Makefile12
-rw-r--r--tools/build/regex.h4
3 files changed, 16 insertions, 2 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c
index 474290f89c46..ef1d8e9ffb8c 100644
--- a/lib/libc/stdlib/getopt_long.c
+++ b/lib/libc/stdlib/getopt_long.c
@@ -42,8 +42,6 @@
__RCSID("$NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $");
#endif /* LIBC_SCCS and not lint */
-#include "namespace.h"
-
#include <assert.h>
#include <err.h>
#include <errno.h>
diff --git a/tools/build/Makefile b/tools/build/Makefile
index fee9e4068905..fa5bae22b647 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -51,6 +51,18 @@ SRCS+= progname.c
SRCS+= strtofflags.c
.endif
+# Lot of tools need <getopt.h> and getopt_long(3).
+.if !exists(/usr/include/getopt.h)
+INCS+= getopt.h
+.PATH: ${.CURDIR}/../../lib/libc/stdlib
+SRCS+= getopt_long.c
+.endif
+
+# Some tools depend on a new <regex.h> not requiring <sys/types.h>.
+.if ${BOOTSTRAPPING} < 500042
+INCS+= regex.h
+.endif
+
.if empty(SRCS)
SRCS= dummy.c
.endif
diff --git a/tools/build/regex.h b/tools/build/regex.h
new file mode 100644
index 000000000000..3de60765855b
--- /dev/null
+++ b/tools/build/regex.h
@@ -0,0 +1,4 @@
+/* $FreeBSD$ */
+
+#include <sys/types.h>
+#include "/usr/include/regex.h"