aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2010-07-19 19:03:15 +0200
committerSverker Eriksson <[email protected]>2010-07-23 12:20:04 +0200
commit649bc2686601d8c76c1aa76e62700067719e3312 (patch)
treefc53fa901b7839de8c5963d556e11efe41cc87da /erts/emulator/beam/erl_nif.h
parent9267b2dc792c0a7632a0dcdc0a49510eb13e465e (diff)
downloadotp-649bc2686601d8c76c1aa76e62700067719e3312.tar.gz
otp-649bc2686601d8c76c1aa76e62700067719e3312.tar.bz2
otp-649bc2686601d8c76c1aa76e62700067719e3312.zip
NIF 64-bit integer support
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r--erts/emulator/beam/erl_nif.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index 936f03bce1..533c92cb28 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -66,6 +66,19 @@
extern "C" {
#endif
+#if defined(__WIN32__)
+typedef unsigned __int64 ErlNifUInt64;
+typedef __int64 ErlNifSInt64;
+#elif SIZEOF_LONG == 8
+typedef unsigned long ErlNifUInt64;
+typedef long ErlNifSInt64;
+#elif SIZEOF_LONG_LONG == 8
+typedef unsigned long long ErlNifUInt64;
+typedef long long ErlNifSInt64;
+#else
+#error No 64-bit integer type
+#endif
+
#ifdef HALFWORD_HEAP_EMULATOR
typedef unsigned int ERL_NIF_TERM;
#else