summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-11-30 15:09:41 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-11-30 15:09:41 (GMT)
commit0ffab670ecce5cacfba7a617cb3a30d8bd42c1d0 (patch)
tree8042015ae074f0cc94566ced61b61e7fa2bb0086
parent8b296da9747d2b861a94be9a1ee3fb0258d8a0c4 (diff)
downloadtcl-0ffab670ecce5cacfba7a617cb3a30d8bd42c1d0.zip
tcl-0ffab670ecce5cacfba7a617cb3a30d8bd42c1d0.tar.gz
tcl-0ffab670ecce5cacfba7a617cb3a30d8bd42c1d0.tar.bz2
silenced compiler warning about big constant
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclClock.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 00e708a..9cd8c74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,7 +21,9 @@
2005-11-30 Kevin Kenny <kennykb@acm.org>
* generic/tclClock.c: Fixed a bad refcount in previous commit that led
- to a corrupted heap. Thanks to Miguel Sofer for pointing out this bug.
+ to a corrupted heap. Thanks to Miguel Sofer for pointing out this
+ bug. Also silenced a warning that some compilers gave about the
+ excessively long constant for JULIAN_SEC_POSIX_EPOCH.
2005-11-29 Kevin Kenny <kennykb@acm.org>
diff --git a/generic/tclClock.c b/generic/tclClock.c
index a52ca26..891ea25 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclClock.c,v 1.44 2005/11/30 14:48:04 kennykb Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.45 2005/11/30 15:09:41 kennykb Exp $
*/
#include "tclInt.h"
@@ -29,8 +29,10 @@
* Constants
*/
-#define JULIAN_SEC_POSIX_EPOCH ((Tcl_WideInt) 210866803200)
+#define JULIAN_DAY_POSIX_EPOCH 2440588
#define SECONDS_PER_DAY 86400
+#define JULIAN_SEC_POSIX_EPOCH (((Tcl_WideInt) JULIAN_DAY_POSIX_EPOCH) \
+ * SECONDS_PER_DAY)
#define FOUR_CENTURIES 146097 /* days */
#define JDAY_1_JAN_1_CE_JULIAN 1721424
#define JDAY_1_JAN_1_CE_GREGORIAN 1721426