Tcl Source Code

View Ticket
Login
Ticket UUID: 219081
Title: Tcl_CreateThreadProc typedef change from a few days ago need
Type: Bug Created on: 2000-10-26 01:10:24
Submitter: nobody Assigned to: nobody
Subsystem: 49. Threading Severity:
Priority: 2 Last modified: 2001-04-20 02:09:25
Status: Closed Closed by: dgp
Resolution: Fixed Closed on: 2001-04-19 19:09:25
Version: obsolete: 8.3
Description:
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