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

Don't define _POSIX_THREADS unless threads are enabled. #356

Merged
merged 2 commits into from
Dec 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion expected/wasm32-wasi/single/predefined-macros.txt
Original file line number Diff line number Diff line change
@@ -2123,7 +2123,6 @@
#define _POSIX_STREAM_MAX 8
#define _POSIX_SYMLINK_MAX 255
#define _POSIX_SYMLOOP_MAX 8
#define _POSIX_THREADS _POSIX_VERSION
#define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION
#define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION
#define _POSIX_THREAD_CPUTIME _POSIX_VERSION
2 changes: 2 additions & 0 deletions libc-top-half/musl/include/unistd.h
Original file line number Diff line number Diff line change
@@ -336,7 +336,9 @@ pid_t gettid(void);
#endif
#define _POSIX_VDISABLE 0

#if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT)
#define _POSIX_THREADS _POSIX_VERSION
#endif
#define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION
#define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION
#define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION