On Wed, Oct 31, 2001 at 04:45:58PM -0800, David O'Brien wrote: > Why don't we look at fixing the mkioctls script instead??
What about this patch? --- mkioctls.orig Wed Oct 31 17:08:33 2001 +++ mkioctls Wed Oct 31 17:13:07 2001 @@ -19,50 +19,48 @@ # Build a list of headers that have ioctls in them. # XXX should we use an ANSI cpp? # XXX netipx conflicts with netns (leave out netns). -ioctl_includes=` - cd $1 - find -s * -name '*.h' -follow | - egrep -v '^(netns)/' | - xargs egrep -l \ -'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | - sed -e 's/^/#include </' -e s'/$/>/' -` -echo "$ioctl_includes" | +cat <<'EOT' +/* XXX obnoxious prerequisites. */" +#define COMPAT_43 +#include <sys/param.h> +#include <sys/devicestat.h> +#include <sys/disklabel.h> +#include <sys/socket.h> +#include <sys/time.h> +#include <sys/tty.h> +#include <net/ethernet.h> +#include <net/if.h> +#include <net/if_var.h> +#include <net/route.h> +#include <netatm/atm.h> +#include <netatm/atm_if.h> +#include <netatm/atm_sap.h> +#include <netatm/atm_sys.h> +#include <netinet/in.h> +#include <netinet/ip_compat.h> +#include <netinet/ip_fil.h> +#include <netinet/ip_auth.h> +#include <netinet/ip_nat.h> +#include <netinet/ip_frag.h> +#include <netinet/ip_state.h> +#include <netinet/ip_mroute.h> +#include <netinet6/in6_var.h> +#include <netinet6/nd6.h> +#include <netinet6/ip6_mroute.h> +#include <stdio.h> +#include <cam/cam.h> +EOT + +cd $1 +find -s * -name '*.h' -follow | + egrep -v '^(netns)/' | + xargs egrep -l \ +'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | + sed -e 's/^/#include </' -e s'/$/>/' | gcc -E -I$1 -dM - | - awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" ' + awk -v use_switch="$use_switch" ' BEGIN { - print "/* XXX obnoxious prerequisites. */" - print "#define COMPAT_43" - print "#include <sys/param.h>" - print "#include <sys/devicestat.h>" - print "#include <sys/disklabel.h>" - print "#include <sys/socket.h>" - print "#include <sys/time.h>" - print "#include <sys/tty.h>" - print "#include <net/ethernet.h>" - print "#include <net/if.h>" - print "#include <net/if_var.h>" - print "#include <net/route.h>" - print "#include <netatm/atm.h>" - print "#include <netatm/atm_if.h>" - print "#include <netatm/atm_sap.h>" - print "#include <netatm/atm_sys.h>" - print "#include <netinet/in.h>" - print "#include <netinet/ip_compat.h>" - print "#include <netinet/ip_fil.h>" - print "#include <netinet/ip_auth.h>" - print "#include <netinet/ip_nat.h>" - print "#include <netinet/ip_frag.h>" - print "#include <netinet/ip_state.h>" - print "#include <netinet/ip_mroute.h>" - print "#include <netinet6/in6_var.h>" - print "#include <netinet6/nd6.h>" - print "#include <netinet6/ip6_mroute.h>" - print "#include <stdio.h>" - print "#include <cam/cam.h>" - print "" - print ioctl_includes print "" print "char *" print "ioctlname(register_t val)" -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ [EMAIL PROTECTED] _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message