Fixed possible macro redefinition (#1892)

MinGW libstdc++ may define `NOMINMAX` unconditionally. This fixes the case when it is already defined.
This commit is contained in:
FrankHB 2023-06-17 02:25:01 +08:00 committed by GitHub
parent 96f634dfed
commit 338a9e5938
1 changed files with 2 additions and 0 deletions

View File

@ -23,7 +23,9 @@
#include <unistd.h>
#elif defined (_WIN32)
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <signal.h>
#endif