1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-02 13:43:52 +00:00

fix: isolate definition of NOMINMA and skip undef if defined (#848)

This commit is contained in:
Philip Top 2023-02-16 05:24:47 -08:00 committed by GitHub
parent 69c79b0343
commit 89601ee253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,16 +31,23 @@
#define _ARM_ #define _ARM_
#endif #endif
#endif #endif
#define NOMINMAX
// first // first
#ifndef NOMINMAX
// if NOMINMAX is already defined we don't want to mess with that either way
#define NOMINMAX
#include <windef.h> #include <windef.h>
#undef NOMINMAX
#else
#include <windef.h>
#endif
// second // second
#include <winbase.h> #include <winbase.h>
// third // third
#include <processthreadsapi.h> #include <processthreadsapi.h>
#include <shellapi.h> #include <shellapi.h>
#undef NOMINMAX
#elif defined(__APPLE__) #elif defined(__APPLE__)
#include <crt_externs.h> #include <crt_externs.h>
#endif #endif