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]: Define __GTHREAD_MUTEX_INIT_DEFAULT in gthr-win32.h


I'm checking this into trunk, since it was approved in private email by
Christopher Faylor.

Danny


 --- Danny Smith <danny_r_smith_2001@yahoo.co.nz> wrote: > The following 
patch stops warnings about uninitialized _M_lock
> during initialization of the static _STL_mutex_lock structure
> in locale::classic() (in libstdc++-v3/src/locale.cc)  on win32
> targets.
> 
> In win32, __gthread_mutex_t is a void* that gets set by the
> w32api function CreateMutex in __GTHREAD_MUTEX_INIT_FUNCTION
> 
> Please refer following for background:
> http://gcc.gnu.org/ml/gcc-patches/2001-06/msg00885.html
> 
> Tested on i586-pc-mingw32 bootstrap build of gcc version 3.1 20020228
> (prerelease) with with no new regressions.
> 
> Please apply to trunk and branch.
> 
> ChangeLog
> 
> 2002-03-03  Danny Smith  <dannysmith@users.sourceforge.net>
> 
> 	* gthr-win32.h (__GTHREAD_MUTEX_INIT_DEFAULT): Define.
> 
> Index: gthr-win32.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/gthr-win32.h,v
> retrieving revision 1.14
> diff -u -p -r1.14 gthr-win32.h
> --- gthr-win32.h	2002/02/03 20:58:51	1.14
> +++ gthr-win32.h	2002/03/03 07:03:14
> @@ -341,6 +341,7 @@ typedef HANDLE __gthread_mutex_t;
>  
>  #define __GTHREAD_ONCE_INIT {FALSE, -1}
>  #define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function
> +#define __GTHREAD_MUTEX_INIT_DEFAULT 0
>  
>  #if __MINGW32_MAJOR_VERSION >= 1 || \
>    (__MINGW32_MAJOR_VERSION == 0 && __MINGW32_MINOR_VERSION > 2)
> 


http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.


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