summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-18 11:31:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-18 11:31:11 (GMT)
commit0d15664cbdafeb59a53986a6e646b79f7e5124da (patch)
tree4bdf91ec9d33355c6244ece15f779e618e18b57d
parentcdfb697e13091bb9f205d581b83f1c5854be98da (diff)
downloadtcl-0d15664cbdafeb59a53986a6e646b79f7e5124da.zip
tcl-0d15664cbdafeb59a53986a6e646b79f7e5124da.tar.gz
tcl-0d15664cbdafeb59a53986a6e646b79f7e5124da.tar.bz2
Change (internal) signatures for TclpGetClicks/TclpGetSeconds to use "unsigned long long" in stead of Tcl_WideUInt as return value.
-rw-r--r--generic/tclClock.c4
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclIntDecls.h8
-rw-r--r--unix/tclUnixTime.c16
-rw-r--r--win/tclWinTime.c8
5 files changed, 20 insertions, 20 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index f05a7a1..8cb1b40 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -1762,13 +1762,13 @@ ClockClicksObjCmd(
switch (index) {
case CLICKS_MILLIS:
Tcl_GetTime(&now);
- clicks = (Tcl_WideInt) now.sec * 1000 + now.usec / 1000;
+ clicks = (Tcl_WideInt)(unsigned long)now.sec * 1000 + now.usec / 1000;
break;
case CLICKS_NATIVE:
#ifdef TCL_WIDE_CLICKS
clicks = TclpGetWideClicks();
#else
- clicks = (Tcl_WideInt) TclpGetClicks();
+ clicks = (Tcl_WideInt)TclpGetClicks();
#endif
break;
case CLICKS_MICROS:
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 42e6899..3fbc571 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -151,10 +151,10 @@ declare 74 {
void TclpFree(void *ptr)
}
declare 75 {
- Tcl_WideUInt TclpGetClicks(void)
+ unsigned long long TclpGetClicks(void)
}
declare 76 {
- Tcl_WideUInt TclpGetSeconds(void)
+ unsigned long long TclpGetSeconds(void)
}
declare 81 {
void *TclpRealloc(void *ptr, size_t size)
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 2969f27..23cf3e6 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -186,9 +186,9 @@ EXTERN void * TclpAlloc(size_t size);
/* 74 */
EXTERN void TclpFree(void *ptr);
/* 75 */
-EXTERN Tcl_WideUInt TclpGetClicks(void);
+EXTERN unsigned long long TclpGetClicks(void);
/* 76 */
-EXTERN Tcl_WideUInt TclpGetSeconds(void);
+EXTERN unsigned long long TclpGetSeconds(void);
/* Slot 77 is reserved */
/* Slot 78 is reserved */
/* Slot 79 is reserved */
@@ -663,8 +663,8 @@ typedef struct TclIntStubs {
void (*reserved72)(void);
void (*reserved73)(void);
void (*tclpFree) (void *ptr); /* 74 */
- Tcl_WideUInt (*tclpGetClicks) (void); /* 75 */
- Tcl_WideUInt (*tclpGetSeconds) (void); /* 76 */
+ unsigned long long (*tclpGetClicks) (void); /* 75 */
+ unsigned long long (*tclpGetSeconds) (void); /* 76 */
void (*reserved77)(void);
void (*reserved78)(void);
void (*reserved79)(void);
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index dc48a32..990503d 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -49,10 +49,10 @@ void *tclTimeClientData = NULL;
*----------------------------------------------------------------------
*/
-Tcl_WideUInt
+unsigned long long
TclpGetSeconds(void)
{
- return time(NULL);
+ return (unsigned long long)time(NULL);
}
/*
@@ -78,7 +78,7 @@ TclpGetMicroseconds(void)
Tcl_Time time;
tclGetTimeProcPtr(&time, tclTimeClientData);
- return ((long long)time.sec)*1000000 + time.usec;
+ return ((long long)(unsigned long)time.sec)*1000000 + time.usec;
}
/*
@@ -100,30 +100,30 @@ TclpGetMicroseconds(void)
*----------------------------------------------------------------------
*/
-Tcl_WideUInt
+unsigned long long
TclpGetClicks(void)
{
- Tcl_WideUInt now;
+ unsigned long long now;
#ifdef NO_GETTOD
if (tclGetTimeProcPtr != NativeGetTime) {
Tcl_Time time;
tclGetTimeProcPtr(&time, tclTimeClientData);
- now = (Tcl_WideUInt)time.sec*1000000 + time.usec;
+ now = (unsigned long long)(unsigned long)time.sec*1000000 + time.usec;
} else {
/*
* A semi-NativeGetTime, specialized to clicks.
*/
struct tms dummy;
- now = (Tcl_WideUInt) times(&dummy);
+ now = (unsigned long long)times(&dummy);
}
#else
Tcl_Time time;
tclGetTimeProcPtr(&time, tclTimeClientData);
- now = (Tcl_WideUInt)time.sec*1000000 + time.usec;
+ now = (unsigned long long)time.sec*1000000 + time.usec;
#endif
return now;
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 3c52451..0bd5b7e 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -144,7 +144,7 @@ ClientData tclTimeClientData = NULL;
*----------------------------------------------------------------------
*/
-Tcl_WideUInt
+unsigned long long
TclpGetSeconds(void)
{
long long usecSincePosixEpoch;
@@ -158,7 +158,7 @@ TclpGetSeconds(void)
Tcl_Time t;
tclGetTimeProcPtr(&t, tclTimeClientData); /* Tcl_GetTime inlined. */
- return t.sec;
+ return (unsigned long long)(unsigned long)t.sec;
}
}
@@ -181,7 +181,7 @@ TclpGetSeconds(void)
*----------------------------------------------------------------------
*/
-Tcl_WideUInt
+unsigned long long
TclpGetClicks(void)
{
long long usecSincePosixEpoch;
@@ -200,7 +200,7 @@ TclpGetClicks(void)
Tcl_Time now; /* Current Tcl time */
tclGetTimeProcPtr(&now, tclTimeClientData); /* Tcl_GetTime inlined */
- return (Tcl_WideUInt)(now.sec * 1000000) + now.usec;
+ return ((unsigned long long)(unsigned long)now.sec * 1000000ULL) + now.usec;
}
}