OriginalBugID: 5097 Bug
Version: 8.3
SubmitDate: '2000-04-17'
LastModified: '2000-04-18'
Severity: SER
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: All Windows
FixedDate: '2000-04-18'
FixedInVersion: 8.3.1
ClosedDate: '2000-10-25'
Name:
David Gravereaux
CVS:
Fri, Apr 14, 2000 4am PST
ObservedBehavior:
implied __cdecl doesn't match the correct signature for _beginthreadex which should be __stdcall and returns an unsigned int and not void.
Patch:
*** generic/tcl.h2000/04/13 02:30:431.68
--- generic/tcl.h2000/04/14 12:01:25
***************
*** 395,400 ****
--- 395,402 ----
#ifdef MAC_TCL
typedef pascal void *(Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
+ #elif defined __WIN32__
+ typedef unsigned (__stdcall Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
#else
typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
#endif
*** generic/tclThreadTest.c2000/04/09 16:04:191.8
--- generic/tclThreadTest.c2000/04/14 12:01:31
***************
*** 128,133 ****
--- 128,135 ----
#ifdef MAC_TCL
static pascal void *NewThread _ANSI_ARGS_((ClientData clientData));
+ #elif defined __WIN32__
+ static unsigned __stdcall NewThread _ANSI_ARGS_((ClientData clientData));
#else
static void NewThread _ANSI_ARGS_((ClientData clientData));
#endif
***************
*** 408,413 ****
--- 410,417 ----
*/
#ifdef MAC_TCL
static pascal void *
+ #elif defined __WIN32__
+ static unsigned __stdcall
#else
static void
#endif
***************
*** 469,474 ****
--- 473,480 ----
Tcl_ExitThread(result);
#ifdef MAC_TCL
return NULL;
+ #elif defined __WIN32__
+ return 0;
#endif
}
*** win/tclWinThrd.c2000/04/09 16:04:201.6
--- win/tclWinThrd.c2000/04/14 12:01:46
***************
*** 9,15 ****
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
! * SCCS: @(#) tclWinThrd.c 1.13 98/02/18 14:00:23
*/
#include "tclWinInt.h"
--- 9,15 ----
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
! * RCS: @(#) $Id:$
*/
#include "tclWinInt.h"
***************
*** 125,132 ****
{
unsigned long code;
! code = _beginthreadex(NULL, stackSize, (LPTHREAD_START_ROUTINE) proc,
! (void *)clientData, 0, (unsigned *)idPtr);
if (code == 0) {
return TCL_ERROR;
} else {
--- 126,133 ----
{
unsigned long code;
! code = _beginthreadex(NULL, stackSize, proc, clientData, 0,
! (unsigned *)idPtr);
if (code == 0) {
return TCL_ERROR;
} else {
PatchFiles:
generic/tcl.h
generic/tclThreadTest.c
win/tclWinThrd.c
This has gone back in, in a working manner.
-- 04/18/2000 hobbs
|