diff gcc/gthr-win32.h @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children
line wrap: on
line diff
--- a/gcc/gthr-win32.h	Sun Feb 07 18:28:00 2010 +0900
+++ b/gcc/gthr-win32.h	Fri Feb 12 23:39:51 2010 +0900
@@ -72,6 +72,10 @@
 #include <_mingw.h>
 #endif
 
+#ifndef __UNUSED_PARAM
+#define __UNUSED_PARAM(x) x
+#endif
+
 #ifdef _LIBOBJC
 
 /* This is necessary to prevent windef.h (included from windows.h) from
@@ -121,7 +125,7 @@
 				     arg, 0, &thread_id)))
     thread_id = 0;
 
-  return (objc_thread_t) thread_id;
+  return (objc_thread_t) (INT_PTR) thread_id;
 }
 
 /* Set the current thread's priority.  */
@@ -202,7 +206,7 @@
 objc_thread_t
 __gthread_objc_thread_id (void)
 {
-  return (objc_thread_t) GetCurrentThreadId ();
+  return (objc_thread_t) (INT_PTR) GetCurrentThreadId ();
 }
 
 /* Sets the thread's local storage pointer.  */
@@ -291,7 +295,7 @@
 
 /* Allocate a condition.  */
 int
-__gthread_objc_condition_allocate (objc_condition_t condition)
+__gthread_objc_condition_allocate (objc_condition_t __UNUSED_PARAM(condition))
 {
   /* Unimplemented.  */
   return -1;
@@ -299,7 +303,7 @@
 
 /* Deallocate a condition.  */
 int
-__gthread_objc_condition_deallocate (objc_condition_t condition)
+__gthread_objc_condition_deallocate (objc_condition_t __UNUSED_PARAM(condition))
 {
   /* Unimplemented.  */
   return -1;
@@ -307,7 +311,8 @@
 
 /* Wait on the condition */
 int
-__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+__gthread_objc_condition_wait (objc_condition_t __UNUSED_PARAM(condition),
+			       objc_mutex_t __UNUSED_PARAM(mutex))
 {
   /* Unimplemented.  */
   return -1;
@@ -315,7 +320,7 @@
 
 /* Wake up all threads waiting on this condition.  */
 int
-__gthread_objc_condition_broadcast (objc_condition_t condition)
+__gthread_objc_condition_broadcast (objc_condition_t __UNUSED_PARAM(condition))
 {
   /* Unimplemented.  */
   return -1;
@@ -323,7 +328,7 @@
 
 /* Wake up one thread waiting on this condition.  */
 int
-__gthread_objc_condition_signal (objc_condition_t condition)
+__gthread_objc_condition_signal (objc_condition_t __UNUSED_PARAM(condition))
 {
   /* Unimplemented.  */
   return -1;
@@ -361,15 +366,14 @@
   __gthread_recursive_mutex_init_function
 #define __GTHREAD_RECURSIVE_MUTEX_INIT_DEFAULT {-1, 0, 0, 0}
 
-#if __MINGW32_MAJOR_VERSION >= 1 || \
-  (__MINGW32_MAJOR_VERSION == 0 && __MINGW32_MINOR_VERSION > 2)
+#if defined (_WIN32) && !defined(__CYGWIN__)
 #define MINGW32_SUPPORTS_MT_EH 1
 /* Mingw runtime >= v0.3 provides a magic variable that is set to nonzero
    if -mthreads option was specified, or 0 otherwise. This is to get around
    the lack of weak symbols in PE-COFF.  */
 extern int _CRT_MT;
 extern int __mingwthr_key_dtor (unsigned long, void (*) (void *));
-#endif /* __MINGW32__ version */
+#endif /* _WIN32 && !__CYGWIN__ */
 
 /* The Windows95 kernel does not export InterlockedCompareExchange.
    This provides a substitute.   When building apps that reference