mkioctls (85794) | mkioctls (85796) |
---|---|
1set -e 2 | 1set -e 2 |
3# $FreeBSD: head/usr.bin/kdump/mkioctls 85794 2001-11-01 01:50:38Z obrien $ | 3# $FreeBSD: head/usr.bin/kdump/mkioctls 85796 2001-11-01 02:16:10Z obrien $ |
4 5if [ "x$1" = "x-s" ]; then 6 use_switch=1 7 shift 8else 9 use_switch=0 10fi 11 --- 8 unchanged lines hidden (view full) --- 20# XXX should we use an ANSI cpp? 21# XXX netipx conflicts with netns (leave out netns). 22ioctl_includes=` 23 cd $1 24 find -s * -name '*.h' -follow | 25 egrep -v '^(netns)/' | 26 xargs egrep -l \ 27'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | | 4 5if [ "x$1" = "x-s" ]; then 6 use_switch=1 7 shift 8else 9 use_switch=0 10fi 11 --- 8 unchanged lines hidden (view full) --- 20# XXX should we use an ANSI cpp? 21# XXX netipx conflicts with netns (leave out netns). 22ioctl_includes=` 23 cd $1 24 find -s * -name '*.h' -follow | 25 egrep -v '^(netns)/' | 26 xargs egrep -l \ 27'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | |
28 sed -e 's/^/#include </' -e s'/$/>/' | 28 awk '{printf("#include <%s>\\\\n", $1)}' |
29` 30 | 29` 30 |
31echo "$ioctl_includes" | | 31awk -v x="$ioctl_includes" 'BEGIN {print x}' | |
32 gcc -E -I$1 -dM - | | 32 gcc -E -I$1 -dM - | |
33 awk -v ioctl_includes="`echo $ioctl_includes`" -v use_switch="$use_switch" ' | 33 awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" ' |
34BEGIN { 35 print "/* XXX obnoxious prerequisites. */" 36 print "#define COMPAT_43" 37 print "#include <sys/param.h>" 38 print "#include <sys/devicestat.h>" 39 print "#include <sys/disklabel.h>" 40 print "#include <sys/socket.h>" 41 print "#include <sys/time.h>" --- 54 unchanged lines hidden --- | 34BEGIN { 35 print "/* XXX obnoxious prerequisites. */" 36 print "#define COMPAT_43" 37 print "#include <sys/param.h>" 38 print "#include <sys/devicestat.h>" 39 print "#include <sys/disklabel.h>" 40 print "#include <sys/socket.h>" 41 print "#include <sys/time.h>" --- 54 unchanged lines hidden --- |