Fixed compiler warnings and errors under MSYS2+MINGW64 platform. (#186)

Fixed compiler warnings and errors under MSYS2+MINGW64 platform.
This commit is contained in:
Pavol Gono 2024-10-27 16:30:36 +01:00 committed by GitHub
parent 124dba5254
commit 9269a72c54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 31 additions and 10 deletions

View File

@ -5,6 +5,7 @@
#include "binary/module_base.hpp" #include "binary/module_base.hpp"
#include <string> #include <string>
#include <system_error>
#include <vector> #include <vector>
#include <mutex> #include <mutex>
#include <unordered_map> #include <unordered_map>
@ -16,7 +17,9 @@
#include <link.h> // needed for dladdr1's link_map info #include <link.h> // needed for dladdr1's link_map info
#endif #endif
#elif IS_WINDOWS #elif IS_WINDOWS
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#endif #endif

View File

@ -10,7 +10,9 @@
#include <cstring> #include <cstring>
#include <string> #include <string>
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
namespace cpptrace { namespace cpptrace {

View File

@ -4,7 +4,9 @@
#include <string> #include <string>
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#include <dbghelp.h> #include <dbghelp.h>

View File

@ -11,7 +11,9 @@
#ifndef _MSC_VER #ifndef _MSC_VER
#include <string.h> #include <string.h>
#if IS_WINDOWS #if IS_WINDOWS
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#else #else
#include <sys/mman.h> #include <sys/mman.h>

View File

@ -9,7 +9,9 @@
#include <unordered_set> #include <unordered_set>
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#include <dbghelp.h> #include <dbghelp.h>

View File

@ -7,7 +7,9 @@
#include <cctype> #include <cctype>
#if IS_WINDOWS #if IS_WINDOWS
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#endif #endif

View File

@ -7,7 +7,9 @@
#include "platform/platform.hpp" #include "platform/platform.hpp"
#if IS_WINDOWS #if IS_WINDOWS
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#define CPPTRACE_MAX_PATH MAX_PATH #define CPPTRACE_MAX_PATH MAX_PATH

View File

@ -12,7 +12,9 @@
#include <system_error> #include <system_error>
#include <vector> #include <vector>
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#include <dbghelp.h> #include <dbghelp.h>

View File

@ -9,7 +9,9 @@
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
// Fucking windows headers // Fucking windows headers

View File

@ -2,7 +2,9 @@
#if IS_WINDOWS #if IS_WINDOWS
#include <io.h> #include <io.h>
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
#else #else
#include <sys/stat.h> #include <sys/stat.h>