[project @ 2000-03-23 10:53:26 by sewardj]
authorsewardj <unknown>
Thu, 23 Mar 2000 10:53:26 +0000 (10:53 +0000)
committersewardj <unknown>
Thu, 23 Mar 2000 10:53:26 +0000 (10:53 +0000)
storage.h needs to see a machine-dependant file-timestamp type for
use in Module symbol table entries -- hence this file.

ghc/interpreter/machdep_time.h [new file with mode: 0644]

diff --git a/ghc/interpreter/machdep_time.h b/ghc/interpreter/machdep_time.h
new file mode 100644 (file)
index 0000000..63f9bb5
--- /dev/null
@@ -0,0 +1,22 @@
+
+#ifndef MACHDEP_TIME_INCLUDED
+#define MACHDEP_TIME_INCLUDED
+
+#ifdef HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if RISCOS
+typedef struct { unsigned hi, lo; } Time;
+#define timeChanged(now,thn)    (now.hi!=thn.hi || now.lo!=thn.lo)
+#define timeSet(var,tm)         var.hi = tm.hi; var.lo = tm.lo
+#error  firstTimeIsLater, whicheverIsLater needs implementing
+#else
+typedef time_t Time;
+#define timeChanged(now,thn)      (now!=thn)
+#define timeSet(var,tm)           var = tm
+#define firstTimeIsLater(t1,t2)   ((t1)>(t2))
+#define whicheverIsLater(t1,t2)   (((t1)>(t2)) ? (t1) : (t2))
+#endif
+
+#endif