mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 04:23:41 +01:00
be31bff11d
The implementation of `fesetenv` cannot be portable, as the value of
`FE_DFL_ENV` differs between platforms. On FreeBSD, it is a actual
environment. With glibc however, it's a sentinel -1 handled in the
implementation of its floating point functions.
With openlibm based on FreeBSD's libm, it assumes `FE_DFL_ENV` to be an
actual environment. That assumption breaks using code that was compiled
against glibc, e.g., `libcuda`:
```
Thread 1 "julia-debug" received signal SIGSEGV, Segmentation fault.
0x00007ffff7b855d0 in fesetenv () from /home/tim/Julia/julia/build/release/usr/bin/../lib/libopenlibm.so
(gdb) bt
```
This reverts commit
|
||
---|---|---|
.. | ||
bsd_asm.h | ||
bsd_fpu.h | ||
bsd_ieeefp.h | ||
e_remainder.S | ||
e_remainderf.S | ||
e_remainderl.S | ||
e_sqrt.S | ||
e_sqrtf.S | ||
e_sqrtl.S | ||
fenv.c | ||
Make.files | ||
s_llrint.S | ||
s_llrintf.S | ||
s_llrintl.S | ||
s_logbl.S | ||
s_lrint.S | ||
s_lrintf.S | ||
s_lrintl.S | ||
s_remquo.S | ||
s_remquof.S | ||
s_remquol.S | ||
s_rintl.S | ||
s_scalbn.S | ||
s_scalbnf.S | ||
s_scalbnl.S |