summaryrefslogtreecommitdiff
path: root/scripts/configheader.rc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/configheader.rc')
-rw-r--r--scripts/configheader.rc18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/configheader.rc b/scripts/configheader.rc
new file mode 100644
index 00000000..c1655f91
--- /dev/null
+++ b/scripts/configheader.rc
@@ -0,0 +1,18 @@
+#!/bin/rc
+
+flag e +
+
+fn checkstatus {}
+
+posix_defines=`{mktemp}
+checkstatus
+
+fn sigexit {
+ status=() rm $posix_defines
+}
+
+awk '{if($1 == "#define") print $2 ; if($2 == "#undef") print $3}' include/config-posix.h >$posix_defines
+defines=`{awk '{if($1 == "#undef") print $2}' $1 | grep -F -x -v -f $posix_defines}
+checkstatus
+
+printf '#undef %s\n' $defines