1994-05-27 12:33:43 +00:00
|
|
|
awk '
|
|
|
|
BEGIN {
|
|
|
|
print "#include <sys/param.h>"
|
1996-03-11 12:56:07 +00:00
|
|
|
print "#include <sys/queue.h>"
|
1994-05-27 12:33:43 +00:00
|
|
|
print "#include <sys/socket.h>"
|
|
|
|
print "#include <sys/socketvar.h>"
|
|
|
|
print "#include <net/route.h>"
|
|
|
|
print "#include <net/if.h>"
|
|
|
|
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 "}"
|
|
|
|
}
|
1994-09-15 05:47:41 +00:00
|
|
|
' $DESTDIR/usr/include/sys/ioctl.h $DESTDIR/usr/include/sys/ioctl_compat.h
|