diff options
author | Patrik Nyblom <[email protected]> | 2010-08-30 14:34:44 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-08-30 14:34:44 +0200 |
commit | 4b1874b90cf7513b01a364275f253f5df71d2c37 (patch) | |
tree | 4658a1cc7e9fd4a71a44ec7207d84258fbd883e0 /erts/emulator/beam/erl_nif.h | |
parent | 6dd774dca98cf408c091d8fd9636df6af2f204f1 (diff) | |
parent | 88def63e43ca7f9f3914b7e7c58dc50282c00f53 (diff) | |
download | otp-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.h | 13 |
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 |