mirror of
https://github.com/darlinghq/darling.git
synced 2024-12-18 01:48:31 +00:00
c43171e222
- rewritten trampoline support - various Mach/BSD call fixes - initial pthread function wrappers - configuration file support - and more
26 lines
237 B
Bash
Executable File
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*
|
|
|