Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work around missing math functions on bsd platforms #503

Merged
merged 1 commit into from
Jan 27, 2017

Conversation

fdopen
Copy link
Contributor

@fdopen fdopen commented Jan 24, 2017

Simple fix for #502 and a related problem on netbsd.

I've intentionally not implemented any kind of feature detection. It's tricky. The header definitions are available and the functions are understood by gcc/clang, although they are not implemented by the c standard library. But gcc will generate opcode for them under certain conditions...

Openbsd seems to have implemented all necessary functions. However their libffi package is currently broken (their newest kernel introduced something similar to grsecurity's mprotect. They've tried to patch libffi accordingly, but it doesn't seem to work as intended)

This will fix yallop#502 and a related problem on netbsd. I've intentionally
not implemented any kind of feature detection. It's tricky. The header
definitions are available and the functions are understood by gcc/clang,
although they are not implemented by the c standard library. But gcc will
generate opcode for them under certain conditions...
@yallop
Copy link
Owner

yallop commented Jan 27, 2017

Thanks! I don't have an easy way to test this, but it looks reasonable.

We're starting to accumulate a few platform tests around the code. I think in the medium term it'd be useful to collect all these together in a single header (and in the longer term perhaps replace a few system-name macros with configure-time feature detection). See #506.

@yallop yallop merged commit 4b83bde into yallop:master Jan 27, 2017
@fdopen fdopen deleted the bsd-fixes branch April 14, 2018 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants