diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2014-05-08 14:06:18 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2014-05-14 09:47:40 +1000 |
commit | 86a0f10ac72620b84aeabca6a26962d5f2198c6e (patch) | |
tree | 51283bd0af48aa509f2890f0c30704bf35593995 /libs | |
parent | da596182e18a4a21e1095c056ccb53066e6e2015 (diff) |
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.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/pbd/pbd/abstract_ui.h | 12 |
1 files changed, 12 insertions, 0 deletions
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<pthread_t,RequestBuffer*, pthread_cmp>::iterator RequestBufferMapIterator; + typedef std::map<pthread_t,RequestBuffer*, pthread_cmp> RequestBufferMap; +#else typedef typename std::map<pthread_t,RequestBuffer*>::iterator RequestBufferMapIterator; typedef std::map<pthread_t,RequestBuffer*> RequestBufferMap; +#endif RequestBufferMap request_buffers; static Glib::Threads::Private<RequestBuffer> per_thread_request_buffer; |