Fixed compiler warnings and errors under MSYS2+MINGW64 platform.

This commit is contained in:
Pavol Gono 2024-10-21 06:39:02 +02:00
parent 7a0c6ec78d
commit 2d45c0a242
10 changed files with 31 additions and 10 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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