From e2be6f64fab1c78f1dac6edd4df52edff722e441 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 17 Apr 2016 15:28:02 -0700 Subject: Add config-posix.h header and configheader.rc script to help with packages using config.h.in --- scripts/configheader.rc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/configheader.rc (limited to 'scripts') 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 -- cgit v1.2.3