[PATCH] D31883: Don't assume PTHREAD_CREATE_JOINABLE is 0 on all systems
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 10:07:31 PDT 2017
fjricci added a comment.
In https://reviews.llvm.org/D31883#724977, @fjricci wrote:
> In https://reviews.llvm.org/D31883#724975, @kubamracek wrote:
>
> > Can we use the original names instead of `kCreateJoinable` and `kCreateDetached`? The name "kCreateDetached" suggests that it's some arbitrary sanitizer-internal constant, but that's not true. It's a platform-defined value that we must follow.
>
>
> The problem with the original name is that we hit conflicts in files that include both 'sanitizer_linux.h' and 'pthread.h', due to a multiple definition.
Well, not technically a multiple definition, but after the preprocessor replaces `PTHREAD_CREATE_JOINABLE`, you end up with a statement like '#define 0 = 0` in whichever header is included second, which is an error.
https://reviews.llvm.org/D31883
More information about the llvm-commits
mailing list