summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-01-11 15:22:06 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-01-11 15:22:06 +0000
commit4a50763d37a49901b0a732e272a55ec8515dd840 (patch)
treeb5b15efb075c140ff047d7a63923025ab1ef353c
parent81478450436e0d73e3f44e3364e89d080b2f117a (diff)
downloadmpfr-4a50763d37a49901b0a732e272a55ec8515dd840.tar.gz
Patch from Patrick PĂ©lissier[*] to be able to build MPFR with GMP 5
internal files (--with-gmp-build). Note: this is not the same patch as in the trunk, in order to keep the patch minimal. [*] https://sympa.inria.fr/sympa/arc/mpfr/2010-01/msg00011.html git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.4@6651 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--configure.in3
-rw-r--r--mpfr-impl.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index d45c6bff6..0d79bdcfa 100644
--- a/configure.in
+++ b/configure.in
@@ -424,6 +424,9 @@ if test -n "$gmp_internal_file_check" ; then
#include "gmp.h"
#include "gmp-impl.h"
]], [[
+#ifndef BITS_PER_MP_LIMB
+#define BITS_PER_MP_LIMB GMP_LIMB_BITS
+#endif
return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT
&& sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
]])], [AC_MSG_RESULT(yes)], [
diff --git a/mpfr-impl.h b/mpfr-impl.h
index e156e74ee..a4202d4cc 100644
--- a/mpfr-impl.h
+++ b/mpfr-impl.h
@@ -65,6 +65,12 @@ MA 02110-1301, USA. */
# ifndef __GMP_IMPL_H__
# include "gmp-impl.h"
# endif
+# ifndef BITS_PER_MP_LIMB
+# define BITS_PER_MP_LIMB GMP_LIMB_BITS
+# endif
+#ifndef mpn_sqr_n
+# define mpn_sqr_n mpn_sqr
+#endif
# ifdef MPFR_NEED_LONGLONG_H
# include "longlong.h"
# endif