From e18efcbd6a73dcdcf503339eaf930f5bfdca76e4 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 23 Jun 1996 17:05:10 +0000 Subject: [PATCH] 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 . 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. --- usr.bin/kdump/mkioctls | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.bin/kdump/mkioctls b/usr.bin/kdump/mkioctls index eab44e6821e9..61e173e08798 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 " + echo "#include " +) | cpp -I$DESTDIR/usr/include -dM | awk ' BEGIN { print "#include " print "#include " @@ -6,6 +10,8 @@ BEGIN { print "#include " print "#include " print "#include " + print "#include " + print "#include " print "#include " print "#define COMPAT_43" print "#include " @@ -31,4 +37,4 @@ END { print "\n\treturn(NULL);" print "}" } -' $DESTDIR/usr/include/sys/ioctl.h $DESTDIR/usr/include/sys/ioctl_compat.h +'