Let's hope this will be history soon.
)
],
[bird_cv_thread_local=yes],
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [
+ static __thread int x = 42;
+ ],
+ []
+ )
+ ],
+ [bird_cv_thread_local=__thread],
[bird_cv_thread_local=no]
- )
+ ))
)
])
BIRD_CHECK_THREAD_LOCAL
if test "$bird_cv_thread_local" = no ; then
- AC_MSG_ERROR([Thread-local storage not available])
+ AC_MSG_ERROR([Thread-local storage not available])
+elif test "$bird_cv_thread_local" != yes ; then
+ CFLAGS="$CFLAGS -D_Thread_local=$bird_cv_thread_local"
fi
BIRD_CHECK_PTHREADS
struct buffer buf;
};
-_Thread_local static struct filter_state filter_state;
-_Thread_local static struct filter_stack filter_stack;
+static _Thread_local struct filter_state filter_state;
+static _Thread_local struct filter_stack filter_stack;
void (*bt_assert_hook)(int result, const struct f_line_item *assert);
if (ad && int_set_contains(ad, BGP_COMM_LLGR_STALE))
return r->attrs;
- _Thread_local static struct {
+ static _Thread_local struct {
rta a;
u32 labels[MPLS_MAX_LABEL_STACK];
} aloc;