aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2011-12-08 14:35:37 +0100
committerPatrik Nyblom <[email protected]>2011-12-08 16:35:08 +0100
commit0bc41116c9bb4e0a2958b99c539d64a7ee068a0e (patch)
tree04940cb0fb8ad92282f078e0de503b5b9e0e34e5 /erts/emulator/beam/sys.h
parent6cd08b5fc2e2b34dba816735ae1864bf68362791 (diff)
downloadotp-0bc41116c9bb4e0a2958b99c539d64a7ee068a0e.tar.gz
otp-0bc41116c9bb4e0a2958b99c539d64a7ee068a0e.tar.bz2
otp-0bc41116c9bb4e0a2958b99c539d64a7ee068a0e.zip
Make erl_alloc.c use correct strtol variant on windows
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r--erts/emulator/beam/sys.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 6b4b382caa..eb6f2f8516 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -256,6 +256,7 @@ typedef unsigned int Eterm;
typedef unsigned int Uint;
typedef int Sint;
#define ERTS_SIZEOF_ETERM SIZEOF_INT
+#define ErtsStrToSint strtol
#else
#error Found no appropriate type to use for 'Eterm', 'Uint' and 'Sint'
#endif
@@ -288,6 +289,7 @@ typedef long Sint;
#define SWORD_CONSTANT(Const) Const##L
#define UWORD_CONSTANT(Const) Const##UL
#define ERTS_SIZEOF_ETERM SIZEOF_LONG
+#define ErtsStrToSint strtol
#elif SIZEOF_VOID_P == SIZEOF_INT
typedef unsigned int Eterm;
typedef unsigned int Uint;
@@ -295,6 +297,7 @@ typedef int Sint;
#define SWORD_CONSTANT(Const) Const
#define UWORD_CONSTANT(Const) Const##U
#define ERTS_SIZEOF_ETERM SIZEOF_INT
+#define ErtsStrToSint strtol
#elif SIZEOF_VOID_P == SIZEOF_LONG_LONG
typedef unsigned long long Eterm;
typedef unsigned long long Uint;
@@ -302,6 +305,11 @@ typedef long long Sint;
#define SWORD_CONSTANT(Const) Const##LL
#define UWORD_CONSTANT(Const) Const##ULL
#define ERTS_SIZEOF_ETERM SIZEOF_LONG_LONG
+#if defined(__WIN32__)
+#define ErtsStrToSint _strtoi64
+#else
+#define ErtsStrToSint strtoll
+#endif
#else
#error Found no appropriate type to use for 'Eterm', 'Uint' and 'Sint'
#endif