complibs/ppl: Fix build of ppl 0.11.2 with gmp 5.1 and later
authorBernhard Walle <bernhard@bwalle.de>
Sun Dec 08 12:53:14 2013 +0100 (2013-12-08)
changeset 325315c6976026f3
parent 3252 7e569a9cb5fd
child 3254 e2e0f34eab6c
complibs/ppl: Fix build of ppl 0.11.2 with gmp 5.1 and later

The fix is backported from
http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commitdiff;h=9f843aecc23981aec6ed1eaa8be06e6786a47f0d.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Message-Id: <9a012bed87b494cfe0d4.1386503894@euler.fritz.box>
Patchwork-Id: 298789
patches/ppl/0.11.2/400-fix-build-with-gmp-5.1.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/ppl/0.11.2/400-fix-build-with-gmp-5.1.patch	Sun Dec 08 12:53:14 2013 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +From 9f843aecc23981aec6ed1eaa8be06e6786a47f0d Mon Sep 17 00:00:00 2001
     1.5 +From: Roberto Bagnara <bagnara@cs.unipr.it>
     1.6 +Date: Wed, 19 Dec 2012 08:42:19 +0100
     1.7 +Subject: [PATCH] GMP version 5.1.0 (and, presumably, later versions) defines
     1.8 + std::numeric_limits.
     1.9 +
    1.10 +---
    1.11 + src/mp_std_bits.cc      |    6 ++++++
    1.12 + src/mp_std_bits.defs.hh |    6 ++++++
    1.13 + 2 files changed, 12 insertions(+)
    1.14 +
    1.15 +--- a/src/mp_std_bits.cc
    1.16 ++++ b/src/mp_std_bits.cc
    1.17 +@@ -26,6 +26,9 @@ site: http://www.cs.unipr.it/ppl/ . */
    1.18 + #include <ppl-config.h>
    1.19 + #include "mp_std_bits.defs.hh"
    1.20 + 
    1.21 ++#if __GNU_MP_VERSION < 5 \
    1.22 ++  || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    1.23 ++
    1.24 + const bool std::numeric_limits<mpz_class>::is_specialized;
    1.25 + const int std::numeric_limits<mpz_class>::digits;
    1.26 + const int std::numeric_limits<mpz_class>::digits10;
    1.27 +@@ -71,3 +74,6 @@ const bool std::numeric_limits<mpq_class
    1.28 + const bool std::numeric_limits<mpq_class>::traps;
    1.29 + const bool std::numeric_limits<mpq_class>::tininess_before;
    1.30 + const std::float_round_style std::numeric_limits<mpq_class>::round_style;
    1.31 ++
    1.32 ++#endif // __GNU_MP_VERSION < 5
    1.33 ++       // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    1.34 +--- a/src/mp_std_bits.defs.hh
    1.35 ++++ b/src/mp_std_bits.defs.hh
    1.36 +@@ -39,6 +39,9 @@ void swap(mpz_class& x, mpz_class& y);
    1.37 + #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
    1.38 + void swap(mpq_class& x, mpq_class& y);
    1.39 + 
    1.40 ++#if __GNU_MP_VERSION < 5 \
    1.41 ++  || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    1.42 ++
    1.43 + namespace std {
    1.44 + 
    1.45 + #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
    1.46 +@@ -165,6 +168,9 @@ public:
    1.47 + 
    1.48 + } // namespace std
    1.49 + 
    1.50 ++#endif // __GNU_MP_VERSION < 5
    1.51 ++       // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    1.52 ++
    1.53 + #include "mp_std_bits.inlines.hh"
    1.54 + 
    1.55 + #endif // !defined(PPL_mp_std_bits_defs_hh)