-
Notifications
You must be signed in to change notification settings - Fork 206
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
Don't define _POSIX_THREADS
unless threads are enabled.
#356
Conversation
Is it possible to move all the thread related code into the if block? I think most of these (including timers) are not supported, probably just the clock related ones are. Sorry my issue wasn't clear on that. For context, the library I found uses |
Also, while looking into it I discovered that a more common say to signal no support is to define these macros to The found some documentation in https://pubs.opengroup.org/onlinepubs/000095399/ under unistd.h. |
…y#356) * Don't define `_POSIX_THREADS` unless threads are enabled. Fixes WebAssembly#355. * Remove `_POSIX_THREADS` from predefined-macros.txt.
While porting libidn, I hit a similar issue that gnulib's I guessed defining these macros to
Of course, checking both 1. the definition existence, 2. it's not -1 is the most correct way. But given that most of use-sites use |
Sorry, which threads consts are you referring to here? Do you mean moving all the other |
@sbc100 Ah, yes. I mean all other |
This is a follow-up to WebAssembly#356
This is a follow-up to WebAssembly#356
This is a follow-up to WebAssembly#356
Fixes #355.