diff options
author | Michael G. Schwern <schwern@pobox.com> | 2008-10-04 15:12:50 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-03 18:39:12 +0100 |
commit | b86b480f7301a8816081189c89b366a79ab9909f (patch) | |
tree | b8b70910ac882634e38c6c09f77e3c7a3e66f30d /time64_config.h | |
parent | 8efababc2f87779325166ff9fd8b47cde3763a95 (diff) | |
download | perl-b86b480f7301a8816081189c89b366a79ab9909f.tar.gz |
Update from y2038
Configuration information split out into its own header.
Added files to MANIFEST
Turn off USE_SYSTEM_GMTIME, ours is more reliable and possibly faster.
Fix type warnings found on Windows.
Remove unnecessary use of floor() and ceil().
Diffstat (limited to 'time64_config.h')
-rw-r--r-- | time64_config.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/time64_config.h b/time64_config.h new file mode 100644 index 0000000000..c22a1153e2 --- /dev/null +++ b/time64_config.h @@ -0,0 +1,75 @@ +#ifndef TIME64_CONFIG_H +# define TIME64_CONFIG_H + +/* Configuration + ------------- + Define as appropriate for your system. + Sensible defaults provided. +*/ + +/* INT_64_T + A 64 bit integer type to use to store time and others. + Must be defined. +*/ +#define INT_64_T Quad_t + + +/* USE_TM64 + Should we use a 64 bit safe replacement for tm? This will + let you go past year 2 billion but the struct will be incompatible + with tm. Conversion functions will be provided. +*/ +#define USE_TM64 + + +/* Availability of system functions. + + HAS_GMTIME_R + Define if your system has gmtime_r() + + HAS_LOCALTIME_R + Define if your system has localtime_r() + + HAS_TIMEGM + Define if your system has timegm(), a GNU extension. +*/ +/* Set in config.h */ + + +/* Details of non-standard tm struct elements. + + HAS_TM_TM_GMTOFF + True if your tm struct has a "tm_gmtoff" element. + A BSD extension. + + HAS_TM_TM_ZONE + True if your tm struct has a "tm_zone" element. + A BSD extension. +*/ +/* Set in config.h */ + + +/* USE_SYSTEM_LOCALTIME + USE_SYSTEM_GMTIME + Should we use the system functions if the time is inside their range? + Your system localtime() is probably more accurate, but our gmtime() is + fast and safe. +*/ +#define USE_SYSTEM_LOCALTIME +/* #define USE_SYSTEM_GMTIME */ + + +/* SYSTEM_LOCALTIME_MAX + SYSTEM_LOCALTIME_MIN + SYSTEM_GMTIME_MAX + SYSTEM_GMTIME_MIN + Maximum and minimum values your system's gmtime() and localtime() + can handle. We will use your system functions if the time falls + inside these ranges. +*/ +#define SYSTEM_LOCALTIME_MAX LOCALTIME_MAX +#define SYSTEM_LOCALTIME_MIN LOCALTIME_MIN +#define SYSTEM_GMTIME_MAX GMTIME_MAX +#define SYSTEM_GMTIME_MIN GMTIME_MIN + +#endif TIME64_CONFIG_H |