From 86a0f10ac72620b84aeabca6a26962d5f2198c6e Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 8 May 2014 14:06:18 +1000 Subject: [PATCH] Reinstate code removed that allows building with mingw and the pthreads-win32 library Newer versions of mingw-w64 can be built with an included pthread implementation called winpthreads which uses an integer type for pthread_t but pthreads-win32 does not. --- libs/pbd/pbd/abstract_ui.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index 8e386aa4eb..a8602c7d78 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -75,8 +75,20 @@ class ABSTRACT_UI_API AbstractUI : public BaseUI }; typedef typename RequestBuffer::rw_vector RequestBufferVector; +#if defined(COMPILER_MINGW) && defined(PTW32_VERSION) + struct pthread_cmp + { + bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2) + { + return thread1.p < thread2.p; + } + }; + typedef typename std::map::iterator RequestBufferMapIterator; + typedef std::map RequestBufferMap; +#else typedef typename std::map::iterator RequestBufferMapIterator; typedef std::map RequestBufferMap; +#endif RequestBufferMap request_buffers; static Glib::Threads::Private per_thread_request_buffer;