Fix __thread configure check on Clang

AC_TRY_COMPILE puts the code in a function already, and Clang didn't like
the function within the function declaration. This lead to test failure.

Clang now properly detects __thread support.
pull/1009/merge
Victor Julien 10 years ago
parent a9282ed7f7
commit 3beaa80aa2

@ -226,7 +226,7 @@
# check if our target supports thread local storage
AC_MSG_CHECKING(for thread local storage __thread support)
AC_TRY_COMPILE([#include <stdlib.h>],
[ void somefunc (void) { static __thread int i; i = 1; i++; } ],
[ static __thread int i; i = 1; i++; ],
[AC_DEFINE([TLS], [1], [Thread local storage])
AC_MSG_RESULT([yes]) ],
[AC_MSG_RESULT([no])])

Loading…
Cancel
Save