-- to compile on sparc-solaris. Blargh.
-- -----------------------------------------------------------------------------
--- $Id: Time.hsc,v 1.7 2001/01/26 16:16:19 rrt Exp $
+-- $Id: Time.hsc,v 1.9 2001/01/30 10:59:04 simonmar Exp $
--
-- (c) The University of Glasgow, 1995-2001
--
# include <time.h>
#endif
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_TIMEB_H
#include <sys/timeb.h>
#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
import Ix
import Locale
# endif
# ifndef mingw32_TARGET_OS
foreign label tzname :: Ptr (Ptr CChar)
+# else
+foreign import "ghcTimezone" unsafe timezone :: Ptr CLong
+foreign import "ghcTzname" unsafe tzname :: Ptr (Ptr CChar)
+# def inline long *ghcTimezone(void) { return &_timezone; }
+# def inline char **ghcTzname(void) { return _tzname; }
# endif
zone x = do
dst <- (#peek struct tm,tm_isdst) x
#if HAVE_FTIME
type CTimeB = ()
+#ifndef mingw32_TARGET_OS
foreign import unsafe ftime :: Ptr CTimeB -> IO CInt
+#else
+foreign import unsafe ftime :: Ptr CTimeB -> IO ()
+#endif
#endif