[project @ 1998-06-29 17:05:41 by sof]
authorsof <unknown>
Mon, 29 Jun 1998 17:05:41 +0000 (17:05 +0000)
committersof <unknown>
Mon, 29 Jun 1998 17:05:41 +0000 (17:05 +0000)
Haskell source includeable header file defining sizes of prim. types

ghc/includes/MachDeps.lh [new file with mode: 0644]

diff --git a/ghc/includes/MachDeps.lh b/ghc/includes/MachDeps.lh
new file mode 100644 (file)
index 0000000..7052356
--- /dev/null
@@ -0,0 +1,31 @@
+%
+% (c) The GRASP Project, Glasgow University, 1998
+%
+\section[MachDeps]{Info/sizes of STG types}
+
+NB: THIS FILE IS INCLUDED IN HASKELL SOURCE!
+
+Definitions that characterise machine specific properties
+of basic Stg types provided as unboxed types (mirrors the typedefs in StgTypes.)
+
+\begin{code}
+#ifndef MACHDEPS_H
+#define MACHDEPS_H
+
+#include "config.h"
+
+#define CHAR_SIZE_IN_BYTES     1
+#define ADDR_SIZE_IN_BYTES     SIZEOF_VOID_P
+#define INT_SIZE_IN_BYTES      SIZEOF_LONG
+#define WORD_SIZE_IN_BYTES     SIZEOF_LONG
+
+#if alpha_TARGET_ARCH
+#define FLOAT_SIZE_IN_BYTES    SIZEOF_DOUBLE
+#define DOUBLE_SIZE_IN_BYTES   SIZEOF_DOUBLE
+#else
+#define FLOAT_SIZE_IN_BYTES    SIZEOF_FLOAT
+#define DOUBLE_SIZE_IN_BYTES   SIZEOF_DOUBLE
+#endif
+
+#endif
+\end{code}