Revert "Export fenv
functions on all platforms (#213)"
#219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The implementation of
fesetenv
cannot be portable, as the value ofFE_DFL_ENV
differs between platforms. On FreeBSD, it is a actualenvironment. With glibc however, it's a sentinel -1 handled in the
implementation of its floating point functions.
https://github.com/freebsd/freebsd/blob/a41d904f70e8e9e3c3062952b52f0845af0af738/lib/msun/x86/fenv.h#L97-L99
https://github.com/bminor/glibc/blob/acdcca72940e060270e4e54d9c0457398110f409/sysdeps/x86/fpu/bits/fenv.h#L96-L97
With openlibm based on FreeBSD's libm, it assumes
FE_DFL_ENV
to be anactual environment. That assumption breaks using code that was compiled
against glibc, e.g.,
libcuda
:This reverts commit 5a27b4c.
Fixes JuliaLang/julia#38427.