[Pixman] [PATCH] Fix thread safety on mingw-w64 and clang
bgilbert at cs.cmu.edu
Sun Dec 2 19:36:52 PST 2012
This is a slightly cleaner fix to the preference-order portion of bug
57591. It does not attempt to detect when __declspec(thread) is being
ignored by the compiler, so is insufficient in general, but it should
fix the problem for the compilers currently under discussion.
After finding a working TLS storage class specifier, configure was
continuing to test other candidates. This caused it to prefer
__declspec(thread) over __thread. However, __declspec(thread) is
ignored with a warning by mingw-w64  and silently ignored by clang .
The resulting binary behaved as if PIXMAN_NO_TLS was defined.
Bug introduced by a069da6c.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 45b709d..81f068d 100644
@@ -860,7 +860,7 @@ AC_CACHE_VAL(ac_cv_tls, [
#error OpenBSD has broken __thread support
-int $kw test;], , ac_cv_tls=$kw)
+int $kw test;], , [ac_cv_tls=$kw; break])
More information about the Pixman