1996-06-23 19:05:10 +02:00
|
|
|
# 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 '
|
1994-05-27 14:33:43 +02:00
|
|
|
BEGIN {
|
|
|
|
print "#include <sys/param.h>"
|
1996-03-11 13:56:07 +01:00
|
|
|
print "#include <sys/queue.h>"
|
1994-05-27 14:33:43 +02:00
|
|
|
print "#include <sys/socket.h>"
|
|
|
|
print "#include <sys/socketvar.h>"
|
1996-12-10 18:11:53 +01:00
|
|
|
print "#include <sys/time.h>"
|
1994-05-27 14:33:43 +02:00
|
|
|
print "#include <net/route.h>"
|
|
|
|
print "#include <net/if.h>"
|
1996-06-23 19:05:10 +02:00
|
|
|
print "#include <netinet/in.h>"
|
|
|
|
print "#include <netinet/ip_mroute.h>"
|
1994-05-27 14:33:43 +02:00
|
|
|
print "#include <sys/termios.h>"
|
|
|
|
print "#define COMPAT_43"
|
|
|
|
print "#include <sys/ioctl.h>"
|
|
|
|
print ""
|
|
|
|
print "char *"
|
|
|
|
print "ioctlname(val)"
|
|
|
|
print "{"
|
|
|
|
print ""
|
|
|
|
}
|
|
|
|
|
|
|
|
/^#[ ]*define[ ]*(TIO|FIO|SIO|OSIO)[A-Z]*[ ]*_IO/ {
|
|
|
|
|
|
|
|
# find where the name starts
|
|
|
|
for (i = 1; i <= NF; i++)
|
|
|
|
if ($i ~ /define/)
|
|
|
|
break;
|
|
|
|
++i;
|
|
|
|
#
|
|
|
|
printf("\tif (val == %s)\n\t\treturn(\"%s\");\n", $i, $i);
|
|
|
|
|
|
|
|
}
|
|
|
|
END {
|
|
|
|
print "\n\treturn(NULL);"
|
|
|
|
print "}"
|
|
|
|
}
|
1996-06-23 19:05:10 +02:00
|
|
|
'
|