From 73309f19e582a712e78f54988fc51dbc5ab60bf4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 14 Jul 2013 12:34:30 +0200 Subject: cmake: Check if we have Thread Local Storage support. --- include/libssh/priv.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/libssh') diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 7168cf55..d7974026 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -130,6 +130,14 @@ int gettimeofday(struct timeval *__p, void *__t); #endif #endif +#if defined(HAVE_GCC_THREAD_LOCAL_STORAGE) +# define LIBSSH_THREAD __thread +#elif defined(HAVE_MSC_THREAD_LOCAL_STORAGE) +# define LIBSSH_THREAD __declspec(thread) +#else +# define LIBSSH_THREAD +#endif + #define enter_function() (void)session #define leave_function() (void)session -- cgit