4 echo "usage: sztest [-H SYS-HEADER] [-L LOCAL-HEADER] TYPE [CCFLAGS...]" >&2
10 while [ "${1:0:1}" = "-" ]; do
15 sheaders="$sheaders $1"
19 lheaders="$lheaders $1"
26 file="$(mktemp /tmp/sztestXXXXXX)"
30 #include <sys/types.h>
34 for header in $sheaders; do
35 echo "#include <$header>" >>"$file.c"
37 for header in $lheaders; do
38 echo "#include \"$header\"" >>"$file.c"
41 int main(int argc, char **argv)
43 printf("%zi\n", sizeof($type));
48 if ! gcc "$@" -iquote. -g -Wall -o "$file" "$file.c"; then
49 rm -f "$file" "$file.c"