static thread_local isc_once_t isc_random_once = ISC_ONCE_INIT;
#elif defined(HAVE___THREAD)
static __thread isc_once_t isc_random_once = ISC_ONCE_INIT;
+#elif defined(HAVE___DECLSPEC_THREAD)
+static __declspec( thread ) isc_once_t isc_random_once = ISC_ONCE_INIT;
#else
#error "Unknown method for defining a TLS variable!"
#endif
***** Platform-dependent defines.
*****/
+#if _MSC_VER > 1400
+#define HAVE_TLS 1
+#define HAVE___DECLSPEC_THREAD 1
+#endif
+
/*
* Some compatibility cludges
*/
static thread_local uint32_t seed[4];
#elif defined(HAVE___THREAD)
static __thread uint32_t seed[4];
+#elif defined(HAVE___DECLSPEC_THREAD)
+static __declspec( thread ) uint32_t seed[4];
#else
#error "Unknown method for defining a TLS variable!"
#endif