diff options
Diffstat (limited to 'dep/CascLib/src/common')
-rw-r--r-- | dep/CascLib/src/common/Common.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dep/CascLib/src/common/Common.cpp b/dep/CascLib/src/common/Common.cpp index 6058bf28b75..a33099b3c6b 100644 --- a/dep/CascLib/src/common/Common.cpp +++ b/dep/CascLib/src/common/Common.cpp @@ -77,7 +77,9 @@ unsigned char IntToHexChar[] = "0123456789abcdef"; //----------------------------------------------------------------------------- // GetCascError/SetCascError support for non-Windows platform -static DWORD dwLastError = ERROR_SUCCESS; +#ifndef CASCLIB_PLATFORM_WINDOWS +static __thread DWORD dwLastError = ERROR_SUCCESS; +#endif DWORD GetCascError() { @@ -92,8 +94,9 @@ void SetCascError(DWORD dwErrCode) { #ifdef CASCLIB_PLATFORM_WINDOWS SetLastError(dwErrCode); -#endif +#else dwLastError = dwErrCode; +#endif } //----------------------------------------------------------------------------- |