diff --git a/ChangeLog b/ChangeLog index 385e3a7..2558e3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-21 Jeremy Bettis + + * thr-win32.c: (__objc_thread_detach): Removed duplicate definitions of thread_id and win32_handle. + * objc/objc-decls.h: Don't use __dllspec on mingw platform. + 2006-02-10 Jeremy Bettis * init.c (objc_init_statics, __objc_init_protocols): Fix to GCC bug 23214 diff --git a/objc/objc-decls.h b/objc/objc-decls.h index 52938a2..2eff1c1 100644 --- a/objc/objc-decls.h +++ b/objc/objc-decls.h @@ -27,9 +27,9 @@ Boston, MA 02110-1301, USA. */ #ifndef __objc_decls_INCLUDE_GNU #define __objc_decls_INCLUDE_GNU -#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32) +#if !defined(__MINGW32__) && (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) -# ifdef DLL_EXPORT /* defined by libtool (if required) */ +#ifdef DLL_EXPORT /* defined by libtool (if required) */ # define objc_EXPORT __declspec(dllexport) # define objc_DECLARE __declspec(dllexport) #else diff --git a/thr-win32.c b/thr-win32.c index 76ed389..eaa3b83 100644 --- a/thr-win32.c +++ b/thr-win32.c @@ -71,10 +71,8 @@ __objc_thread_detach(void (*func)(void *arg), void *arg) if (!(win32_handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, arg, 0, &thread_id))) #else - unsigned thread_id = 0; - unsigned long win32_handle; // According to MSDN documentation threads which use libc functions should call _beginthreadex not CreateThread - if (-1 == (win32_handle = _beginthreadex(NULL, 0, (void*)func, arg, 0, &thread_id))) + if ((HANDLE)-1 == (win32_handle = (HANDLE)_beginthreadex(NULL, 0, (void*)func, arg, 0, (int*)&thread_id))) #endif thread_id = 0;