diff options
author | Craig A. Berry <craigberry@mac.com> | 2009-02-20 22:58:55 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-02-20 22:58:55 -0600 |
commit | 7f336194cfaf185f017d3850e370623e7a703691 (patch) | |
tree | 8559d3f9f942a5f6eb85ed7eeb3e32bcfaf64a23 | |
parent | 778e045f833ee66ca20193bc17889f482b3beab6 (diff) | |
download | perl-7f336194cfaf185f017d3850e370623e7a703691.tar.gz |
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.
-rw-r--r-- | pp_sys.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |