aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorunknown <[email protected]>2011-02-22 17:29:46 +0100
committerPatrik Nyblom <[email protected]>2011-12-02 15:21:10 +0100
commit7b3596ba1521f201c9416fc7a0385cb7e6c6f495 (patch)
treed3c0f1152ec3ee094e3fb142c091d89786b5ac46 /erts/emulator/beam/sys.h
parentdef5331a201ab811150599b969abf751a4954ceb (diff)
downloadotp-7b3596ba1521f201c9416fc7a0385cb7e6c6f495.tar.gz
otp-7b3596ba1521f201c9416fc7a0385cb7e6c6f495.tar.bz2
otp-7b3596ba1521f201c9416fc7a0385cb7e6c6f495.zip
Build Win64 Erlang emulator using MSYS
Still does not run, just compiles.
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r--erts/emulator/beam/sys.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 94c36c8c59..89955100c6 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -221,7 +221,8 @@ int real_printf(const char *fmt, ...);
*/
#if !((SIZEOF_VOID_P >= 4) && (SIZEOF_VOID_P == SIZEOF_SIZE_T) \
- && ((SIZEOF_VOID_P == SIZEOF_INT) || (SIZEOF_VOID_P == SIZEOF_LONG)))
+ && ((SIZEOF_VOID_P == SIZEOF_INT) || (SIZEOF_VOID_P == SIZEOF_LONG) || \
+ (SIZEOF_VOID_P == SIZEOF_LONG_LONG)))
#error Cannot handle this combination of int/long/void*/size_t sizes
#endif
@@ -262,9 +263,18 @@ typedef int Sint;
#if SIZEOF_VOID_P == SIZEOF_LONG
typedef unsigned long UWord;
typedef long SWord;
+#define SWORD_CONSTANT(Const) Const##L
+#define UWORD_CONSTANT(Const) Const##UL
#elif SIZEOF_VOID_P == SIZEOF_INT
typedef unsigned int UWord;
typedef int SWord;
+#define SWORD_CONSTANT(Const) Const
+#define UWORD_CONSTANT(Const) Const##U
+#elif SIZEOF_VOID_P == SIZEOF_LONG_LONG
+typedef unsigned long long UWord;
+typedef long long SWord;
+#define SWORD_CONSTANT(Const) Const##LL
+#define UWORD_CONSTANT(Const) Const##ULL
#else
#error Found no appropriate type to use for 'Eterm', 'Uint' and 'Sint'
#endif
@@ -275,12 +285,23 @@ typedef int SWord;
typedef unsigned long Eterm;
typedef unsigned long Uint;
typedef long Sint;
+#define SWORD_CONSTANT(Const) Const##L
+#define UWORD_CONSTANT(Const) Const##UL
#define ERTS_SIZEOF_ETERM SIZEOF_LONG
#elif SIZEOF_VOID_P == SIZEOF_INT
typedef unsigned int Eterm;
typedef unsigned int Uint;
typedef int Sint;
+#define SWORD_CONSTANT(Const) Const
+#define UWORD_CONSTANT(Const) Const##U
#define ERTS_SIZEOF_ETERM SIZEOF_INT
+#elif SIZEOF_VOID_P == SIZEOF_LONG_LONG
+typedef unsigned long long Eterm;
+typedef unsigned long long Uint;
+typedef long long Sint;
+#define SWORD_CONSTANT(Const) Const##LL
+#define UWORD_CONSTANT(Const) Const##ULL
+#define ERTS_SIZEOF_ETERM SIZEOF_LONG_LONG
#else
#error Found no appropriate type to use for 'Eterm', 'Uint' and 'Sint'
#endif