From ea3b991f729012232b8ed9ce09e2ab35e8b57ee1 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 13 Dec 2023 21:08:13 +0000 Subject: [PATCH] MinGW: Remove direct mingw-std-threads includes --- src/debug.cpp | 3 --- src/framerate_gui.cpp | 3 --- src/genworld.h | 3 --- src/mixer.cpp | 3 --- src/music/dmusic.cpp | 3 --- src/music/fluidsynth.cpp | 3 --- src/music/music_driver.hpp | 3 --- src/music/win32_m.cpp | 4 ---- src/network/core/os_abstraction.cpp | 3 --- src/network/core/tcp.h | 3 --- src/network/network_server.cpp | 4 ---- src/network/network_survey.h | 4 ---- src/newgrf_config.cpp | 4 ---- src/openttd.cpp | 3 --- src/os/windows/survey_win.cpp | 4 ---- src/os/windows/win32.cpp | 4 ---- src/sl/saveload.cpp | 4 ---- src/thread.h | 4 ---- src/video/sdl2_default_v.cpp | 4 ---- src/video/sdl2_opengl_v.cpp | 4 ---- src/video/sdl2_v.h | 3 --- src/video/video_driver.hpp | 5 ----- src/video/win32_v.h | 4 ---- src/viewport.cpp | 4 ---- src/worker_thread.h | 4 ---- 25 files changed, 90 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index 8f258dd496..e83d3b8c8a 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -18,9 +18,6 @@ #include "thread.h" #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#endif #if defined(_WIN32) #include "os/windows/win32.h" diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 482e420079..c0a6b9207e 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -28,9 +28,6 @@ #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#endif #include #include "safeguards.h" diff --git a/src/genworld.h b/src/genworld.h index 3699a0b93d..3d0436740a 100644 --- a/src/genworld.h +++ b/src/genworld.h @@ -12,9 +12,6 @@ #include "company_type.h" #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.thread.h" -#endif /** Constants related to world generation */ enum LandscapeGenerator { diff --git a/src/mixer.cpp b/src/mixer.cpp index bbd06b433b..9da1027a65 100644 --- a/src/mixer.cpp +++ b/src/mixer.cpp @@ -19,9 +19,6 @@ #include "safeguards.h" #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#endif struct MixerChannel { /* pointer to allocated buffer memory */ diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index 3dfa531d53..85933a0202 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -26,9 +26,6 @@ #include #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#endif #include "../safeguards.h" diff --git a/src/music/fluidsynth.cpp b/src/music/fluidsynth.cpp index 38f65e7e14..1c4b67e12b 100644 --- a/src/music/fluidsynth.cpp +++ b/src/music/fluidsynth.cpp @@ -16,9 +16,6 @@ #include #include "../mixer.h" #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#endif static struct { fluid_settings_t *settings; ///< FluidSynth settings handle diff --git a/src/music/music_driver.hpp b/src/music/music_driver.hpp index 93928cd141..8e54facbf4 100644 --- a/src/music/music_driver.hpp +++ b/src/music/music_driver.hpp @@ -14,9 +14,6 @@ #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#endif extern std::mutex _music_driver_mutex; diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index 610f84575e..a5d5d21c5f 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -19,10 +19,6 @@ #include "../base_media_base.h" #include "../core/mem_func.hpp" #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include "../safeguards.h" diff --git a/src/network/core/os_abstraction.cpp b/src/network/core/os_abstraction.cpp index 6b830bca25..70f0c0d14a 100644 --- a/src/network/core/os_abstraction.cpp +++ b/src/network/core/os_abstraction.cpp @@ -20,9 +20,6 @@ #include "os_abstraction.h" #include "../../string_func.h" #include -#if defined(__MINGW32__) -#include "../../3rdparty/mingw-std-threads/mingw.mutex.h" -#endif #include "../../safeguards.h" diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index 91dc46b9e5..0665648123 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -22,9 +22,6 @@ #include #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.thread.h" -#endif /** The states of sending the packets. */ enum SendPacketsState { diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index ac758a666e..a686995786 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -34,10 +34,6 @@ #include "../3rdparty/monocypher/monocypher.h" #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include "../safeguards.h" diff --git a/src/network/network_survey.h b/src/network/network_survey.h index a705c0143e..44ac781102 100644 --- a/src/network/network_survey.h +++ b/src/network/network_survey.h @@ -12,10 +12,6 @@ #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#endif #include "core/http.h" /** diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index d6e2a7bdf8..72b21d07ac 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -30,10 +30,6 @@ #include "thread.h" #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#include "3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include "safeguards.h" diff --git a/src/openttd.cpp b/src/openttd.cpp index 4955ba1d44..47483af0ae 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -101,9 +101,6 @@ #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#endif #include #include diff --git a/src/os/windows/survey_win.cpp b/src/os/windows/survey_win.cpp index a27d0fef07..0c55a9d337 100644 --- a/src/os/windows/survey_win.cpp +++ b/src/os/windows/survey_win.cpp @@ -15,10 +15,6 @@ #include #include -#if defined(__MINGW32__) -#include "../../3rdparty/mingw-std-threads/mingw.thread.h" -#endif - #include "../../safeguards.h" extern std::string SurveyMemoryToText(uint64_t memory); diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 88652a52ee..20ed87ad11 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -34,10 +34,6 @@ #include #include #include -#if defined(__MINGW32__) -#include "../../3rdparty/mingw-std-threads/mingw.mutex.h" -#endif - #include "../../safeguards.h" diff --git a/src/sl/saveload.cpp b/src/sl/saveload.cpp index de224b9d29..3b52638207 100644 --- a/src/sl/saveload.cpp +++ b/src/sl/saveload.cpp @@ -66,10 +66,6 @@ #include "../thread.h" #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include "../safeguards.h" diff --git a/src/thread.h b/src/thread.h index bdfe86a1f5..1a3bd122a3 100644 --- a/src/thread.h +++ b/src/thread.h @@ -15,10 +15,6 @@ #include #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.thread.h" -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#endif /** * Sleep on the current thread for a defined time. diff --git a/src/video/sdl2_default_v.cpp b/src/video/sdl2_default_v.cpp index 404b8c5c66..384659f397 100644 --- a/src/video/sdl2_default_v.cpp +++ b/src/video/sdl2_default_v.cpp @@ -26,10 +26,6 @@ #include #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #ifdef __EMSCRIPTEN__ # include # include diff --git a/src/video/sdl2_opengl_v.cpp b/src/video/sdl2_opengl_v.cpp index 4360a0e7e7..f52584f255 100644 --- a/src/video/sdl2_opengl_v.cpp +++ b/src/video/sdl2_opengl_v.cpp @@ -30,10 +30,6 @@ #include #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include #include "../3rdparty/opengl/glext.h" #include "opengl.h" diff --git a/src/video/sdl2_v.h b/src/video/sdl2_v.h index 3def038f44..a55e610c1e 100644 --- a/src/video/sdl2_v.h +++ b/src/video/sdl2_v.h @@ -11,9 +11,6 @@ #define VIDEO_SDL_H #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include "video_driver.hpp" #include diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp index d6b79818e4..1872539611 100644 --- a/src/video/video_driver.hpp +++ b/src/video/video_driver.hpp @@ -23,11 +23,6 @@ #include #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#include "../3rdparty/mingw-std-threads/mingw.thread.h" -#endif extern std::string _ini_videodriver; extern std::vector _resolutions; diff --git a/src/video/win32_v.h b/src/video/win32_v.h index 46cff8df92..316dc1ea15 100644 --- a/src/video/win32_v.h +++ b/src/video/win32_v.h @@ -13,10 +13,6 @@ #include "video_driver.hpp" #include #include -#if defined(__MINGW32__) -#include "../3rdparty/mingw-std-threads/mingw.mutex.h" -#include "../3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include /** Base class for Windows video drivers. */ diff --git a/src/viewport.cpp b/src/viewport.cpp index 354dad5840..18172fc748 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -125,10 +125,6 @@ #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#include "3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif #include "table/strings.h" #include "table/string_colours.h" diff --git a/src/worker_thread.h b/src/worker_thread.h index 82ae5b415a..7435e0f8a5 100644 --- a/src/worker_thread.h +++ b/src/worker_thread.h @@ -13,10 +13,6 @@ #include "core/ring_buffer_queue.hpp" #include #include -#if defined(__MINGW32__) -#include "3rdparty/mingw-std-threads/mingw.mutex.h" -#include "3rdparty/mingw-std-threads/mingw.condition_variable.h" -#endif typedef void WorkerJobFunc(void *, void *, void *);