summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--time.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b1baf3afc..3780d3dac5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 7 00:29:10 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * time.c (time_mload): a patch from Daniel Berger
+ <Daniel.Berger at qwest.com>. [ruby-core:08128]
+
Thu Jul 6 22:21:57 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* process.c (rb_proc_times): use sysconf(_SC_CLK_TCK) value prior to
diff --git a/time.c b/time.c
index a1f963943f..d0c2de4a8d 100644
--- a/time.c
+++ b/time.c
@@ -1900,7 +1900,7 @@ time_mdump(time)
if ((tm->tm_year & 0xffff) != tm->tm_year)
rb_raise(rb_eArgError, "year too big to marshal");
- p = 0x1 << 31 | /* 1 */
+ p = 0x1UL << 31 | /* 1 */
tm->tm_year << 14 | /* 16 */
tm->tm_mon << 10 | /* 4 */
tm->tm_mday << 5 | /* 5 */
@@ -1976,12 +1976,12 @@ time_mload(time, str)
s |= buf[i]<<(8*(i-4));
}
- if ((p & (1<<31)) == 0) {
+ if ((p & (1UL<<31)) == 0) {
sec = p;
usec = s;
}
else {
- p &= ~(1<<31);
+ p &= ~(1UL<<31);
tm.tm_year = (p >> 14) & 0xffff;
tm.tm_mon = (p >> 10) & 0xf;
tm.tm_mday = (p >> 5) & 0x1f;