#! /bin/sh # # This script find out which sysinclude path is compiled into gcc # if [ "x$GCC" == "x" ]; then echo "usage: GCC= $0"; exit 1; fi cat << EOF | $GCC -E - | \ awk '{if (($2 =="1") && index($3,"/stddef.h")) { gsub("/stddef.h",""); print $3}}' #include int main (void) { return 0; } EOF