Commit a0d384798312df3b2c79194ced81bf5a3d2afddc

Edward Thomson 2017-01-22T01:42:45

mac: on 32 bit, use `__builtin_umull_overflow`

diff --git a/src/integer.h b/src/integer.h
index b08094c..61712ce 100644
--- a/src/integer.h
+++ b/src/integer.h
@@ -55,16 +55,16 @@ GIT_INLINE(bool) git__add_uint64_overflow(uint64_t *out, uint64_t one, uint64_t 
 }
 
 /* Use clang/gcc compiler intrinsics whenever possible */
-#if (SIZE_MAX == UINT_MAX) && __has_builtin(__builtin_uadd_overflow)
-# define git__add_sizet_overflow(out, one, two) \
-	__builtin_uadd_overflow(one, two, out)
-# define git__multiply_sizet_overflow(out, one, two) \
-	__builtin_umul_overflow(one, two, out)
-#elif (SIZE_MAX == ULONG_MAX) && __has_builtin(__builtin_uaddl_overflow)
+#if (SIZE_MAX == ULONG_MAX) && __has_builtin(__builtin_uaddl_overflow)
 # define git__add_sizet_overflow(out, one, two) \
 	__builtin_uaddl_overflow(one, two, out)
 # define git__multiply_sizet_overflow(out, one, two) \
 	__builtin_umull_overflow(one, two, out)
+#elif (SIZE_MAX == UINT_MAX) && __has_builtin(__builtin_uadd_overflow)
+# define git__add_sizet_overflow(out, one, two) \
+	__builtin_uadd_overflow(one, two, out)
+# define git__multiply_sizet_overflow(out, one, two) \
+	__builtin_umul_overflow(one, two, out)
 #else
 
 /**