Re: [patch libgcc]: Fix PR c++/57440

2014-05-09 Thread Ian Lance Taylor
On Wed, May 7, 2014 at 12:06 PM, Kai Tietz ktiet...@googlemail.com wrote:

 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  kti...@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?

As Jonathan said in comment #12 of http://gcc.gnu.org/PR57440 , the
right place for this #define is
libstdc++-v3/config/os/mingw32*/os_defines.h.

Ian


[patch libgcc]: Fix PR c++/57440

2014-05-07 Thread Kai Tietz
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  kti...@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


Re: [patch libgcc]: Fix PR c++/57440

2014-05-07 Thread Jonathan Wakely
On 7 May 2014 20:06, Kai Tietz wrote:

 PR c++/57440

N.B. that should be libstdc++/57440 in the ChangeLog


Re: [patch libgcc]: Fix PR c++/57440

2014-05-07 Thread Kai Tietz
2014-05-07 21:41 GMT+02:00 Jonathan Wakely jwakely@gmail.com:
 On 7 May 2014 20:06, Kai Tietz wrote:

 PR c++/57440

 N.B. that should be libstdc++/57440 in the ChangeLog

Oh, yes of course.

Thanks.
Kai