This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Uglify gthr*.h function parameter and local variable names


On Mon, Feb 16, 2009 at 1:03 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> The massive post-4.3 gthr*.h added tons of non-uglified inline function
> parameter names and inline function local variable names that break
> compiling e.g.
> #include <string>
> with -Dthread=, -Dmutex= etc. and unfortunately there are packages like
> poker3d that fail to build (regression from 4.3) because of this.
>
> The following patch uglifies what needs to be uglified in gthr*.h
> (doesn't uglify _LIBOBJC specific bits, as libobjc doesn't care).
> Ok for trunk if testing succeeds (all I care about and can test is
> gthr-posix.h, the rest I''ve just skimmed)?

This is ok for trunk and the branch.

> BTW, I've instrumented cc1plus a little bit to report me non-uglified
> function parameter names and local variables in inlines, attached is a list
> (maybe incomplete, haven't tried all the various feature test macros and
> -std= options) of the [a-z].* named parameters or local variables in
> libstdc++ and glibc headers (and a couple of kernel headers that got
> included by those).  I think libstdc++ appendix_contributing.xml says
> that such names should be uglified with __ prefix (while avoiding
> thread -> __thread), is this something we should eventually fix as well?

I think so.  Maybe if we had a proper warning we could enable it
by default... (not sure how to automatically detect non-internal headers
though)

Thanks,
Richard.

> 2009-02-16  Jakub Jelinek  <jakub@redhat.com>
>
>        * gthr-dce.h: Uglify function parameter and local variable names.
>        * gthr-gnat.h: Likewise.
>        * gthr-mipssde.h: Likewise.
>        * gthr-nks.h: Likewise.
>        * gthr-posix95.h: Likewise.
>        * gthr-posix.h: Likewise.
>        * gthr-rtems.h: Likewise.
>        * gthr-single.h: Likewise.
>        * gthr-solaris.h: Likewise.
>        * gthr-tpf.h: Likewise.
>        * gthr-vxworks.h: Likewise.
>        * gthr-win32.h: Likewise.
>
> --- gcc/gthr-tpf.h.jj   2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-tpf.h      2009-02-16 00:44:55.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.
>    Compile this one with gcc.
> -   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
> +   Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -101,129 +101,130 @@ __gthread_active_p (void)
>  }
>
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_once) (once, func);
> +    return __gthrw_(pthread_once) (__once, __func);
>   else
>     return -1;
>  }
>
>  static inline int
> -__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
> +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_key_create) (key, dtor);
> +    return __gthrw_(pthread_key_create) (__key, __dtor);
>   else
>     return -1;
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t key)
> +__gthread_key_delete (__gthread_key_t __key)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_key_delete) (key);
> +    return __gthrw_(pthread_key_delete) (__key);
>   else
>     return -1;
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_getspecific) (key);
> +    return __gthrw_(pthread_getspecific) (__key);
>   else
>     return NULL;
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_setspecific) (key, ptr);
> +    return __gthrw_(pthread_setspecific) (__key, __ptr);
>   else
>     return -1;
>  }
>
>  static inline int
> -__gthread_mutex_destroy (__gthread_mutex_t *mutex)
> +__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_mutex_destroy) (mutex);
> +    return __gthrw_(pthread_mutex_destroy) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_mutex_lock) (mutex);
> +    return __gthrw_(pthread_mutex_lock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_mutex_trylock) (mutex);
> +    return __gthrw_(pthread_mutex_trylock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthrw_(pthread_mutex_unlock) (mutex);
> +    return __gthrw_(pthread_mutex_unlock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthread_mutex_lock (mutex);
> +    return __gthread_mutex_lock (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthread_mutex_trylock (mutex);
> +    return __gthread_mutex_trylock (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
> -    return __gthread_mutex_unlock (mutex);
> +    return __gthread_mutex_unlock (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__tpf_pthread_active ())
>     {
> -      pthread_mutexattr_t attr;
> -      int r;
> +      pthread_mutexattr_t __attr;
> +      int __r;
>
> -      r = __gthrw_(pthread_mutexattr_init) (&attr);
> -      if (!r)
> -       r = __gthrw_(pthread_mutexattr_settype) (&attr, PTHREAD_MUTEX_RECURSIVE);
> -      if (!r)
> -       r = __gthrw_(pthread_mutex_init) (mutex, &attr);
> -      if (!r)
> -       r = __gthrw_(pthread_mutexattr_destroy) (&attr);
> -      return r;
> +      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
> +                                                  PTHREAD_MUTEX_RECURSIVE);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
> +      return __r;
>     }
>   return 0;
>  }
> --- gcc/gthr-rtems.h.jj 2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-rtems.h    2009-02-16 00:45:02.000000000 +0100
> @@ -1,7 +1,7 @@
>  /* RTEMS threads compatibility routines for libgcc2 and libobjc.
>    by: Rosimildo da Silva( rdasilva@connecttel.com ) */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 1997, 1999, 2000, 2002, 2003, 2005
> +/* Copyright (C) 1997, 1999, 2000, 2002, 2003, 2005, 2008, 2009
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -54,24 +54,24 @@ typedef void *__gthread_recursive_mutex_
>  */
>
>  /* generic per task variables */
> -extern int rtems_gxx_once (__gthread_once_t *once, void (*func) (void));
> -extern int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *));
> -extern int rtems_gxx_key_delete (__gthread_key_t key);
> -extern void *rtems_gxx_getspecific (__gthread_key_t key);
> -extern int rtems_gxx_setspecific (__gthread_key_t key, const void *ptr);
> +extern int rtems_gxx_once (__gthread_once_t *__once, void (*__func) (void));
> +extern int rtems_gxx_key_create (__gthread_key_t *__key, void (*dtor) (void *));
> +extern int rtems_gxx_key_delete (__gthread_key_t __key);
> +extern void *rtems_gxx_getspecific (__gthread_key_t __key);
> +extern int rtems_gxx_setspecific (__gthread_key_t __key, const void *__ptr);
>
>  /* mutex support */
> -extern void rtems_gxx_mutex_init (__gthread_mutex_t *mutex);
> -extern int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex);
> -extern int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex);
> -extern int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex);
> -extern int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex);
> +extern void rtems_gxx_mutex_init (__gthread_mutex_t *__mutex);
> +extern int rtems_gxx_mutex_destroy (__gthread_mutex_t *__mutex);
> +extern int rtems_gxx_mutex_lock (__gthread_mutex_t *__mutex);
> +extern int rtems_gxx_mutex_trylock (__gthread_mutex_t *__mutex);
> +extern int rtems_gxx_mutex_unlock (__gthread_mutex_t *__mutex);
>
>  /* recursive mutex support */
> -extern void rtems_gxx_recursive_mutex_init (__gthread_recursive_mutex_t *mutex);
> -extern int rtems_gxx_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
> -extern int rtems_gxx_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
> -extern int rtems_gxx_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
> +extern void rtems_gxx_recursive_mutex_init (__gthread_recursive_mutex_t *__mutex);
> +extern int rtems_gxx_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex);
> +extern int rtems_gxx_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex);
> +extern int rtems_gxx_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex);
>
>  /* RTEMS threading is always active */
>  static inline int
> @@ -82,75 +82,75 @@ __gthread_active_p (void)
>
>  /* Wrapper calls */
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
> -   return rtems_gxx_once( once, func );
> +   return rtems_gxx_once( __once, __func );
>  }
>
>  static inline int
> -__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
> +__gthread_key_create (__gthread_key_t *__key, void (*dtor) (void *))
>  {
> -  return rtems_gxx_key_create( key, dtor );
> +  return rtems_gxx_key_create( __key, dtor );
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t key)
> +__gthread_key_delete (__gthread_key_t __key)
>  {
> -  return rtems_gxx_key_delete (key);
> +  return rtems_gxx_key_delete (__key);
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
> -  return rtems_gxx_getspecific (key);
> +  return rtems_gxx_getspecific (__key);
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
> -  return rtems_gxx_setspecific (key, ptr);
> +  return rtems_gxx_setspecific (__key, __ptr);
>  }
>
>  static inline int
> -__gthread_mutex_destroy (__gthread_mutex_t *mutex)
> +__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
>  {
> -  return rtems_gxx_mutex_destroy (mutex);
> +  return rtems_gxx_mutex_destroy (__mutex);
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
> -    return rtems_gxx_mutex_lock (mutex);
> +    return rtems_gxx_mutex_lock (__mutex);
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
> -    return rtems_gxx_mutex_trylock (mutex);
> +    return rtems_gxx_mutex_trylock (__mutex);
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
> -    return rtems_gxx_mutex_unlock( mutex );
> +    return rtems_gxx_mutex_unlock( __mutex );
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
> -    return rtems_gxx_recursive_mutex_lock (mutex);
> +    return rtems_gxx_recursive_mutex_lock (__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
> -    return rtems_gxx_recursive_mutex_trylock (mutex);
> +    return rtems_gxx_recursive_mutex_trylock (__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
> -    return rtems_gxx_recursive_mutex_unlock( mutex );
> +    return rtems_gxx_recursive_mutex_unlock( __mutex );
>  }
>
>  #ifdef __cplusplus
> --- gcc/gthr-nks.h.jj   2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-nks.h      2009-02-16 00:45:07.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
> +/* Copyright (C) 2002, 2003, 2004, 2008, 2009 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -281,118 +281,118 @@ typedef volatile long __gthread_once_t;
>  #define __GTHREAD_ONCE_INIT 0
>
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
> -  if (__compare_and_swap (once, 0, 1))
> +  if (__compare_and_swap (__once, 0, 1))
>   {
> -    func();
> -    *once |= 2;
> +    __func ();
> +    *__once |= 2;
>   }
>   else
>   {
> -    while (!(*once & 2))
> +    while (!(*__once & 2))
>       NXThreadYield ();
>   }
>   return 0;
>  }
>
>  static inline int
> -__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
> +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
>  {
> -  return NXKeyCreate (dtor, NULL, key);
> +  return NXKeyCreate (__dtor, NULL, __key);
>  }
>
>  static inline int
> -__gthread_key_dtor (__gthread_key_t key, void *ptr)
> +__gthread_key_dtor (__gthread_key_t __key, void *__ptr)
>  {
>   /* Just reset the key value to zero. */
> -  if (ptr)
> -    return NXKeySetValue (key, NULL);
> +  if (__ptr)
> +    return NXKeySetValue (__key, NULL);
>   return 0;
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t key)
> +__gthread_key_delete (__gthread_key_t __key)
>  {
> -  return NXKeyDelete (key);
> +  return NXKeyDelete (__key);
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
> -  void *value;
> +  void *__value;
>
> -  if (NXKeyGetValue (key, &value) == 0)
> -    return value;
> +  if (NXKeyGetValue (__key, &__value) == 0)
> +    return __value;
>   return NULL;
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
> -  return NXKeySetValue (key, (void *)ptr);
> +  return NXKeySetValue (__key, (void *)__ptr);
>  }
>
>  static inline void
> -__gthread_mutex_init_function (__gthread_mutex_t *mutex)
> +__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
>  {
> -  static const NX_LOCK_INFO_ALLOC (info, "GTHREADS", 0);
> +  static const NX_LOCK_INFO_ALLOC (__info, "GTHREADS", 0);
>
> -  *mutex = NXMutexAlloc (0, 0, &info);
> +  *__mutex = NXMutexAlloc (0, 0, &__info);
>  }
>
>  static inline int
> -__gthread_mutex_destroy (__gthread_mutex_t * UNUSED(mutex))
> +__gthread_mutex_destroy (__gthread_mutex_t * UNUSED(__mutex))
>  {
>   return 0;
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
> -  return NXLock (*mutex);
> +  return NXLock (*__mutex);
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
> -  if (NXTryLock (*mutex))
> +  if (NXTryLock (*__mutex))
>     return 0;
>   return -1;
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
> -  return NXUnlock (*mutex);
> +  return NXUnlock (*__mutex);
>  }
>
>  static inline void
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
> -  static const NX_LOCK_INFO_ALLOC (info, "GTHREADS", 0);
> +  static const NX_LOCK_INFO_ALLOC (__info, "GTHREADS", 0);
>
> -  *mutex = NXMutexAlloc (NX_MUTEX_RECURSIVE, 0, &info);
> +  *__mutex = NXMutexAlloc (NX_MUTEX_RECURSIVE, 0, &__info);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return NXLock (*mutex);
> +  return NXLock (*__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  if (NXTryLock (*mutex))
> +  if (NXTryLock (*__mutex))
>     return 0;
>   return -1;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return NXUnlock (*mutex);
> +  return NXUnlock (*__mutex);
>  }
>
>  #endif /* _LIBOBJC */
> --- gcc/gthr-mipssde.h.jj       2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-mipssde.h  2009-02-16 00:45:12.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* MIPS SDE threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
> +/* Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
>    Contributed by Nigel Stephens <nigel@mips.com>
>
>  This file is part of GCC.
> @@ -55,7 +55,7 @@ typedef struct {
>  #define __GTHREAD_MUTEX_INIT __SDETHREAD_MUTEX_INITIALIZER("gthr")
>  #define __GTHREAD_ONCE_INIT __SDETHREAD_ONCE_INIT
>  static inline int
> -__gthread_recursive_mutex_init_function(__gthread_recursive_mutex_t *mutex);
> +__gthread_recursive_mutex_init_function(__gthread_recursive_mutex_t *__mutex);
>  #define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
>
>  #if SUPPORTS_WEAK && GTHREAD_USE_WEAK
> @@ -168,59 +168,59 @@ __gthread_mutex_unlock (__gthread_mutex_
>  }
>
>  static inline int
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
> -  mutex->depth = 0;
> -  mutex->owner = __gthrw_(__sdethread_self) ();
> -  return __gthrw_(__sdethread_mutex_init) (&mutex->actual, NULL);
> +  __mutex->depth = 0;
> +  __mutex->owner = __gthrw_(__sdethread_self) ();
> +  return __gthrw_(__sdethread_mutex_init) (&__mutex->actual, NULL);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      __sdethread_t me = __gthrw_(__sdethread_self) ();
> +      __sdethread_t __me = __gthrw_(__sdethread_self) ();
>
> -      if (mutex->owner != me)
> +      if (__mutex->owner != __me)
>        {
> -         __gthrw_(__sdethread_mutex_lock) (&mutex->actual);
> -         mutex->owner = me;
> +         __gthrw_(__sdethread_mutex_lock) (&__mutex->actual);
> +         __mutex->owner = __me;
>        }
>
> -      mutex->depth++;
> +      __mutex->depth++;
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      __sdethread_t me = __gthrw_(__sdethread_self) ();
> +      __sdethread_t __me = __gthrw_(__sdethread_self) ();
>
> -      if (mutex->owner != me)
> +      if (__mutex->owner != __me)
>        {
> -         if (__gthrw_(__sdethread_mutex_trylock) (&mutex->actual))
> +         if (__gthrw_(__sdethread_mutex_trylock) (&__mutex->actual))
>            return 1;
> -         mutex->owner = me;
> +         __mutex->owner = __me;
>        }
>
> -      mutex->depth++;
> +      __mutex->depth++;
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      if (--mutex->depth == 0)
> +      if (--__mutex->depth == 0)
>        {
> -          mutex->owner = (__sdethread_t) 0;
> -          __gthrw_(__sdethread_mutex_unlock) (&mutex->actual);
> +          __mutex->owner = (__sdethread_t) 0;
> +          __gthrw_(__sdethread_mutex_unlock) (&__mutex->actual);
>        }
>     }
>   return 0;
> --- gcc/gthr-solaris.h.jj       2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-solaris.h  2009-02-16 00:45:17.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 1997, 1999, 2000, 2004, 2005, 2006
> +/* Copyright (C) 1997, 1999, 2000, 2004, 2005, 2006, 2008, 2009
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -403,154 +403,155 @@ __gthread_objc_condition_signal (objc_co
>  #else /* _LIBOBJC */
>
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
>   if (! __gthread_active_p ())
>     return -1;
>
> -  if (once == 0 || func == 0)
> +  if (__once == 0 || __func == 0)
>     return EINVAL;
>
> -  if (once->once == 0)
> +  if (__once->once == 0)
>     {
> -      int status = __gthrw_(mutex_lock) (&once->mutex);
> -      if (status != 0)
> -       return status;
> -      if (once->once == 0)
> +      int __status = __gthrw_(mutex_lock) (&__once->mutex);
> +      if (__status != 0)
> +       return __status;
> +      if (__once->once == 0)
>        {
> -         (*func) ();
> -         once->once++;
> +         (*__func) ();
> +         __once->once++;
>        }
> -      __gthrw_(mutex_unlock) (&once->mutex);
> +      __gthrw_(mutex_unlock) (&__once->mutex);
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
> +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
>  {
>   /* Solaris 2.5 contains thr_* routines no-op in libc, so test if we actually
>      got a reasonable key value, and if not, fail.  */
> -  *key = (__gthread_key_t)-1;
> -  if (__gthrw_(thr_keycreate) (key, dtor) != 0 || *key == (__gthread_key_t)-1)
> +  *__key = (__gthread_key_t)-1;
> +  if (__gthrw_(thr_keycreate) (__key, __dtor) != 0
> +      || *__key == (__gthread_key_t)-1)
>     return -1;
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t UNUSED (key))
> +__gthread_key_delete (__gthread_key_t UNUSED (__key))
>  {
>   /* Not possible.  */
>   return -1;
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
>   void *ptr;
> -  if (__gthrw_(thr_getspecific) (key, &ptr) == 0)
> +  if (__gthrw_(thr_getspecific) (__key, &ptr) == 0)
>     return ptr;
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
> -  return __gthrw_(thr_setspecific) (key, (void *) ptr);
> +  return __gthrw_(thr_setspecific) (__key, (void *) __ptr);
>  }
>
>  static inline int
> -__gthread_mutex_destroy (__gthread_mutex_t * UNUSED(mutex))
> +__gthread_mutex_destroy (__gthread_mutex_t * UNUSED(__mutex))
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(mutex_destroy) (mutex);
> +    return __gthrw_(mutex_destroy) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(mutex_lock) (mutex);
> +    return __gthrw_(mutex_lock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(mutex_trylock) (mutex);
> +    return __gthrw_(mutex_trylock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(mutex_unlock) (mutex);
> +    return __gthrw_(mutex_unlock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
> -  mutex->depth = 0;
> -  mutex->owner = (thread_t) 0;
> -  return __gthrw_(mutex_init) (&mutex->actual, USYNC_THREAD, 0);
> +  __mutex->depth = 0;
> +  __mutex->owner = (thread_t) 0;
> +  return __gthrw_(mutex_init) (&__mutex->actual, USYNC_THREAD, 0);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      thread_t me = __gthrw_(thr_self) ();
> +      thread_t __me = __gthrw_(thr_self) ();
>
> -      if (mutex->owner != me)
> +      if (__mutex->owner != __me)
>        {
> -         __gthrw_(mutex_lock) (&mutex->actual);
> -         mutex->owner = me;
> +         __gthrw_(mutex_lock) (&__mutex->actual);
> +         __mutex->owner = __me;
>        }
>
> -      mutex->depth++;
> +      __mutex->depth++;
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      thread_t me = __gthrw_(thr_self) ();
> +      thread_t __me = __gthrw_(thr_self) ();
>
> -      if (mutex->owner != me)
> +      if (__mutex->owner != __me)
>        {
> -         if (__gthrw_(mutex_trylock) (&mutex->actual))
> +         if (__gthrw_(mutex_trylock) (&__mutex->actual))
>            return 1;
> -         mutex->owner = me;
> +         __mutex->owner = __me;
>        }
>
> -      mutex->depth++;
> +      __mutex->depth++;
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      if (--mutex->depth == 0)
> +      if (--__mutex->depth == 0)
>        {
> -          mutex->owner = (thread_t) 0;
> -          __gthrw_(mutex_unlock) (&mutex->actual);
> +          __mutex->owner = (thread_t) 0;
> +          __gthrw_(mutex_unlock) (&__mutex->actual);
>        }
>     }
>   return 0;
> --- gcc/gthr-single.h.jj        2008-12-06 18:09:15.000000000 +0100
> +++ gcc/gthr-single.h   2009-02-16 00:26:53.000000000 +0100
> @@ -1,6 +1,7 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 1997, 1999, 2000, 2004, 2008 Free Software Foundation, Inc.
> +/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
> +   Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -216,75 +217,75 @@ __gthread_active_p (void)
>  }
>
>  static inline int
> -__gthread_once (__gthread_once_t *once UNUSED, void (*func) (void) UNUSED)
> +__gthread_once (__gthread_once_t *__once UNUSED, void (*__func) (void) UNUSED)
>  {
>   return 0;
>  }
>
>  static inline int UNUSED
> -__gthread_key_create (__gthread_key_t *key UNUSED, void (*func) (void *) UNUSED)
> +__gthread_key_create (__gthread_key_t *__key UNUSED, void (*__func) (void *) UNUSED)
>  {
>   return 0;
>  }
>
>  static int UNUSED
> -__gthread_key_delete (__gthread_key_t key UNUSED)
> +__gthread_key_delete (__gthread_key_t __key UNUSED)
>  {
>   return 0;
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key UNUSED)
> +__gthread_getspecific (__gthread_key_t __key UNUSED)
>  {
>   return 0;
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key UNUSED, const void *v UNUSED)
> +__gthread_setspecific (__gthread_key_t __key UNUSED, const void *__v UNUSED)
>  {
>   return 0;
>  }
>
>  static inline int
> -__gthread_mutex_destroy (__gthread_mutex_t *mutex UNUSED)
> +__gthread_mutex_destroy (__gthread_mutex_t *__mutex UNUSED)
>  {
>   return 0;
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex UNUSED)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex UNUSED)
>  {
>   return 0;
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex UNUSED)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex UNUSED)
>  {
>   return 0;
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex UNUSED)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex UNUSED)
>  {
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_lock (mutex);
> +  return __gthread_mutex_lock (__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_trylock (mutex);
> +  return __gthread_mutex_trylock (__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_unlock (mutex);
> +  return __gthread_mutex_unlock (__mutex);
>  }
>
>  #endif /* _LIBOBJC */
> --- gcc/gthr-dce.h.jj   2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-dce.h      2009-02-16 00:45:22.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 1997, 1999, 2000, 2001, 2004, 2005
> +/* Copyright (C) 1997, 1999, 2000, 2001, 2004, 2005, 2008, 2009
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -431,122 +431,123 @@ __gthread_objc_condition_signal (objc_co
>  #else /* _LIBOBJC */
>
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_once) (once, func);
> +    return __gthrw_(pthread_once) (__once, __func);
>   else
>     return -1;
>  }
>
>  static inline int
> -__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
> +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
>  {
> -  return __gthrw_(pthread_keycreate) (key, dtor);
> +  return __gthrw_(pthread_keycreate) (__key, __dtor);
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t key __attribute__ ((__unused__)))
> +__gthread_key_delete (__gthread_key_t __key __attribute__ ((__unused__)))
>  {
>   /* Operation is not supported.  */
>   return -1;
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
> -  void *ptr;
> -  if (__gthrw_(pthread_getspecific) (key, &ptr) == 0)
> -    return ptr;
> +  void *__ptr;
> +  if (__gthrw_(pthread_getspecific) (__key, &__ptr) == 0)
> +    return __ptr;
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
> -  return __gthrw_(pthread_setspecific) (key, (void *) ptr);
> +  return __gthrw_(pthread_setspecific) (__key, (void *) __ptr);
>  }
>
>  static inline void
> -__gthread_mutex_init_function (__gthread_mutex_t *mutex)
> +__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    __gthrw_(pthread_mutex_init) (mutex, pthread_mutexattr_default);
> +    __gthrw_(pthread_mutex_init) (__mutex, pthread_mutexattr_default);
>  }
>
>  static inline int
> -__gthread_mutx_destroy (__gthread_mutex_t *mutex)
> +__gthread_mutx_destroy (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_destroy) (mutex);
> +    return __gthrw_(pthread_mutex_destroy) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_lock) (mutex);
> +    return __gthrw_(pthread_mutex_lock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_trylock) (mutex);
> +    return __gthrw_(pthread_mutex_trylock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_unlock) (mutex);
> +    return __gthrw_(pthread_mutex_unlock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      pthread_mutexattr_t attr;
> -      int r;
> +      pthread_mutexattr_t __attr;
> +      int __r;
>
> -      r = __gthrw_(pthread_mutexattr_create) (&attr);
> -      if (!r)
> -       r = __gthrw_(pthread_mutexattr_setkind_np) (&attr, MUTEX_RECURSIVE_NP);
> -      if (!r)
> -       r = __gthrw_(pthread_mutex_init) (mutex, attr);
> -      if (!r)
> -       r = __gthrw_(pthread_mutexattr_delete) (&attr);
> -      return r;
> +      __r = __gthrw_(pthread_mutexattr_create) (&__attr);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutexattr_setkind_np) (&__attr,
> +                                                     MUTEX_RECURSIVE_NP);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutex_init) (__mutex, __attr);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutexattr_delete) (&__attr);
> +      return __r;
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_lock (mutex);
> +  return __gthread_mutex_lock (__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_trylock (mutex);
> +  return __gthread_mutex_trylock (__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_unlock (mutex);
> +  return __gthread_mutex_unlock (__mutex);
>  }
>
>  #endif /* _LIBOBJC */
> --- gcc/gthr-gnat.h.jj  2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-gnat.h     2009-02-16 00:45:27.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* Threads compatibility routines for libgcc2.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
> +/* Copyright (C) 2003, 2004, 2008, 2009 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -38,7 +38,7 @@ typedef int __gthread_mutex_t;
>
>  #define __GTHREAD_MUTEX_INIT 0
>
> -extern void __gnat_install_locks (void (*lock) (void), void (*unlock) (void));
> +extern void __gnat_install_locks (void (*) (void), void (*) (void));
>  extern int __gthread_active_p (void);
>  extern int __gthread_mutex_lock (__gthread_mutex_t *);
>  extern int __gthread_mutex_unlock (__gthread_mutex_t *);
> --- gcc/gthr-win32.h.jj 2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-win32.h    2009-02-16 00:45:33.000000000 +0100
> @@ -1,7 +1,7 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
>
> -/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005
> +/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2008, 2009
>    Free Software Foundation, Inc.
>    Contributed by Mumit Khan <khan@xraylith.wisc.edu>.
>
> @@ -541,19 +541,19 @@ __gthread_recursive_mutex_unlock (__gthr
>  #include <errno.h>
>
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
>   if (! __gthread_active_p ())
>     return -1;
> -  else if (once == NULL || func == NULL)
> +  else if (__once == NULL || __func == NULL)
>     return EINVAL;
>
> -  if (! once->done)
> +  if (! __once->done)
>     {
> -      if (InterlockedIncrement (&(once->started)) == 0)
> +      if (InterlockedIncrement (&(__once->started)) == 0)
>        {
> -         (*func) ();
> -         once->done = TRUE;
> +         (*__func) ();
> +         __once->done = TRUE;
>        }
>       else
>        {
> @@ -562,7 +562,7 @@ __gthread_once (__gthread_once_t *once,
>             does become an issue, the solution is to use an Event that
>             we wait on here (and set above), but that implies a place to
>             create the event before this routine is called.  */
> -         while (! once->done)
> +         while (! __once->done)
>            Sleep (0);
>        }
>     }
> @@ -574,150 +574,150 @@ __gthread_once (__gthread_once_t *once,
>    leaks, especially in threaded applications making extensive use of
>    C++ EH. Mingw uses a thread-support DLL to work-around this problem.  */
>  static inline int
> -__gthread_key_create (__gthread_key_t *key,
> -                     void (*dtor) (void *) __attribute__((unused)))
> +__gthread_key_create (__gthread_key_t *__key,
> +                     void (*__dtor) (void *) __attribute__((unused)))
>  {
> -  int status = 0;
> -  DWORD tls_index = TlsAlloc ();
> -  if (tls_index != 0xFFFFFFFF)
> +  int __status = 0;
> +  DWORD __tls_index = TlsAlloc ();
> +  if (__tls_index != 0xFFFFFFFF)
>     {
> -      *key = tls_index;
> +      *__key = __tls_index;
>  #ifdef MINGW32_SUPPORTS_MT_EH
>       /* Mingw runtime will run the dtors in reverse order for each thread
>          when the thread exits.  */
> -      status = __mingwthr_key_dtor (*key, dtor);
> +      __status = __mingwthr_key_dtor (*__key, __dtor);
>  #endif
>     }
>   else
> -    status = (int) GetLastError ();
> -  return status;
> +    __status = (int) GetLastError ();
> +  return __status;
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t key)
> +__gthread_key_delete (__gthread_key_t __key)
>  {
> -  return (TlsFree (key) != 0) ? 0 : (int) GetLastError ();
> +  return (TlsFree (__key) != 0) ? 0 : (int) GetLastError ();
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
> -  DWORD lasterror;
> -  void *ptr;
> +  DWORD __lasterror;
> +  void *__ptr;
>
> -  lasterror = GetLastError ();
> +  __lasterror = GetLastError ();
>
> -  ptr = TlsGetValue (key);
> +  __ptr = TlsGetValue (__key);
>
> -  SetLastError (lasterror);
> +  SetLastError (__lasterror);
>
> -  return ptr;
> +  return __ptr;
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
> -  if (TlsSetValue (key, CONST_CAST2(void *, const void *, ptr)) != 0)
> +  if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) != 0)
>     return 0;
>   else
>     return GetLastError ();
>  }
>
>  static inline void
> -__gthread_mutex_init_function (__gthread_mutex_t *mutex)
> +__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
>  {
> -  mutex->counter = -1;
> -  mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL);
> +  __mutex->counter = -1;
> +  __mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL);
>  }
>
>  static inline void
> -__gthread_mutex_destroy (__gthread_mutex_t *mutex)
> +__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
>  {
> -  CloseHandle ((HANDLE) mutex->sema);
> +  CloseHandle ((HANDLE) __mutex->sema);
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
> -  int status = 0;
> +  int __status = 0;
>
>   if (__gthread_active_p ())
>     {
> -      if (InterlockedIncrement (&mutex->counter) == 0 ||
> -         WaitForSingleObject (mutex->sema, INFINITE) == WAIT_OBJECT_0)
> -       status = 0;
> +      if (InterlockedIncrement (&__mutex->counter) == 0 ||
> +         WaitForSingleObject (__mutex->sema, INFINITE) == WAIT_OBJECT_0)
> +       __status = 0;
>       else
>        {
>          /* WaitForSingleObject returns WAIT_FAILED, and we can only do
>             some best-effort cleanup here.  */
> -         InterlockedDecrement (&mutex->counter);
> -         status = 1;
> +         InterlockedDecrement (&__mutex->counter);
> +         __status = 1;
>        }
>     }
> -  return status;
> +  return __status;
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
> -  int status = 0;
> +  int __status = 0;
>
>   if (__gthread_active_p ())
>     {
> -      if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0)
> -       status = 0;
> +      if (__GTHR_W32_InterlockedCompareExchange (&__mutex->counter, 0, -1) < 0)
> +       __status = 0;
>       else
> -       status = 1;
> +       __status = 1;
>     }
> -  return status;
> +  return __status;
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      if (InterlockedDecrement (&mutex->counter) >= 0)
> -       return ReleaseSemaphore (mutex->sema, 1, NULL) ? 0 : 1;
> +      if (InterlockedDecrement (&__mutex->counter) >= 0)
> +       return ReleaseSemaphore (__mutex->sema, 1, NULL) ? 0 : 1;
>     }
>   return 0;
>  }
>
>  static inline void
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
> -  mutex->counter = -1;
> -  mutex->depth = 0;
> -  mutex->owner = 0;
> -  mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL);
> +  __mutex->counter = -1;
> +  __mutex->depth = 0;
> +  __mutex->owner = 0;
> +  __mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      DWORD me = GetCurrentThreadId();
> -      if (InterlockedIncrement (&mutex->counter) == 0)
> +      DWORD __me = GetCurrentThreadId();
> +      if (InterlockedIncrement (&__mutex->counter) == 0)
>        {
> -         mutex->depth = 1;
> -         mutex->owner = me;
> +         __mutex->depth = 1;
> +         __mutex->owner = __me;
>        }
> -      else if (mutex->owner == me)
> +      else if (__mutex->owner == __me)
>        {
> -         InterlockedDecrement (&mutex->counter);
> -         ++(mutex->depth);
> +         InterlockedDecrement (&__mutex->counter);
> +         ++(__mutex->depth);
>        }
> -      else if (WaitForSingleObject (mutex->sema, INFINITE) == WAIT_OBJECT_0)
> +      else if (WaitForSingleObject (__mutex->sema, INFINITE) == WAIT_OBJECT_0)
>        {
> -         mutex->depth = 1;
> -         mutex->owner = me;
> +         __mutex->depth = 1;
> +         __mutex->owner = __me;
>        }
>       else
>        {
>          /* WaitForSingleObject returns WAIT_FAILED, and we can only do
>             some best-effort cleanup here.  */
> -         InterlockedDecrement (&mutex->counter);
> +         InterlockedDecrement (&__mutex->counter);
>          return 1;
>        }
>     }
> @@ -725,18 +725,18 @@ __gthread_recursive_mutex_lock (__gthrea
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      DWORD me = GetCurrentThreadId();
> -      if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0)
> +      DWORD __me = GetCurrentThreadId();
> +      if (__GTHR_W32_InterlockedCompareExchange (&__mutex->counter, 0, -1) < 0)
>        {
> -         mutex->depth = 1;
> -         mutex->owner = me;
> +         __mutex->depth = 1;
> +         __mutex->owner = __me;
>        }
> -      else if (mutex->owner == me)
> -       ++(mutex->depth);
> +      else if (__mutex->owner == __me)
> +       ++(__mutex->depth);
>       else
>        return 1;
>     }
> @@ -744,17 +744,17 @@ __gthread_recursive_mutex_trylock (__gth
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      --(mutex->depth);
> -      if (mutex->depth == 0)
> +      --(__mutex->depth);
> +      if (__mutex->depth == 0)
>        {
> -         mutex->owner = 0;
> +         __mutex->owner = 0;
>
> -         if (InterlockedDecrement (&mutex->counter) >= 0)
> -           return ReleaseSemaphore (mutex->sema, 1, NULL) ? 0 : 1;
> +         if (InterlockedDecrement (&__mutex->counter) >= 0)
> +           return ReleaseSemaphore (__mutex->sema, 1, NULL) ? 0 : 1;
>        }
>     }
>   return 0;
> --- gcc/gthr-vxworks.h.jj       2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-vxworks.h  2009-02-16 00:45:39.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* Threads compatibility routines for libgcc2 and libobjc for VxWorks.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
> +/* Copyright (C) 1997, 1999, 2000, 2008, 2009 Free Software Foundation, Inc.
>    Contributed by Mike Stump <mrs@wrs.com>.
>
>  This file is part of GCC.
> @@ -131,7 +131,7 @@ __gthread_once_t;
>  # define __GTHREAD_ONCE_INIT { 0 }
>  #endif
>
> -extern int __gthread_once (__gthread_once_t *once, void (*func)(void));
> +extern int __gthread_once (__gthread_once_t *__once, void (*__func)(void));
>
>  /* Thread-specific data requires a great deal of effort, since VxWorks
>    is not really set up for it.  See config/vxlib.c for the gory
> @@ -140,11 +140,11 @@ extern int __gthread_once (__gthread_onc
>
>  typedef unsigned int __gthread_key_t;
>
> -extern int __gthread_key_create (__gthread_key_t *keyp, void (*dtor)(void *));
> -extern int __gthread_key_delete (__gthread_key_t key);
> +extern int __gthread_key_create (__gthread_key_t *__keyp, void (*__dtor)(void *));
> +extern int __gthread_key_delete (__gthread_key_t __key);
>
> -extern void *__gthread_getspecific (__gthread_key_t key);
> -extern int __gthread_setspecific (__gthread_key_t key, void *ptr);
> +extern void *__gthread_getspecific (__gthread_key_t __key);
> +extern int __gthread_setspecific (__gthread_key_t __key, void *__ptr);
>
>  #undef UNUSED
>
> --- gcc/gthr-posix.h.jj 2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-posix.h    2009-02-16 00:45:45.000000000 +0100
> @@ -1,7 +1,7 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
> -   Free Software Foundation, Inc.
> +/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
> +   2008, 2009 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -267,7 +267,7 @@ __gthread_active_p (void)
>  static volatile int __gthread_active = -1;
>
>  static void *
> -__gthread_start (void *arg __attribute__((unused)))
> +__gthread_start (void *__arg __attribute__((unused)))
>  {
>   return NULL;
>  }
> @@ -277,21 +277,21 @@ static void
>  __gthread_active_init (void)
>  {
>   static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
> -  pthread_t t;
> -  pthread_attr_t a;
> -  int result;
> +  pthread_t __t;
> +  pthread_attr_t __a;
> +  int __result;
>
>   __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
>   if (__gthread_active < 0)
>     {
> -      __gthrw_(pthread_attr_init) (&a);
> -      __gthrw_(pthread_attr_setdetachstate) (&a, PTHREAD_CREATE_DETACHED);
> -      result = __gthrw_(pthread_create) (&t, &a, __gthread_start, NULL);
> -      if (result != ENOSYS)
> +      __gthrw_(pthread_attr_init) (&__a);
> +      __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
> +      __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
> +      if (__result != ENOSYS)
>        __gthread_active = 1;
>       else
>        __gthread_active = 0;
> -      __gthrw_(pthread_attr_destroy) (&a);
> +      __gthrw_(pthread_attr_destroy) (&__a);
>     }
>   __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
>  }
> @@ -676,27 +676,28 @@ __gthread_objc_condition_signal (objc_co
>  #else /* _LIBOBJC */
>
>  static inline int
> -__gthread_create (__gthread_t *thread, void *(*func) (void*), void *args)
> +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
> +                 void *__args)
>  {
> -  return __gthrw_(pthread_create) (thread, NULL, func, args);
> +  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
>  }
>
>  static inline int
> -__gthread_join (__gthread_t thread, void **value_ptr)
> +__gthread_join (__gthread_t __threadid, void **__value_ptr)
>  {
> -  return __gthrw_(pthread_join) (thread, value_ptr);
> +  return __gthrw_(pthread_join) (__threadid, __value_ptr);
>  }
>
>  static inline int
> -__gthread_detach (__gthread_t thread)
> +__gthread_detach (__gthread_t __threadid)
>  {
> -  return __gthrw_(pthread_detach) (thread);
> +  return __gthrw_(pthread_detach) (__threadid);
>  }
>
>  static inline int
> -__gthread_equal (__gthread_t t1, __gthread_t t2)
> +__gthread_equal (__gthread_t __t1, __gthread_t __t2)
>  {
> -  return __gthrw_(pthread_equal) (t1, t2);
> +  return __gthrw_(pthread_equal) (__t1, __t2);
>  }
>
>  static inline __gthread_t
> @@ -712,61 +713,61 @@ __gthread_yield (void)
>  }
>
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_once) (once, func);
> +    return __gthrw_(pthread_once) (__once, __func);
>   else
>     return -1;
>  }
>
>  static inline int
> -__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
> +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
>  {
> -  return __gthrw_(pthread_key_create) (key, dtor);
> +  return __gthrw_(pthread_key_create) (__key, __dtor);
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t key)
> +__gthread_key_delete (__gthread_key_t __key)
>  {
> -  return __gthrw_(pthread_key_delete) (key);
> +  return __gthrw_(pthread_key_delete) (__key);
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
> -  return __gthrw_(pthread_getspecific) (key);
> +  return __gthrw_(pthread_getspecific) (__key);
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
> -  return __gthrw_(pthread_setspecific) (key, ptr);
> +  return __gthrw_(pthread_setspecific) (__key, __ptr);
>  }
>
>  static inline int
> -__gthread_mutex_destroy (__gthread_mutex_t *mutex)
> +__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_destroy) (mutex);
> +    return __gthrw_(pthread_mutex_destroy) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_lock) (mutex);
> +    return __gthrw_(pthread_mutex_lock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_trylock) (mutex);
> +    return __gthrw_(pthread_mutex_trylock) (__mutex);
>   else
>     return 0;
>  }
> @@ -774,11 +775,11 @@ __gthread_mutex_trylock (__gthread_mutex
>  #ifdef _POSIX_TIMEOUTS
>  #if _POSIX_TIMEOUTS >= 0
>  static inline int
> -__gthread_mutex_timedlock (__gthread_mutex_t *mutex,
> -                          const __gthread_time_t *abs_timeout)
> +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
> +                          const __gthread_time_t *__abs_timeout)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_timedlock) (mutex, abs_timeout);
> +    return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
>   else
>     return 0;
>  }
> @@ -786,109 +787,110 @@ __gthread_mutex_timedlock (__gthread_mut
>  #endif
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_unlock) (mutex);
> +    return __gthrw_(pthread_mutex_unlock) (__mutex);
>   else
>     return 0;
>  }
>
>  #ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
>  static inline int
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      pthread_mutexattr_t attr;
> -      int r;
> +      pthread_mutexattr_t __attr;
> +      int __r;
>
> -      r = __gthrw_(pthread_mutexattr_init) (&attr);
> -      if (!r)
> -       r = __gthrw_(pthread_mutexattr_settype) (&attr, PTHREAD_MUTEX_RECURSIVE);
> -      if (!r)
> -       r = __gthrw_(pthread_mutex_init) (mutex, &attr);
> -      if (!r)
> -       r = __gthrw_(pthread_mutexattr_destroy) (&attr);
> -      return r;
> +      __r = __gthrw_(pthread_mutexattr_init) (&__attr);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
> +                                                  PTHREAD_MUTEX_RECURSIVE);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
> +      if (!__r)
> +       __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
> +      return __r;
>     }
>   return 0;
>  }
>  #endif
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_lock (mutex);
> +  return __gthread_mutex_lock (__mutex);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_trylock (mutex);
> +  return __gthread_mutex_trylock (__mutex);
>  }
>
>  #ifdef _POSIX_TIMEOUTS
>  #if _POSIX_TIMEOUTS >= 0
>  static inline int
> -__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *mutex,
> -                                    const __gthread_time_t *abs_timeout)
> +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
> +                                    const __gthread_time_t *__abs_timeout)
>  {
> -  return __gthread_mutex_timedlock (mutex, abs_timeout);
> +  return __gthread_mutex_timedlock (__mutex, __abs_timeout);
>  }
>  #endif
>  #endif
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_mutex_unlock (mutex);
> +  return __gthread_mutex_unlock (__mutex);
>  }
>
>  static inline int
> -__gthread_cond_broadcast (__gthread_cond_t *cond)
> +__gthread_cond_broadcast (__gthread_cond_t *__cond)
>  {
> -  return __gthrw_(pthread_cond_broadcast) (cond);
> +  return __gthrw_(pthread_cond_broadcast) (__cond);
>  }
>
>  static inline int
> -__gthread_cond_signal (__gthread_cond_t *cond)
> +__gthread_cond_signal (__gthread_cond_t *__cond)
>  {
> -  return __gthrw_(pthread_cond_signal) (cond);
> +  return __gthrw_(pthread_cond_signal) (__cond);
>  }
>
>  static inline int
> -__gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex)
> +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
>  {
> -  return __gthrw_(pthread_cond_wait) (cond, mutex);
> +  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
>  }
>
>  static inline int
> -__gthread_cond_timedwait (__gthread_cond_t *cond, __gthread_mutex_t *mutex,
> -                         const __gthread_time_t *abs_timeout)
> +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
> +                         const __gthread_time_t *__abs_timeout)
>  {
> -  return __gthrw_(pthread_cond_timedwait) (cond, mutex, abs_timeout);
> +  return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
>  }
>
>  static inline int
> -__gthread_cond_wait_recursive (__gthread_cond_t *cond,
> -                              __gthread_recursive_mutex_t *mutex)
> +__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
> +                              __gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthread_cond_wait (cond, mutex);
> +  return __gthread_cond_wait (__cond, __mutex);
>  }
>
>  static inline int
> -__gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
> -                                   __gthread_recursive_mutex_t *mutex,
> -                                   const __gthread_time_t *abs_timeout)
> +__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
> +                                   __gthread_recursive_mutex_t *__mutex,
> +                                   const __gthread_time_t *__abs_timeout)
>  {
> -  return __gthread_cond_timedwait (cond, mutex, abs_timeout);
> +  return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
>  }
>
>  static inline int
> -__gthread_cond_destroy (__gthread_cond_t* cond)
> +__gthread_cond_destroy (__gthread_cond_t* __cond)
>  {
> -  return __gthrw_(pthread_cond_destroy) (cond);
> +  return __gthrw_(pthread_cond_destroy) (__cond);
>  }
>
>  #endif /* _LIBOBJC */
> --- gcc/gthr-posix95.h.jj       2008-09-30 16:57:11.000000000 +0200
> +++ gcc/gthr-posix95.h  2009-02-16 00:45:53.000000000 +0100
> @@ -1,6 +1,6 @@
>  /* Threads compatibility routines for libgcc2 and libobjc.  */
>  /* Compile this one with gcc.  */
> -/* Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
> +/* Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -610,150 +610,150 @@ __gthread_objc_condition_signal (objc_co
>  #else /* _LIBOBJC */
>
>  static inline int
> -__gthread_once (__gthread_once_t *once, void (*func) (void))
> +__gthread_once (__gthread_once_t *__once, void (*__func) (void))
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_once) (once, func);
> +    return __gthrw_(pthread_once) (__once, __func);
>   else
>     return -1;
>  }
>
>  static inline int
> -__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
> +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
>  {
> -  return __gthrw_(pthread_key_create) (key, dtor);
> +  return __gthrw_(pthread_key_create) (__key, __dtor);
>  }
>
>  static inline int
> -__gthread_key_delete (__gthread_key_t key)
> +__gthread_key_delete (__gthread_key_t __key)
>  {
> -  return __gthrw_(pthread_key_delete) (key);
> +  return __gthrw_(pthread_key_delete) (__key);
>  }
>
>  static inline void *
> -__gthread_getspecific (__gthread_key_t key)
> +__gthread_getspecific (__gthread_key_t __key)
>  {
> -  return __gthrw_(pthread_getspecific) (key);
> +  return __gthrw_(pthread_getspecific) (__key);
>  }
>
>  static inline int
> -__gthread_setspecific (__gthread_key_t key, const void *ptr)
> +__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
>  {
> -  return __gthrw_(pthread_setspecific) (key, ptr);
> +  return __gthrw_(pthread_setspecific) (__key, __ptr);
>  }
>
>  static inline int
> -__gthread_mutex_destroy (__gthread_mutex_t *mutex)
> +__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_destroy) (mutex);
> +    return __gthrw_(pthread_mutex_destroy) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_lock (__gthread_mutex_t *mutex)
> +__gthread_mutex_lock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_lock) (mutex);
> +    return __gthrw_(pthread_mutex_lock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_trylock (__gthread_mutex_t *mutex)
> +__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_trylock) (mutex);
> +    return __gthrw_(pthread_mutex_trylock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_mutex_unlock (__gthread_mutex_t *mutex)
> +__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
> -    return __gthrw_(pthread_mutex_unlock) (mutex);
> +    return __gthrw_(pthread_mutex_unlock) (__mutex);
>   else
>     return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
>  {
> -  mutex->depth = 0;
> -  mutex->owner = (pthread_t) 0;
> -  return __gthrw_(pthread_mutex_init) (&mutex->actual, NULL);
> +  __mutex->depth = 0;
> +  __mutex->owner = (pthread_t) 0;
> +  return __gthrw_(pthread_mutex_init) (&__mutex->actual, NULL);
>  }
>
>  static inline int
> -__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      pthread_t me = __gthrw_(pthread_self) ();
> +      pthread_t __me = __gthrw_(pthread_self) ();
>
> -      if (mutex->owner != me)
> +      if (__mutex->owner != __me)
>        {
> -         __gthrw_(pthread_mutex_lock) (&mutex->actual);
> -         mutex->owner = me;
> +         __gthrw_(pthread_mutex_lock) (&__mutex->actual);
> +         __mutex->owner = __me;
>        }
>
> -      mutex->depth++;
> +      __mutex->depth++;
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      pthread_t me = __gthrw_(pthread_self) ();
> +      pthread_t __me = __gthrw_(pthread_self) ();
>
> -      if (mutex->owner != me)
> +      if (__mutex->owner != __me)
>        {
> -         if (__gthrw_(pthread_mutex_trylock) (&mutex->actual))
> +         if (__gthrw_(pthread_mutex_trylock) (&__mutex->actual))
>            return 1;
> -         mutex->owner = me;
> +         __mutex->owner = __me;
>        }
>
> -      mutex->depth++;
> +      __mutex->depth++;
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
> +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
>  {
>   if (__gthread_active_p ())
>     {
> -      if (--mutex->depth == 0)
> +      if (--__mutex->depth == 0)
>        {
> -          mutex->owner = (pthread_t) 0;
> -          __gthrw_(pthread_mutex_unlock) (&mutex->actual);
> +          __mutex->owner = (pthread_t) 0;
> +          __gthrw_(pthread_mutex_unlock) (&__mutex->actual);
>        }
>     }
>   return 0;
>  }
>
>  static inline int
> -__gthread_cond_broadcast (__gthread_cond_t *cond)
> +__gthread_cond_broadcast (__gthread_cond_t *__cond)
>  {
> -  return __gthrw_(pthread_cond_broadcast) (cond);
> +  return __gthrw_(pthread_cond_broadcast) (__cond);
>  }
>
>  static inline int
> -__gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex)
> +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
>  {
> -  return __gthrw_(pthread_cond_wait) (cond, mutex);
> +  return __gthrw_(pthread_cond_wait) (__cond, __mutex);
>  }
>
>  static inline int
> -__gthread_cond_wait_recursive (__gthread_cond_t *cond,
> -                              __gthread_recursive_mutex_t *mutex)
> +__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
> +                              __gthread_recursive_mutex_t *__mutex)
>  {
> -  return __gthrw_(pthread_cond_wait) (cond, &mutex->actual);
> +  return __gthrw_(pthread_cond_wait) (__cond, &__mutex->actual);
>  }
>
>  #endif /* _LIBOBJC */
>
>        Jakub
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]