diff options
author | kennykb <kennykb@noemail.net> | 2001-04-10 18:32:38 (GMT) |
---|---|---|
committer | kennykb <kennykb@noemail.net> | 2001-04-10 18:32:38 (GMT) |
commit | 9ba9a454ffacc0ce4a8ca231a38a42fcd8ea73ed (patch) | |
tree | 64ae45fd633d0113984f193dbf1fc4bf393cb7e9 /unix/tclUnixTime.c | |
parent | 861ed4e2508a2c5b1112c0a27abd07296fecc7ca (diff) | |
download | tcl-9ba9a454ffacc0ce4a8ca231a38a42fcd8ea73ed.zip tcl-9ba9a454ffacc0ce4a8ca231a38a42fcd8ea73ed.tar.gz tcl-9ba9a454ffacc0ce4a8ca231a38a42fcd8ea73ed.tar.bz2 |
Altered tclUnixTime.c in hopes of better K&R compatibility.
FossilOrigin-Name: e984e525c236caeca8368879863adbfdfb1ca431
Diffstat (limited to 'unix/tclUnixTime.c')
-rw-r--r-- | unix/tclUnixTime.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index dd07166..d3235b1 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.10 2001/04/10 15:43:48 kennykb Exp $ + * RCS: @(#) $Id: tclUnixTime.c,v 1.11 2001/04/10 18:32:39 kennykb Exp $ */ #include "tclInt.h" @@ -368,7 +368,7 @@ ThreadSafeGMTime( timePtr ) gmtime_r( timePtr, tmPtr ); #else Tcl_MutexLock( & tmMutex ); - *tmPtr = *( gmtime( timePtr ) ); + memcpy( (VOID *) tmPtr, (VOID *) gmtime( timePtr ), sizeof ( struct tm ) ); Tcl_MutexUnlock( &tmMutex ); #endif return tmPtr; @@ -409,7 +409,9 @@ ThreadSafeLocalTime( timePtr ) localtime_r( timePtr, tmPtr ); #else Tcl_MutexLock( & tmMutex ); - *tmPtr = *( localtime( timePtr ) ); + memcpy( (VOID *) (tmPtr), + (VOID *) ( localtime( timePtr ) ), + sizeof (struct tm) ); Tcl_MutexUnlock( &tmMutex ); #endif return tmPtr; |