summaryrefslogtreecommitdiff
path: root/ghc/lib/std/cbits/timezone.h
diff options
context:
space:
mode:
authorsimonm <unknown>1998-05-28 14:05:32 +0000
committersimonm <unknown>1998-05-28 14:05:32 +0000
commit35bb50cb53da808f5fb6eda87896a7b57e2f4292 (patch)
tree929f2f426d8ab8c12a0a03c9c842db7d218605c9 /ghc/lib/std/cbits/timezone.h
parent19d399639ccfb7eae60ce20616e76d6a39e398a4 (diff)
downloadhaskell-35bb50cb53da808f5fb6eda87896a7b57e2f4292.tar.gz
[project @ 1998-05-28 14:05:32 by simonm]
Really ugly fix for compiling Time.lhs on linux/glibc.
Diffstat (limited to 'ghc/lib/std/cbits/timezone.h')
-rw-r--r--ghc/lib/std/cbits/timezone.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ghc/lib/std/cbits/timezone.h b/ghc/lib/std/cbits/timezone.h
index 46b907f269..e9b4bdaf38 100644
--- a/ghc/lib/std/cbits/timezone.h
+++ b/ghc/lib/std/cbits/timezone.h
@@ -3,6 +3,19 @@
#define _OSF_SOURCE
+#if linux_TARGET_OS
+/* Sigh, RedHat 5 has the TM_ZONE stuff, but only when _BSD_SOURCE is
+ * on. The configure script erroneously says we've got TM_ZONE, so
+ * make sure we use the TZNAME stuff instead.
+ *
+ * Aside: tzname is POSIX, whereas tm_zone is BSD. We should be using
+ * tzname by preference, but the GNU configure stuff gives us HAVE_TM_ZONE
+ * in preference to HAVE_TZNAME. More sighs.
+ */
+# undef HAVE_TM_ZONE
+# define HAVE_TZNAME 1
+#endif
+
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>