1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-30 20:53: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_
#endif
#endif
#define NOMINMAX
// first
#ifndef NOMINMAX
// if NOMINMAX is already defined we don't want to mess with that either way
#define NOMINMAX
#include <windef.h>
#undef NOMINMAX
#else
#include <windef.h>
#endif
// second
#include <winbase.h>
// third
#include <processthreadsapi.h>
#include <shellapi.h>
#undef NOMINMAX
#elif defined(__APPLE__)
#include <crt_externs.h>
#endif