darling/tools/valueof.sh
Lubos Dolezel c43171e222 Tons of work from last days:
- rewritten trampoline support
- various Mach/BSD call fixes
- initial pthread function wrappers
- configuration file support
- and more
2012-08-29 16:25:43 +02:00

26 lines
237 B
Bash
Executable File

#!/bin/sh
set -e
cfile=/tmp/valueof.$$.c
include="$1"
var="$2"
cat > $cfile <<END
#include <stdio.h>
#include <$include>
int main()
{
printf("$var=%d\n", $var);
return 0;
}
END
gcc -w $cfile -o $cfile.bin
$cfile.bin
rm $cfile*