From 4fa6dfa51bbb5952023a0a2ec3c536c75bd76ba4 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 24 Nov 1997 20:39:34 +0000 Subject: [PATCH] [project @ 1997-11-24 20:39:33 by sof] Bogus workaround to get cygwin32-b18 apps using Time compile and link --- ghc/lib/cbits/timezone.h | 6 +++++- ghc/lib/cbits/toUTCTime.lc | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ghc/lib/cbits/timezone.h b/ghc/lib/cbits/timezone.h index 7ea664c..46b907f 100644 --- a/ghc/lib/cbits/timezone.h +++ b/ghc/lib/cbits/timezone.h @@ -19,8 +19,12 @@ #define SETZONE(x,z) (((struct tm *)x)->tm_zone = z) #define GMTOFF(x) (((struct tm *)x)->tm_gmtoff) #else /* ! HAVE_TM_ZONE */ -# if HAVE_TZNAME +# if HAVE_TZNAME || cygwin32_TARGET_OS +#if cygwin32_TARGET_OS +extern char *tzname; +#else extern char *tzname[2]; +#endif # define ZONE(x) (((struct tm *)x)->tm_isdst ? tzname[1] : tzname[0]) # define SETZONE(x,z) # else /* ! HAVE_TZNAME */ diff --git a/ghc/lib/cbits/toUTCTime.lc b/ghc/lib/cbits/toUTCTime.lc index cb6bd10..86f449e 100644 --- a/ghc/lib/cbits/toUTCTime.lc +++ b/ghc/lib/cbits/toUTCTime.lc @@ -9,6 +9,11 @@ #include "timezone.h" #include "stgio.h" +#ifdef cygwin32_TARGET_OS +extern char *_tzname; +char *tzname; +#endif + StgAddr toUTCTime(I_ size, StgByteArray d, StgByteArray res) { -- 1.7.10.4