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

Use check_c_source_compiles for PTHREAD_MUTEX_RECURSIVE #1158

Closed
mathstuf opened this issue Oct 23, 2018 · 3 comments
Closed

Use check_c_source_compiles for PTHREAD_MUTEX_RECURSIVE #1158

mathstuf opened this issue Oct 23, 2018 · 3 comments

Comments

@mathstuf
Copy link
Contributor

As explained in this VTK issue, PTHREAD_MUTEX_RECURSIVE might be an rvalue in some implementations and therefore incompatible with check_symbol_exists. Instead, check_c_source_compiles should be used instead.

@kbevers
Copy link
Member

kbevers commented Oct 23, 2018

@mathstuf Thanks for reporting this. Would you be willing to submit a PR with a fix to this?

@mathstuf
Copy link
Contributor Author

Yeah, I should be able to get around to it some time this week or next.

@kbevers
Copy link
Member

kbevers commented Oct 23, 2018

Awesome! Thank you very much.

mathstuf added a commit to mathstuf/proj that referenced this issue Oct 26, 2018
The `check_symbol_exists` cannot detect `#define symbol 1` because it
takes the address of the symbol to detect it, but the address of a
literal is not allowed. Some platforms define `PTHREAD_MUTEX_RECURSIVE`
by such a literal.

Fixes OSGeo#1158
mathstuf added a commit to mathstuf/proj that referenced this issue Oct 26, 2018
The `check_symbol_exists` cannot detect `#define symbol 1` because it
takes the address of the symbol to detect it, but the address of a
literal is not allowed. Some platforms define `PTHREAD_MUTEX_RECURSIVE`
by such a literal.

Fixes OSGeo#1158
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

No branches or pull requests

2 participants