summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2008-04-14 17:34:16 (GMT)
committerKevin B Kenny <kennykb@acm.org>2008-04-14 17:34:16 (GMT)
commit1f8fd5a5c9d15e8c2553826437ab6292e3c8e028 (patch)
treedb18e0b7273907995d3721b1255797d215ed1302
parentac208e8e219affa0af313b39b698d674a635b96b (diff)
downloadtcl-1f8fd5a5c9d15e8c2553826437ab6292e3c8e028.zip
tcl-1f8fd5a5c9d15e8c2553826437ab6292e3c8e028.tar.gz
tcl-1f8fd5a5c9d15e8c2553826437ab6292e3c8e028.tar.bz2
* unix/tclUnixTime.c (TclpGetClicks, Tcl_GetTime): Removed
obsolete use of 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197].
-rw-r--r--ChangeLog6
-rw-r--r--unix/tclUnixTime.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a9c3993..a69203e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-14 Kevin B. Kenny <kennykb@acm.org>
+
+ * unix/tclUnixTime.c (TclpGetClicks, Tcl_GetTime): Removed
+ obsolete use of 'struct timezone' in the call to 'gettimeofday'.
+ [Bug 1942197].
+
2008-04-14 Don Porter <dgp@users.sourceforge.net>
* generic/tclExecute.c: Plug memory leak introduced in the
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index e4ac865..6a42d97 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixTime.c,v 1.15.2.6 2007/04/21 19:52:15 kennykb Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.15.2.7 2008/04/14 17:34:17 kennykb Exp $
*/
#include "tclInt.h"
@@ -97,13 +97,12 @@ TclpGetClicks()
struct tms dummy;
#else
struct timeval date;
- struct timezone tz;
#endif
#ifdef NO_GETTOD
now = (unsigned long) times(&dummy);
#else
- gettimeofday(&date, &tz);
+ gettimeofday(&date, NULL);
now = date.tv_sec*1000000 + date.tv_usec;
#endif
@@ -250,9 +249,8 @@ Tcl_GetTime(timePtr)
Tcl_Time *timePtr; /* Location to store time information. */
{
struct timeval tv;
- struct timezone tz;
- (void) gettimeofday(&tv, &tz);
+ (void) gettimeofday(&tv, NULL);
timePtr->sec = tv.tv_sec;
timePtr->usec = tv.tv_usec;
}