[mingw]: gthr-win32.h: remove pollution of STL namespace by win32api

Danny Smith danny_r_smith_2001@yahoo.co.nz
Mon Jun 10 15:22:00 GMT 2002


I am belatedly checking in this patch to trunk:
http://gcc.gnu.org/ml/gcc-patches/2002-05/msg02160.html

now that I have received confirmation of receipt of FSF assignment forms.

The patch affects only mingw32 and has been approved by Christopher Faylor
I have put LIB2FUNCS_EXTRA in t-mingw32, not t-cygwin, since Chris indicates
that cygwin will soon be moving to a pthread model.  The patch has been
retested on current (2002-06-10) CVS with i586-pc-mingw32 

2002-06-11  Danny Smith  <dannysmith@users.sourforge.net>

	* gthr-win32.h: Wrap all functions in extern "C".
	(__gthread_key_t): Typedef as unsigned long,
	not win32 DWORD.
	(__GTHREAD_ONCE_INIT): Use 0, not win32 FALSE.
	(__gthread_mutex_t): Typedef as void*, not win32 HANDLE.
	(__gthr_win32_once, __gthr_win32_key_create,
	__gthr_win32_key_delete, __gthr_win32_getspecific,
	__gthr_win32_setspecific, __gthr_win32_mutex_init_function,
	__gthr_win32_mutex_lock,__gthr_win32_mutex_trylock,
	__gthr_win32_mutex_unlock): Declare, if #defined
	__GTHREAD_HIDE_WIN32API.
	(__gthread_once,__gthread_key_create,
	__gthread_key_delete, __gthread_getspecific,
	__gthread_setspecific, __gthread_mutex_init_function,
	__gthread_mutex_lock,__gthread_mutex_trylock,
	__gthread_mutex_unlock): Call corresponding
	__gthr_win32_* extern implementations if #defined
	__GTHREAD_HIDE_WIN32API.
	* config/i386/t-mingw32 (LIB2FUNCS_EXTRA): Set to
	$(srcdir)/config/i386/gthr-win32.c 
	* config/i386/gthr-win32.c: New implementation file.
	(__gthr_win32_once, __gthr_win32_key_create,
	__gthr_win32_key_delete, __gthr_win32_getspecific,
	__gthr_win32_setspecific, __gthr_win32_mutex_init_function,
	__gthr_win32_mutex_lock,__gthr_win32_mutex_trylock,
	__gthr_win32_mutex_unlock): New functions, based on
	static inlines in gthr-win32.h.






http://www.sold.com.au - The Sold.com.au Big Brand Sale
- New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12



More information about the Gcc-patches mailing list