diff options
Diffstat (limited to 'extra/yassl/include/lock.hpp')
-rw-r--r-- | extra/yassl/include/lock.hpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index 0525943e45d..99829b0b6de 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -23,13 +23,21 @@ #ifndef yaSSL_LOCK_HPP #define yaSSL_LOCK_HPP +/* + Visual Studio Source Annotations header (sourceannotations.h) fails + to compile if outside of the global namespace. +*/ +#ifdef YASSL_THREAD_SAFE +#ifdef _WIN32 +#include <windows.h> +#endif +#endif namespace yaSSL { -#ifdef MULTI_THREADED +#ifdef YASSL_THREAD_SAFE #ifdef _WIN32 - #include <windows.h> class Mutex { CRITICAL_SECTION cs_; @@ -69,7 +77,7 @@ namespace yaSSL { }; #endif // _WIN32 -#else // MULTI_THREADED (WE'RE SINGLE) +#else // YASSL_THREAD_SAFE (WE'RE SINGLE) class Mutex { public: @@ -79,7 +87,7 @@ namespace yaSSL { }; }; -#endif // MULTI_THREADED +#endif // YASSL_THREAD_SAFE |