about summary refs log tree commit diff
path: root/sysdeps/unix/errnos.awk
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-02-18 01:27:10 +0000
committerRoland McGrath <roland@gnu.org>1995-02-18 01:27:10 +0000
commit28f540f45bbacd939bfd07f213bcad2bf730b1bf (patch)
tree15f07c4c43d635959c6afee96bde71fb1b3614ee /sysdeps/unix/errnos.awk
downloadglibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.gz
glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.xz
glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.zip
initial import
Diffstat (limited to 'sysdeps/unix/errnos.awk')
-rw-r--r--sysdeps/unix/errnos.awk12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/unix/errnos.awk b/sysdeps/unix/errnos.awk
new file mode 100644
index 0000000000..8648f41fb2
--- /dev/null
+++ b/sysdeps/unix/errnos.awk
@@ -0,0 +1,12 @@
+BEGIN { special = 0 }
+
+/ERRNOS/ { nerrnos = split(errnos, errs)
+	     for (i = 1; i <= nerrnos; ++i)
+	       # Some systems define errno codes inside undefined #ifdefs,
+	       # and then never actually use them.
+	       printf "#ifdef %s\n  DO(\"%s\", %s);\n#endif\n", \
+		 errs[i], errs[i], errs[i]
+	     special = 1 }
+
+
+{ if (special == 0) print $0; special = 0 }