This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
new perldelta
[perl5.git] / time64_config.h
index c22a115..8a8dbef 100644 (file)
@@ -1,5 +1,7 @@
-#ifndef TIME64_CONFIG_H
-#    define TIME64_CONFIG_H
+#ifndef PERL_TIME64_CONFIG_H_
+#    define PERL_TIME64_CONFIG_H_
+
+#include "reentr.h"
 
 /* Configuration
    -------------
@@ -7,11 +9,18 @@
    Sensible defaults provided.
 */
 
+/* Debugging
+   TIME_64_DEBUG
+   Define if you want debugging messages
+*/
+/* #define TIME_64_DEBUG */
+
+
 /* INT_64_T
-   A 64 bit integer type to use to store time and others.
+   A numeric type to store time and others. 
    Must be defined.
 */
-#define INT_64_T                Quad_t
+#define INT_64_T                NV
 
 
 /* USE_TM64
    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.
+   fast and safe.  Except on VMS, where we need the homegrown gmtime()
+   override to shift between UTC and local for the vmsish 'time' pragma.
 */
 #define USE_SYSTEM_LOCALTIME
-/* #define USE_SYSTEM_GMTIME */
+#ifdef VMS
+#  define USE_SYSTEM_GMTIME
+#endif
 
 
 /* SYSTEM_LOCALTIME_MAX
@@ -67,9 +79,9 @@
    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
+#define SYSTEM_LOCALTIME_MAX    CAT2(LOCALTIME_MAX,.0)
+#define SYSTEM_LOCALTIME_MIN    CAT2(LOCALTIME_MIN,.0)
+#define SYSTEM_GMTIME_MAX       CAT2(GMTIME_MAX,.0)
+#define SYSTEM_GMTIME_MIN       CAT2(GMTIME_MIN,.0)
 
-#endif TIME64_CONFIG_H
+#endif /* PERL_TIME64_CONFIG_H_ */