patches/ppl/0.11.2/400-fix-build-with-gmp-5.1.patch
author Bernhard Walle <bernhard@bwalle.de>
Sun May 11 13:00:36 2014 +0200 (2014-05-11)
changeset 3318 579bc9107f99
permissions -rw-r--r--
complibs/ppl: Fix build of ppl 0.11.2 with gcc 4.9

From: Roberto Bagnara <bagnara@cs.unipr.it>
Date: Tue, 29 Apr 2014 19:51:43 +0000 (+0200)
Subject: Added missing inclusions. Use std::ptrdiff_t.
X-Git-Url: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl%2Fppl.git;a=commitdiff;h=61d4e14dfd9f1121e9b4521dead5728b2424dd7c

Added missing inclusions. Use std::ptrdiff_t.
(Thanks to Paulo Cesar Pereira de Andrade.)

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Message-Id: <5632a171e7c1dc4c0fb5.1399806148@euler.fritz.box>
Patchwork-Id: 347777
     1 From 9f843aecc23981aec6ed1eaa8be06e6786a47f0d Mon Sep 17 00:00:00 2001
     2 From: Roberto Bagnara <bagnara@cs.unipr.it>
     3 Date: Wed, 19 Dec 2012 08:42:19 +0100
     4 Subject: [PATCH] GMP version 5.1.0 (and, presumably, later versions) defines
     5  std::numeric_limits.
     6 
     7 ---
     8  src/mp_std_bits.cc      |    6 ++++++
     9  src/mp_std_bits.defs.hh |    6 ++++++
    10  2 files changed, 12 insertions(+)
    11 
    12 --- a/src/mp_std_bits.cc
    13 +++ b/src/mp_std_bits.cc
    14 @@ -26,6 +26,9 @@ site: http://www.cs.unipr.it/ppl/ . */
    15  #include <ppl-config.h>
    16  #include "mp_std_bits.defs.hh"
    17  
    18 +#if __GNU_MP_VERSION < 5 \
    19 +  || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    20 +
    21  const bool std::numeric_limits<mpz_class>::is_specialized;
    22  const int std::numeric_limits<mpz_class>::digits;
    23  const int std::numeric_limits<mpz_class>::digits10;
    24 @@ -71,3 +74,6 @@ const bool std::numeric_limits<mpq_class
    25  const bool std::numeric_limits<mpq_class>::traps;
    26  const bool std::numeric_limits<mpq_class>::tininess_before;
    27  const std::float_round_style std::numeric_limits<mpq_class>::round_style;
    28 +
    29 +#endif // __GNU_MP_VERSION < 5
    30 +       // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    31 --- a/src/mp_std_bits.defs.hh
    32 +++ b/src/mp_std_bits.defs.hh
    33 @@ -39,6 +39,9 @@ void swap(mpz_class& x, mpz_class& y);
    34  #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
    35  void swap(mpq_class& x, mpq_class& y);
    36  
    37 +#if __GNU_MP_VERSION < 5 \
    38 +  || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    39 +
    40  namespace std {
    41  
    42  #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
    43 @@ -165,6 +168,9 @@ public:
    44  
    45  } // namespace std
    46  
    47 +#endif // __GNU_MP_VERSION < 5
    48 +       // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
    49 +
    50  #include "mp_std_bits.inlines.hh"
    51  
    52  #endif // !defined(PPL_mp_std_bits_defs_hh)