mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-07 22:40:55 +01:00
Problem: mis-detection of threadsafe_static_init causes test failures
Solution: do not rely __cplusplus >= 201103L to detect whether the compiler supports thread safe static initialisation, but check only the proper feature preprocessor macro. GCC introduced it in version 8, and Clang in version 6.
This commit is contained in:
@@ -92,8 +92,7 @@ uint32_t zmq::generate_random ()
|
||||
// configurable via config.h
|
||||
|
||||
// TODO this should probably be done via config.h
|
||||
#if __cplusplus >= 201103L \
|
||||
|| (defined(__cpp_threadsafe_static_init) \
|
||||
#if (defined(__cpp_threadsafe_static_init) \
|
||||
&& __cpp_threadsafe_static_init >= 200806) \
|
||||
|| (defined(_MSC_VER) && _MSC_VER >= 1900)
|
||||
#define ZMQ_HAVE_THREADSAFE_STATIC_LOCAL_INIT 1
|
||||
|
||||
Reference in New Issue
Block a user