From a559b2d8cc10d2b99f4589aef215a281f35addb8 Mon Sep 17 00:00:00 2001 From: Pr0curo Date: Wed, 16 Mar 2016 09:04:20 +0100 Subject: [PATCH 1/4] include as std::memcpy is defined in header, it is added (see http://en.cppreference.com/w/cpp/string/byte/memcpy) --- source/system/dataexch.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/system/dataexch.cpp b/source/system/dataexch.cpp index d229dea0..cb8ecb97 100644 --- a/source/system/dataexch.cpp +++ b/source/system/dataexch.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #if defined(NANA_WINDOWS) #include From bb53c4c1ecfb422201e20a22ed4e0228ea264347 Mon Sep 17 00:00:00 2001 From: Pr0curo Date: Wed, 16 Mar 2016 09:16:55 +0100 Subject: [PATCH 2/4] correct workaround for missing thread support the Workaround from MeganZ (I suppose you refere to this one: https://github.com/meganz/mingw-std-threads) hast some flaws: is not available, is not available and EPROTO is already defined (but with 53 instead of 71) --- CMakeLists.txt | 1 + include/nana/std_mutex.hpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b622422..46315d96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,7 @@ if(WIN32) if(MINGW) if(NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) + add_definitions(-DSTD_THREAD_NOT_SUPPORTED) add_definitions(-DNANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) endif(NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) endif(MINGW) diff --git a/include/nana/std_mutex.hpp b/include/nana/std_mutex.hpp index b508548e..38c07aaf 100644 --- a/include/nana/std_mutex.hpp +++ b/include/nana/std_mutex.hpp @@ -8,12 +8,12 @@ #include #include #include -#include -#include +//#include +//#include #include #include // http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno.h#L53 -#define EPROTO 71 /* Protocol error */ +//#define EPROTO 71 /* Protocol error */ #include #include #else From 6540142e29e489b03fc1571167dcce2875e86fe0 Mon Sep 17 00:00:00 2001 From: Pr0curo Date: Wed, 16 Mar 2016 09:24:22 +0100 Subject: [PATCH 3/4] change includes using the right includes to avoid the mess with the missing threading library support of mingw --- source/gui/wvl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/gui/wvl.cpp b/source/gui/wvl.cpp index 6877ef41..8942fb17 100644 --- a/source/gui/wvl.cpp +++ b/source/gui/wvl.cpp @@ -13,8 +13,9 @@ #include #include -#include +#include #include +#include //#define NANA_AUTOMATIC_GUI_TESTING namespace nana From 238e298bc420f3704790e1a41d6d5b262b12082c Mon Sep 17 00:00:00 2001 From: Pr0curo Date: Wed, 16 Mar 2016 09:34:16 +0100 Subject: [PATCH 4/4] add include --- include/nana/std_thread.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/nana/std_thread.hpp b/include/nana/std_thread.hpp index f3cf4bc0..e1df7ef7 100644 --- a/include/nana/std_thread.hpp +++ b/include/nana/std_thread.hpp @@ -5,6 +5,7 @@ #if defined(STD_THREAD_NOT_SUPPORTED) #if defined(NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) + #include #else #include @@ -13,5 +14,11 @@ namespace std typedef boost::thread thread; } #endif // (NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) + +#else + +#include + #endif // (STD_THREAD_NOT_SUPPORTED) + #endif // NANA_STD_THREAD_HPP