Improve survived_gc_yet()
[sbcl.git] / tools-for-build / openbsd-sigcontext.sh
blob4281bef78190217b2f2c84fc239a5bdf57512387
1 cd ./tools-for-build
3 base=openbsd-sigcontext
5 # check for sf_fpstate in struct sigframe (ie: pre July 2010)
6 rm -f "${base}.c"
7 cat > "${base}.c" <<EOF
8 #include <stddef.h>
9 #include <stdio.h>
10 #include <machine/frame.h>
11 int
12 main()
14 printf("it works: %d\n", offsetof(struct sigframe, sf_fpstate));
15 return (0);
17 EOF
18 if $GNUMAKE "${base}" > /dev/null 2>&1 && "./${base}" > /dev/null 2>&1
19 then
20 echo '#define OS_OPENBSD_FPSTATE_IN_SIGFRAME'
23 # check for sc_fpstate in struct sigcontext (ie: July 2010 and later)
24 rm -f "${base}.c"
25 cat > "${base}.c" <<EOF
26 #include <stddef.h>
27 #include <stdio.h>
28 #include <signal.h>
29 int
30 main()
32 printf("it works: %d\n", offsetof(struct sigcontext, sc_fpstate));
33 return (0);
35 EOF
36 if $GNUMAKE "${base}" > /dev/null 2>&1 && "./${base}" > /dev/null 2>&1
37 then
38 echo '#define OS_OPENBSD_FPSTATE_IN_SIGCONTEXT'
41 rm -f "${base}.c" "${base}"