From: FrankHB Date: Fri, 16 Jun 2023 18:25:01 +0000 (+0800) Subject: Fixed possible macro redefinition (#1892) X-Git-Tag: gguf-v0.4.0~621 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=5b9ccaf104cc1054d4f8f17bc8a4b8dc949e5527;p=pkg%2Fggml%2Fsources%2Fllama.cpp Fixed possible macro redefinition (#1892) MinGW libstdc++ may define `NOMINMAX` unconditionally. This fixes the case when it is already defined. --- diff --git a/examples/main/main.cpp b/examples/main/main.cpp index ef9e75fa..a051fcbc 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -23,7 +23,9 @@ #include #elif defined (_WIN32) #define WIN32_LEAN_AND_MEAN +#ifndef NOMINMAX #define NOMINMAX +#endif #include #include #endif