From: Jan Dubois Date: Thu, 20 Dec 2007 10:18:52 +0000 (-0800) Subject: 64-bit fix for Time::Local X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d374f9c73e6118631558f80521fa3b0f1c61fb3a;p=p5sagit%2Fp5-mst-13.2.git 64-bit fix for Time::Local From: "Jan Dubois" Message-ID: <044301c84334$c6aa2960$53fe7c20$@com> p4raw-id: //depot/perl@32728 --- diff --git a/lib/Time/Local.pm b/lib/Time/Local.pm index 764e27e..4044cd9 100644 --- a/lib/Time/Local.pm +++ b/lib/Time/Local.pm @@ -7,7 +7,7 @@ use strict; use integer; use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK ); -$VERSION = '1.18'; +$VERSION = '1.18_01'; @ISA = qw( Exporter ); @EXPORT = qw( timegm timelocal ); @@ -29,15 +29,12 @@ use constant SECS_PER_MINUTE => 60; use constant SECS_PER_HOUR => 3600; use constant SECS_PER_DAY => 86400; -my $MaxInt = ( ( 1 << ( 8 * $Config{intsize} - 2 ) ) -1 ) * 2 + 1; +my $MaxInt = ( ( 1 << ( 8 * $Config{ivsize} - 2 ) ) - 1 ) * 2 + 1; my $MaxDay = int( ( $MaxInt - ( SECS_PER_DAY / 2 ) ) / SECS_PER_DAY ) - 1; if ( $^O eq 'MacOS' ) { # time_t is unsigned... - $MaxInt = ( 1 << ( 8 * $Config{intsize} ) ) - 1; -} -else { - $MaxInt = ( ( 1 << ( 8 * $Config{intsize} - 2 ) ) - 1 ) * 2 + 1; + $MaxInt = ( 1 << ( 8 * $Config{ivsize} ) ) - 1; } # Determine the EPOC day for this machine