Root/tools/ppl/patches/001-gmp_5_fix.patch

1From: Roberto Bagnara <bagnara@cs.unipr.it>
2Date: Sat, 9 Jan 2010 15:32:08 +0000 (+0100)
3Subject: Added support for GMP 5.0.
4X-Git-Url: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl%2Fppl.git;a=commitdiff_plain;h=9c19bc2b318a35016e0189f9552c98910be37f53
5
6Added support for GMP 5.0.
7---
8
9diff --git a/m4/ac_check_gmp.m4 b/m4/ac_check_gmp.m4
10index 60cecdc..15acb18 100644
11--- a/m4/ac_check_gmp.m4
12+++ b/m4/ac_check_gmp.m4
13@@ -71,6 +71,10 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
14 #GMP version 4.1.3 or higher is required
15 #endif
16 
17+#ifndef BITS_PER_MP_LIMB
18+#define BITS_PER_MP_LIMB GMP_LIMB_BITS
19+#endif
20+
21 int
22 main() {
23   std::string header_version;
24@@ -97,11 +101,11 @@ main() {
25     return 1;
26   }
27 
28- if (sizeof(mp_limb_t)*CHAR_BIT != GMP_LIMB_BITS
29- || GMP_LIMB_BITS != mp_bits_per_limb) {
30+ if (sizeof(mp_limb_t)*CHAR_BIT != BITS_PER_MP_LIMB
31+ || BITS_PER_MP_LIMB != mp_bits_per_limb) {
32     std::cerr
33       << "GMP header (gmp.h) and library (ligmp.*) bits-per-limb mismatch:\n"
34- << "header gives " << __GMP_BITS_PER_MP_LIMB << ";\n"
35+ << "header gives " << BITS_PER_MP_LIMB << ";\n"
36       << "library gives " << mp_bits_per_limb << ".\n"
37       << "This probably means you are on a bi-arch system and\n"
38       << "you are compiling with the wrong header or linking with\n"
39

Archive Download this file



interactive