[patch libgcc]: Fix PR c++/57440
Kai Tietz
ktietz70@googlemail.com
Wed May 7 19:06:00 GMT 2014
Hi,
this patch adds for Windows targets the define
_GTHREAD_USE_MUTEX_INIT_FUNC, which is necessary as pthread-emulation
for those targets are just handling pthread_mutext_init,
othread_mutex_destroy proper.
ChangeLog libgcc
2014-05-07 Kai Tietz <ktietz@redhat.com>
PR c++/57440
* gthr-posix.h (_GTHREAD_USE_MUTEX_INIT_FUNC): Define for native windows
targets.
Patch passed already regression-test for x86_64-unknown-linux-gnu.
Test for i686-w64-mingw32 is still running (with posix-threading
model). Ok to apply this patch after last test passes?
Regards,
Kai
Index: gthr-posix.h
===================================================================
--- gthr-posix.h (Revision 210070)
+++ gthr-posix.h (Arbeitskopie)
@@ -34,6 +34,10 @@ see the files COPYING3 and COPYING.RUNTIME respect
#include <pthread.h>
+#if defined (_WIN32) && !defined (__CYGWIN__)
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
+#endif
+
#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
|| !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK))
# include <unistd.h>
More information about the Gcc-patches
mailing list