From 98bc300d697d0c9f68abb6bb6eef978bce8e25c5 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Fri, 27 Jan 2017 23:23:26 +0200 Subject: [PATCH] Use __SIZEOF_INT128__ to test __int128 presence Previously we tested whether a handful of preprocessor variables indicating certain 64 bit platforms, but this does not work for other 64 bit targets which have support for __int128 in C compiler. Use the __SIZEOF__INT128__ preprocessor variable instead. This variable gets set to 16 by gcc and clang for every target where __int128 is supported. --- src/rt/rust_test_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rt/rust_test_helpers.c b/src/rt/rust_test_helpers.c index 5900b21b6126a..2a14b3da7b7d0 100644 --- a/src/rt/rust_test_helpers.c +++ b/src/rt/rust_test_helpers.c @@ -269,7 +269,7 @@ LARGE_INTEGER increment_all_parts(LARGE_INTEGER li) { return li; } -#if !(defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && defined(__amd64__) +#if __SIZEOF_INT128__ == 16 unsigned __int128 identity(unsigned __int128 a) { return a;