summaryrefslogtreecommitdiffstats
path: root/usr.bin/kdump
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-06-23 17:05:10 +0000
committerbde <bde@FreeBSD.org>1996-06-23 17:05:10 +0000
commitbbeb8f494321d45fada5f358fb2d0189bde65491 (patch)
treeacaa7e269f87f13ca634cbfe572c58cce1e02673 /usr.bin/kdump
parent0f3adf64a08e9a3b8caaf56647818e7411adba83 (diff)
downloadFreeBSD-src-bbeb8f494321d45fada5f358fb2d0189bde65491.zip
FreeBSD-src-bbeb8f494321d45fada5f358fb2d0189bde65491.tar.gz
Run the headers through cpp -dM to find the #defines. The direct search
has been broken at least since 4.4Lite moved most of the #defines out of <sys/ioctl.h>. This should be done better. Only a few headers are searched. Added some #includes so that ioctl.c compiles. The networking headers have a maze of undocumented interdependencies and ioctl.c now actually supports networking ioctls.
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r--usr.bin/kdump/mkioctls10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/kdump/mkioctls b/usr.bin/kdump/mkioctls
index eab44e6..61e173e 100644
--- a/usr.bin/kdump/mkioctls
+++ b/usr.bin/kdump/mkioctls
@@ -1,4 +1,8 @@
-awk '
+# XXX should we use an ANSI cpp?
+# XXX does -I$DESTDIR/usr/include actually work?
+(echo "#include <sys/ioctl.h>"
+ echo "#include <sys/ioctl_compat.h>"
+) | cpp -I$DESTDIR/usr/include -dM | awk '
BEGIN {
print "#include <sys/param.h>"
print "#include <sys/queue.h>"
@@ -6,6 +10,8 @@ BEGIN {
print "#include <sys/socketvar.h>"
print "#include <net/route.h>"
print "#include <net/if.h>"
+ print "#include <netinet/in.h>"
+ print "#include <netinet/ip_mroute.h>"
print "#include <sys/termios.h>"
print "#define COMPAT_43"
print "#include <sys/ioctl.h>"
@@ -31,4 +37,4 @@ END {
print "\n\treturn(NULL);"
print "}"
}
-' $DESTDIR/usr/include/sys/ioctl.h $DESTDIR/usr/include/sys/ioctl_compat.h
+'
OpenPOWER on IntegriCloud