mirror of
https://github.com/facebook/zstd.git
synced 2025-07-28 00:01:53 +03:00
Do not test WIN32, instead test _WIN32
To the best of my knowledge: * `_WIN32` and `_WIN64` are defined by the compiler, * `WIN32` and `WIN64` are defined by the user, to indicate whatever the user chooses them to indicate. They mean 32-bit and 64-bit Windows compilation by convention only. See: https://accu.org/journals/overload/24/132/wilson_2223/ Windows compilers in general, and MSVC in particular, have been defining `_WIN32` and `_WIN64` for a long time, provably at least since Visual Studio 2015, and in practice as early as in the days of 16-bit Windows. See: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-140 https://learn.microsoft.com/en-us/windows/win32/winprog64/the-tools Tests used to be inconsistent, sometimes testing `_WIN32`, sometimes `_WIN32` and `WIN32`. This brings consistency to Windows detection.
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
#define ZSTD_STATIC_LINKING_ONLY
|
||||
#include <zstd.h> // presumes zstd library is installed
|
||||
#include <zstd_errors.h>
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
# include <windows.h>
|
||||
# define SLEEP(x) Sleep(x)
|
||||
#else
|
||||
|
Reference in New Issue
Block a user