From bed3d3d6e2a4e05d0afde076b160e85d7ecd6317 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 26 Aug 2020 13:30:39 -0300 Subject: [PATCH] Fixing mingw build. --- src/core/get.cc | 8 +++++++- src/core/hllapi.cc | 13 +++++++++---- src/core/windows/init.cc | 6 +++--- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/core/get.cc b/src/core/get.cc index 828dcb0..0bcda24 100644 --- a/src/core/get.cc +++ b/src/core/get.cc @@ -27,7 +27,13 @@ * */ - #include "private.h" +#include + +#if ! defined(_MSC_VER) + using std::min; +#endif + +#include "private.h" /*--[ Implement ]------------------------------------------------------------------------------------*/ diff --git a/src/core/hllapi.cc b/src/core/hllapi.cc index 1cc5367..ebf47e3 100644 --- a/src/core/hllapi.cc +++ b/src/core/hllapi.cc @@ -27,15 +27,20 @@ * */ +#include + #if defined(_MSC_VER) #define strncasecmp _strnicmp #define strcasecmp _stricmp - #endif +#else + using std::min; +#endif + +#include "private.h" +#include - #include "private.h" - #include - /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ +/*--[ Prototipes ]-----------------------------------------------------------------------------------*/ static int connect_ps(char *buffer, unsigned short *length, unsigned short *rc); static int disconnect_ps(char *buffer, unsigned short *length, unsigned short *rc); diff --git a/src/core/windows/init.cc b/src/core/windows/init.cc index cf2d73f..95cc646 100644 --- a/src/core/windows/init.cc +++ b/src/core/windows/init.cc @@ -56,7 +56,7 @@ #include #include #include - + #ifdef HAVE_LIBINTL #include #endif // HAVE_LIBINTL @@ -75,7 +75,7 @@ extern HRESULT DllInstall(BOOL, PCWSTR); extern HRESULT DllUnregisterServer(); - #else + #else extern __declspec (dllexport) HRESULT DllRegisterServer(); extern __declspec (dllexport) HRESULT DllInstall(BOOL, PCWSTR); @@ -153,7 +153,7 @@ message }; - debug("Event: \"%s\"",msg); + debug("Event: \"%s\"",message); ReportEvent( hEventLog, -- libgit2 0.21.2