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: <thread> is not available, <phread.h> is not available and EPROTO is already defined (but with 53 instead of 71)
This commit is contained in:
parent
a559b2d8cc
commit
bb53c4c1ec
@ -109,6 +109,7 @@ if(WIN32)
|
|||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
if(NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
|
if(NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
|
||||||
|
add_definitions(-DSTD_THREAD_NOT_SUPPORTED)
|
||||||
add_definitions(-DNANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
|
add_definitions(-DNANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
|
||||||
endif(NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
|
endif(NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
|
||||||
endif(MINGW)
|
endif(MINGW)
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
#include <thread>
|
//#include <thread>
|
||||||
#include <pthread.h>
|
//#include <pthread.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
// http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno.h#L53
|
// http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno.h#L53
|
||||||
#define EPROTO 71 /* Protocol error */
|
//#define EPROTO 71 /* Protocol error */
|
||||||
#include <mingw.thread.h>
|
#include <mingw.thread.h>
|
||||||
#include <mingw.mutex.h>
|
#include <mingw.mutex.h>
|
||||||
#else
|
#else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user