[ros-diffs] [tkreuzer] 34649: fix prototypes of _beginthread and _beginthreadex

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Mon Jul 21 23:46:24 CEST 2008


Author: tkreuzer
Date: Mon Jul 21 16:46:24 2008
New Revision: 34649

URL: http://svn.reactos.org/svn/reactos?rev=34649&view=rev
Log:
fix prototypes of _beginthread and _beginthreadex

Modified:
    trunk/reactos/include/crt/process.h
    trunk/reactos/lib/sdk/crt/process/thread.c
    trunk/reactos/lib/sdk/crt/process/threadx.c

Modified: trunk/reactos/include/crt/process.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/process.h?rev=34649&r1=34648&r2=34649&view=diff
==============================================================================
--- trunk/reactos/include/crt/process.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/process.h [iso-8859-1] Mon Jul 21 16:46:24 2008
@@ -16,6 +16,8 @@
 
 /* Includes a definition of _pid_t and pid_t */
 #include <sys/types.h>
+
+#include <stdint.h>
 
 /*
  * Constants for cwait actions.
@@ -92,12 +94,12 @@
  *
  * NOTE: No old names for these functions. Use the underscore.
  */
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
+_CRTIMP uintptr_t __cdecl __MINGW_NOTHROW
 	_beginthread	(void (*)(void *), unsigned, void*);
 _CRTIMP void __cdecl __MINGW_NOTHROW _endthread	(void);
 
 #ifdef	__MSVCRT__
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
+_CRTIMP uintptr_t __cdecl __MINGW_NOTHROW
 	_beginthreadex	(void *, unsigned, unsigned (__stdcall *) (void *),
 			 void*, unsigned, unsigned*);
 _CRTIMP void __cdecl __MINGW_NOTHROW _endthreadex (unsigned);

Modified: trunk/reactos/lib/sdk/crt/process/thread.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/process/thread.c?rev=34649&r1=34648&r2=34649&view=diff
==============================================================================
--- trunk/reactos/lib/sdk/crt/process/thread.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/process/thread.c [iso-8859-1] Mon Jul 21 16:46:24 2008
@@ -80,7 +80,7 @@
 /*********************************************************************
  *		_beginthread (MSVCRT.@)
  */
-unsigned long _beginthread(
+uintptr_t _beginthread(
   _beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
   unsigned int stack_size, /* [in] Stack size for new thread or 0 */
   void *arglist)           /* [in] Argument list to be passed to new thread or NULL */
@@ -98,7 +98,7 @@
   trampoline->arglist = arglist;
 
   /* FIXME */
-  return (unsigned long)CreateThread(NULL, stack_size, _beginthread_trampoline,
+  return (uintptr_t)CreateThread(NULL, stack_size, _beginthread_trampoline,
 				     trampoline, 0, NULL);
 }
 

Modified: trunk/reactos/lib/sdk/crt/process/threadx.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/process/threadx.c?rev=34649&r1=34648&r2=34649&view=diff
==============================================================================
--- trunk/reactos/lib/sdk/crt/process/threadx.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/process/threadx.c [iso-8859-1] Mon Jul 21 16:46:24 2008
@@ -3,7 +3,7 @@
 /*
  * @unimplemented
  */
-unsigned long CDECL _beginthreadex(
+uintptr_t CDECL _beginthreadex(
     void* security,
     unsigned stack_size,
     unsigned (__stdcall *start_address)(void*),
@@ -25,7 +25,7 @@
     _dosmaperr( GetLastError() );
     }
 
-  return (unsigned long) NewThread;
+  return (uintptr_t) NewThread;
 }
 
 



More information about the Ros-diffs mailing list