summaryrefslogtreecommitdiff
path: root/mint/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'mint/time.h')
-rw-r--r--mint/time.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/mint/time.h b/mint/time.h
new file mode 100644
index 0000000000..d6b031db31
--- /dev/null
+++ b/mint/time.h
@@ -0,0 +1,22 @@
+/* Wrapper around broken system time.h. */
+
+#ifndef _PERL_WRAPPER_AROUND_TIME_H
+# define _PERL_WRAPPER_AROUND_TIME_H 1
+
+/* Recent versions of the MiNTLib have a macro HAS_TZNAME in
+ time.h resp. sys/time.h. Wow, I wonder why they didn't
+ define HAVE_CONFIG_H ... */
+#ifdef HAS_TZNAME
+# define PERL_HAS_TZNAME HAS_TZNAME
+#endif
+
+/* First include the system file. */
+#include_next <time.h>
+
+#ifdef HAS_TZNAME
+# undef HAS_TZNAME
+# define HAS_TZNAME PERL_HAS_TZNAME
+#endif
+
+#endif
+