summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3d929de..28a9252 100644
--- a/configure.ac
+++ b/configure.ac
@@ -302,9 +302,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>],
AC_MSG_CHECKING([for __thread])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))
#error gcc has this bug: http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html
-#endif
-#if defined(__MINGW32__)
+#elif defined(__MINGW32__)
#error mingw doesn't really support tls
+#elif defined(__APPLE__)
+#error OSX __thread support is known to call malloc which makes it unsafe to use from malloc replacement
#endif
], [static __thread int p = 0])],
[AC_DEFINE(HAVE_TLS, 1,