diff options
Diffstat (limited to 'lib/erl_interface')
-rw-r--r-- | lib/erl_interface/configure.in | 4 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in index 9e52a2adcf..0a8fbf513c 100644 --- a/lib/erl_interface/configure.in +++ b/lib/erl_interface/configure.in @@ -100,7 +100,9 @@ AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(long long) -if test $ac_cv_sizeof_void_p = 8; then +dnl We set EI_64BIT mode when long is 8 bytes, this makes things +dnl work on windows and unix correctly +if test $ac_cv_sizeof_long = 8; then CFLAGS="$CFLAGS -DEI_64BIT" fi diff --git a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c index 30f5fe33a0..cfe9083065 100644 --- a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c +++ b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c @@ -377,8 +377,14 @@ TESTCASE(test_ei_decode_ulong) EI_DECODE_2 (decode_ulong, 11, unsigned long, ll(0x8000000000000000)); EI_DECODE_2 (decode_ulong, 11, unsigned long, ll(0xffffffffffffffff)); } else { - EI_DECODE_2 (decode_ulong, 7, unsigned long, 0x80000000); - EI_DECODE_2 (decode_ulong, 7, unsigned long, 0xffffffff); + if (sizeof(void*) > 4) { + /* Windows */ + EI_DECODE_2_FAIL(decode_ulong, 11, unsigned long, ll(0x8000000000000000)); + EI_DECODE_2_FAIL(decode_ulong, 11, unsigned long, ll(0xffffffffffffffff)); + } else { + EI_DECODE_2 (decode_ulong, 7, unsigned long, 0x80000000); + EI_DECODE_2 (decode_ulong, 7, unsigned long, 0xffffffff); + } } EI_DECODE_2_FAIL(decode_ulong, 9, unsigned long, ll(0x7fffffffffff)); |