aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.h
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-08-30 14:34:44 +0200
committerPatrik Nyblom <[email protected]>2010-08-30 14:34:44 +0200
commit4b1874b90cf7513b01a364275f253f5df71d2c37 (patch)
tree4658a1cc7e9fd4a71a44ec7207d84258fbd883e0 /erts/emulator/beam/erl_nif.h
parent6dd774dca98cf408c091d8fd9636df6af2f204f1 (diff)
parent88def63e43ca7f9f3914b7e7c58dc50282c00f53 (diff)
downloadotp-4b1874b90cf7513b01a364275f253f5df71d2c37.tar.gz
otp-4b1874b90cf7513b01a364275f253f5df71d2c37.tar.bz2
otp-4b1874b90cf7513b01a364275f253f5df71d2c37.zip
Merge branch 'sverker/NIF-64bit-integers/OTP-8746' into dev
* sverker/NIF-64bit-integers/OTP-8746: Make windows 64bit types be declared more consistently Teach Windows about the int64 functions NIF doc official support note 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..ee3a7cd5f4 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__) || defined(_WIN32) || 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