[project @ 1997-09-03 23:45:41 by sof]
authorsof <unknown>
Wed, 3 Sep 1997 23:45:41 +0000 (23:45 +0000)
committersof <unknown>
Wed, 3 Sep 1997 23:45:41 +0000 (23:45 +0000)
Tidied; timezone now have type TYPE_TIMEZONE

ghc/lib/cbits/timezone.h

index a67faf6..7ea664c 100644 (file)
 #define ZONE(x)                 (((struct tm *)x)->tm_zone)
 #define SETZONE(x,z)     (((struct tm *)x)->tm_zone = z)
 #define GMTOFF(x)        (((struct tm *)x)->tm_gmtoff)
-#else 
-#if HAVE_TZNAME
+#else /* ! HAVE_TM_ZONE */
+# if HAVE_TZNAME
 extern char *tzname[2];
-#define ZONE(x)                 (((struct tm *)x)->tm_isdst ? tzname[1] : tzname[0])
-#define SETZONE(x,z)
-#else
+#  define ZONE(x)       (((struct tm *)x)->tm_isdst ? tzname[1] : tzname[0])
+#  define SETZONE(x,z)
+# else /* ! HAVE_TZNAME */
 /* We're in trouble. If you should end up here, please report this as a bug. */
-#error Dont know how to get at timezone name on your OS.
-#endif
+#  error Dont know how to get at timezone name on your OS.
+# endif /* ! HAVE_TZNAME */
 /* Get the offset in secs from UTC, if (struct tm) doesn't supply it. */
-extern time_t timezone;
-#if HAVE_ALTZONE
+
+extern TYPE_TIMEZONE timezone;
+
+# if HAVE_ALTZONE
 extern time_t altzone;
-#define GMTOFF(x)       (((struct tm *)x)->tm_isdst ? altzone : timezone)
-#else
+#  define GMTOFF(x)     (((struct tm *)x)->tm_isdst ? altzone : timezone)
+# else /* ! HAVE_ALTZONE */
 /* Assume that DST offset is 1 hour ... */
-#define GMTOFF(x) (((struct tm *)x)->tm_isdst ? (timezone - 3600) : timezone)
-#endif
-#endif
+#  define GMTOFF(x) (((struct tm *)x)->tm_isdst ? (timezone - 3600) : timezone)
+# endif /* ! HAVE_ALTZONE */
+#endif  /* ! HAVE_TM_ZONE */
 
-#endif
+#endif /* TIMEZONE_H */