2006-02-21 Jeremy Bettis <jeremy@deadbeef.com>

* 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.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/libobjc/trunk@22528 72102866-910b-0410-8b05-ffd578937521
main
jbettis 20 years ago
parent af1fcec2ed
commit aa8b0c7bce

@ -1,3 +1,8 @@
2006-02-21 Jeremy Bettis <jeremy@deadbeef.com>
* 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 <jeremy@deadbeef.com>
* init.c (objc_init_statics, __objc_init_protocols): Fix to GCC bug 23214

@ -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

@ -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;

Loading…
Cancel
Save