This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
A builtin hard upper bound for sLOCALTIME_max to prevent AIX from stalling in the...
authorH.Merijn Brand <merijn@nb09.procura.nl>
Mon, 29 Sep 2008 16:54:38 +0000 (18:54 +0200)
committerH.Merijn Brand <merijn@nb09.procura.nl>
Mon, 29 Sep 2008 16:54:38 +0000 (18:54 +0200)
U/perl/time_size.U

index 0741ea1..21a9486 100644 (file)
@@ -150,7 +150,10 @@ time_t pt;
 
 void local_check (time_t t)
 {
-    tmp = localtime (&t);
+    if (sizeof (time_t) > 4 && t > 0x7ffffffffffff000LL)
+       tmp = NULL;
+    else
+       tmp = localtime (&t);
     if (tmp == NULL || tmp->tm_year < -1900)
        tmp = NULL;
     else