64-bit fix for Time::Local
authorJan Dubois <jand@activestate.com>
Thu, 20 Dec 2007 10:18:52 +0000 (02:18 -0800)
committerSteve Peters <steve@fisharerojo.org>
Wed, 26 Dec 2007 14:46:54 +0000 (14:46 +0000)
From: "Jan Dubois" <jand@activestate.com>
Message-ID: <044301c84334$c6aa2960$53fe7c20$@com>

p4raw-id: //depot/perl@32728

lib/Time/Local.pm

index 764e27e..4044cd9 100644 (file)
@@ -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