From: Daniel Berger Date: 2006-07-06T00:46:32+09:00 Subject: Patch for time.c Hi, This patch eliminates the "integer overflow detected" warnings in time.c when compiled with the Sun Studio compiler. This is against the 1.8.5 stable release for 5-Jul-2006: --- time.orig Wed Jul 5 09:16:12 2006 +++ time.c Wed Jul 5 09:17:20 2006 @@ -1900,7 +1900,7 @@ if ((tm->tm_year & 0xffff) != tm->tm_year) rb_raise(rb_eArgError, "year too big to marshal"); - p = 0x1 << 31 | /* 1 */ + p = 0x1U << 31 | /* 1 */ tm->tm_year << 14 | /* 16 */ tm->tm_mon << 10 | /* 4 */ tm->tm_mday << 5 | /* 5 */ @@ -1976,12 +1976,12 @@ s |= buf[i]<<(8*(i-4)); } - if ((p & (1<<31)) == 0) { + if ((p & (1U<<31)) == 0) { sec = p; usec = s; } else { - p &= ~(1<<31); + p &= ~(1U<<31); tm.tm_year = (p >> 14) & 0xffff; tm.tm_mon = (p >> 10) & 0xf; tm.tm_mday = (p >> 5) & 0x1f; This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.