summary refs log tree commit diff
path: root/sysdeps/unix/ioctls.awk
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/ioctls.awk')
-rw-r--r--sysdeps/unix/ioctls.awk10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/unix/ioctls.awk b/sysdeps/unix/ioctls.awk
new file mode 100644
index 0000000000..b05140af7a
--- /dev/null
+++ b/sysdeps/unix/ioctls.awk
@@ -0,0 +1,10 @@
+BEGIN { special = 0 }
+
+/REQUESTS/ { nreqs = split(requests, reqs)
+	     for (i = 1; i <= nreqs; ++i)
+	       printf "#ifdef\t%s\n  DEFINE(\"%s\", %s);\n#endif\n", \
+		      reqs[i], reqs[i], reqs[i]
+	     special = 1 }
+
+
+{ if (special == 0) print $0; special = 0 }