Debian Codegraph @

debian/test_float_t.sh

raw symbols SCIP
1 #!/bin/sh
2
3 # float_t is not an abi type thus convert it to ABI type float, double or double_t at build time
4 # this is used for symbols file
5 set -e
6 dir="$(mktemp -d)"
7 trap 'rm -rf -- "$dir"' EXIT
8 cat > $dir/float.c <<"EOF"
9 #include <math.h>
10 #include <stdio.h>
11
12 int main()
13 {
14 switch(sizeof(float_t)) {
15 case(sizeof(float)):
16 printf("float");
17 return 0;
18 case(sizeof(double)):
19 printf("double");
20 return 0;
21 case(sizeof(long double)):
22 printf("long double");
23 return 0;
24 default:
25 printf("????");
26 return 1;
27 }
28 }
29 EOF
30
31
32 gcc -o $dir/float -lm $dir/float.c
33 $dir/float
34