diff options
| author | Michael Forney <mforney@mforney.org> | 2016-04-17 15:28:02 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-04-17 15:28:02 -0700 |
| commit | e2be6f64fab1c78f1dac6edd4df52edff722e441 (patch) | |
| tree | e5890b2842d9e7c4cd26a9f56fdc14be8ec9425e /scripts | |
| parent | 4e8f478342d8b3929a7b89027614b56d6e18ac7a (diff) | |
Add config-posix.h header and configheader.rc script to help with packages using config.h.in
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/configheader.rc | 18 |
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 |
