diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-02-28 17:41:28 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-02-28 17:41:28 +0100 |
commit | 464d8e39e083a2f3a73f2c33a7b20036406541c8 (patch) | |
tree | 56fc8960ebf3fa92d1029f1a80bdda3ff766d6d5 /dep/CascLib/src/common/Common.cpp | |
parent | 438d0c3089aaf48352e493ab0a007ef6ef15a276 (diff) |
Dep/CascLib: Update to ladislav-zezula/CascLib@07ab5f37ad282cc101d5c17793c550a0a6d4637f
Diffstat (limited to 'dep/CascLib/src/common/Common.cpp')
-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 } //----------------------------------------------------------------------------- |