Fixed possible macro redefinition

MinGW libstdc++ may define `NOMINMAX` unconditionally. This fixes the case when it is already defined.
This commit is contained in:
FrankHB 2023-06-16 22:19:53 +08:00 committed by GitHub
parent 602c748863
commit d50bfb2630
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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