Attachment "clock_clicks_64bit.patch" to
ticket [705988ffff]
added by
nobody
2003-03-19 07:43:40.
diff -r -u tcl-src.orig/generic/tclClock.c tcl-src/generic/tclClock.c
--- tcl-src.orig/generic/tclClock.c 2003-02-02 08:27:55.000000000 +1100
+++ tcl-src/generic/tclClock.c 2003-03-19 10:44:44.000000000 +1100
@@ -115,7 +115,7 @@
Tcl_SetLongObj(resultPtr,
(long) (time.sec*1000 + time.usec/1000));
} else {
- Tcl_SetLongObj(resultPtr, (long) TclpGetClicks());
+ Tcl_SetWideIntObj(resultPtr, TclpGetClicks());
}
return TCL_OK;
}
diff -r -u tcl-src.orig/generic/tclIntDecls.h tcl-src/generic/tclIntDecls.h
--- tcl-src.orig/generic/tclIntDecls.h 2003-02-18 13:25:45.000000000 +1100
+++ tcl-src/generic/tclIntDecls.h 2003-03-19 10:44:24.000000000 +1100
@@ -235,7 +235,7 @@
/* 74 */
EXTERN void TclpFree _ANSI_ARGS_((char * ptr));
/* 75 */
-EXTERN unsigned long TclpGetClicks _ANSI_ARGS_((void));
+EXTERN Tcl_WideInt TclpGetClicks _ANSI_ARGS_((void));
/* 76 */
EXTERN unsigned long TclpGetSeconds _ANSI_ARGS_((void));
/* 77 */
@@ -599,7 +599,7 @@
void *reserved72;
void *reserved73;
void (*tclpFree) _ANSI_ARGS_((char * ptr)); /* 74 */
- unsigned long (*tclpGetClicks) _ANSI_ARGS_((void)); /* 75 */
+ Tcl_WideInt (*tclpGetClicks) _ANSI_ARGS_((void)); /* 75 */
unsigned long (*tclpGetSeconds) _ANSI_ARGS_((void)); /* 76 */
void (*tclpGetTime) _ANSI_ARGS_((Tcl_Time * time)); /* 77 */
int (*tclpGetTimeZone) _ANSI_ARGS_((unsigned long time)); /* 78 */
diff -r -u tcl-src.orig/mac/tclMacTime.c tcl-src/mac/tclMacTime.c
--- tcl-src.orig/mac/tclMacTime.c 2002-01-04 22:21:05.000000000 +1100
+++ tcl-src/mac/tclMacTime.c 2003-03-19 10:20:50.000000000 +1100
@@ -203,7 +203,7 @@
*-----------------------------------------------------------------------------
*/
-unsigned long
+Tcl_WideUInt
TclpGetClicks()
{
UnsignedWide micros;
diff -r -u tcl-src.orig/unix/tclUnixTime.c tcl-src/unix/tclUnixTime.c
--- tcl-src.orig/unix/tclUnixTime.c 2002-07-19 22:31:10.000000000 +1000
+++ tcl-src/unix/tclUnixTime.c 2003-03-19 11:16:27.000000000 +1100
@@ -84,10 +84,10 @@
*-----------------------------------------------------------------------------
*/
-unsigned long
+Tcl_WideInt
TclpGetClicks()
{
- unsigned long now;
+ Tcl_WideInt now;
#ifdef NO_GETTOD
struct tms dummy;
#else
@@ -99,7 +99,7 @@
now = (unsigned long) times(&dummy);
#else
gettimeofday(&date, &tz);
- now = date.tv_sec*1000000 + date.tv_usec;
+ now = (Tcl_WideInt)date.tv_sec*1000000 + date.tv_usec;
#endif
return now;
Only in tcl-src/unix: tmp.tcl
diff -r -u tcl-src.orig/win/tclWinTime.c tcl-src/win/tclWinTime.c
--- tcl-src.orig/win/tclWinTime.c 2003-02-15 09:16:27.000000000 +1100
+++ tcl-src/win/tclWinTime.c 2003-03-19 10:21:38.000000000 +1100
@@ -175,7 +175,7 @@
*----------------------------------------------------------------------
*/
-unsigned long
+Tcl_WideUInt
TclpGetClicks()
{
/*
@@ -184,7 +184,7 @@
*/
Tcl_Time now; /* Current Tcl time */
- unsigned long retval; /* Value to return */
+ Tcl_WideUInt retval; /* Value to return */
Tcl_GetTime( &now );
retval = ( now.sec * 1000000 ) + now.usec;