2
0

001-gmp_5_fix.patch 1.3 KB

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