From: Tim Mayberry Date: Thu, 8 May 2014 04:06:18 +0000 (+1000) Subject: Reinstate code removed that allows building with mingw and the pthreads-win32 library X-Git-Tag: 4.0-rc1~1601^2~1223^2~4 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=86a0f10ac72620b84aeabca6a26962d5f2198c6e;p=ardour.git 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. --- 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;