From: Craig A. Berry Date: Sat, 21 Feb 2009 04:58:55 +0000 (-0600) Subject: Skip time64 when there is no 64-bit integer type available. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f336194cfaf185f017d3850e370623e7a703691;p=p5sagit%2Fp5-mst-13.2.git Skip time64 when there is no 64-bit integer type available. The y2038 code currently requires that a 64-bit integer type be available, so the build falls down hard if we try to use it where there isn't one. A better fix might be to try NV for time_t and a 32-bit integer for year. N.B. We test for the definedness of Quad_t rather than HAS_QUAD since the latter is explicitly undef'd in the case where 64-bit types are available but are not being used for Perl's IV and UV. --- diff --git a/pp_sys.c b/pp_sys.c index 08c1f83..6bfdf35 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -29,7 +29,7 @@ #include "EXTERN.h" #define PERL_IN_PP_SYS_C #include "perl.h" -#ifndef PERL_MICRO +#if !defined(PERL_MICRO) && defined(Quad_t) # include "time64.h" # include "time64.c" #endif @@ -4424,7 +4424,7 @@ PP(pp_gmtime) { dVAR; dSP; -#ifdef PERL_MICRO +#if defined(PERL_MICRO) || !defined(Quad_t) Time_t when; const struct tm *err; struct tm tmbuf; @@ -4440,7 +4440,7 @@ PP(pp_gmtime) {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; -#ifdef PERL_MICRO +#if defined(PERL_MICRO) || !defined(Quad_t) if (MAXARG < 1) (void)time(&when); else