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.
When building
openmpon Linux/sparc64, I getThis is highly confusing since
<sys/syscall.h>does defineSYS_gettidand the header is supposed to be included:However, this actually is not the case for two reasons:
KMP_OS_HAIKUis always defined, either as 1 on Haiku or as 0 otherwise.KMP_OS_AIXis even worse: it is only defined as 1 on on AIX, but undefined otherwise.All those
KMP_OS_*macros are supposed to always be defined as 1/0 as appropriate, and to be checked with#if, not#ifdef. AIX is violating this, causing the problem above.Other targets probably get
<sys/syscall.h>indirectly otherwise, but Linux/sparc64 does not.This patch fixes this by also defining
KMP_OS_AIXas 0 on other OSes and changing the checks to#ifas necessary.Tested on
sparc64-unknown-linux-gnu,sparcv9-sun-solaris2.11,amd64-pc-solaris2.11, andx86_64-pc-linux-gnu.