]> www.ginac.de Git - cln.git/commitdiff
Support x32 ABI.
authorDaniel Schepler <schepler@debian.org>
Fri, 15 Feb 2013 21:59:24 +0000 (22:59 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Fri, 15 Feb 2013 21:59:24 +0000 (22:59 +0100)
Fix autoconf test checking whether mp_limb_t needs to be long long,
which is needed on x32.

include/cln/object.h
m4/gmp.m4

index ad0f2f890be735cceab808aa88ea711746b76857..3a47117b315fed1c1e851bf95158262b8b0a5a81 100644 (file)
@@ -22,10 +22,10 @@ namespace cln {
 #if defined(__m68k__)
   #define cl_word_alignment  2
 #endif
-#if defined(__i386__) || defined(__mips__) || defined(__mipsel__) || (defined(__sparc__) && !defined(__arch64__)) || defined(__hppa__) || defined(__arm__) || defined(__rs6000__) || defined(__m88k__) || defined(__convex__) || (defined(__s390__) && !defined(__s390x__)) || defined(__sh__)
+#if defined(__i386__) || defined(__mips__) || defined(__mipsel__) || (defined(__sparc__) && !defined(__arch64__)) || defined(__hppa__) || defined(__arm__) || defined(__rs6000__) || defined(__m88k__) || defined(__convex__) || (defined(__s390__) && !defined(__s390x__)) || defined(__sh__) || (defined(__x86_64__) && defined(__ILP32__))
   #define cl_word_alignment  4
 #endif
-#if defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__s390x__)
+#if defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(__s390x__)
   #define cl_word_alignment  8
 #endif
 #if !defined(cl_word_alignment)
index 455c200fcf062540f34d927777a61d3be1cc5f8b..1d7ae99c1dfd7ff37f73a6247fb83fcef98a7daa 100644 (file)
--- a/m4/gmp.m4
+++ b/m4/gmp.m4
@@ -52,7 +52,7 @@ AC_DEFUN([CL_GMP_SET_UINTD],
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>
         template<bool COND> struct Static_Assert;
         template<> struct Static_Assert<true> { };
-        Static_Assert<sizeof(mp_limb_t) > sizeof(long)> check;]], [[]])],
+        Static_Assert<(sizeof(mp_limb_t) > sizeof(long))> check;]], [[]])],
         [cl_gmp_demands='GMP_DEMANDS_UINTD_LONG_LONG'], [])
     if test "x$cl_gmp_demands" = "xUNKNOWN"; then
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>