nixpkgs/pkgs/development/libraries/ppl/ppl-cstddef.patch
Bjørn Forsman 2b2e7c2730 ppl: 1.0 -> 1.1, add patch to fix current ptrdiff_t build error
I'm updating to 1.1 because that's the version that the patch from
Fedora, which fixes ptrdiff_t build error, applies to.

Removing old patch that doesn't apply anymore. (The patch seems to be
fixing a build error that no longer exist, see
https://bugs.gentoo.org/show_bug.cgi?id=447928.)
2015-07-23 14:39:28 +02:00

239 lines
9.0 KiB
Diff

diff -up ppl-1.1/src/Dense_Row_defs.hh.orig ppl-1.1/src/Dense_Row_defs.hh
--- ppl-1.1/src/Dense_Row_defs.hh.orig 2014-04-29 13:08:10.516682937 -0300
+++ ppl-1.1/src/Dense_Row_defs.hh 2014-04-29 13:08:50.447684466 -0300
@@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ .
#include <memory>
#include <vector>
#include <limits>
+#include <cstddef>
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
//! A finite sequence of coefficients.
@@ -433,7 +434,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef value_type& reference;
@@ -474,7 +475,7 @@ class Parma_Polyhedra_Library::Dense_Row
public:
typedef const Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef Coefficient_traits::const_reference reference;
diff -up ppl-1.1/src/Linear_Expression_Interface_defs.hh.orig ppl-1.1/src/Linear_Expression_Interface_defs.hh
--- ppl-1.1/src/Linear_Expression_Interface_defs.hh.orig 2014-04-29 13:08:17.337683198 -0300
+++ ppl-1.1/src/Linear_Expression_Interface_defs.hh 2014-04-29 13:08:40.999684104 -0300
@@ -32,6 +32,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Sparse_Row_types.hh"
#include <vector>
#include <set>
+#include <cstddef>
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
//! A linear expression.
@@ -65,7 +66,7 @@ public:
public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef const Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef Coefficient_traits::const_reference reference;
diff -up ppl-1.1/src/CO_Tree_defs.hh.orig ppl-1.1/src/CO_Tree_defs.hh
--- ppl-1.1/src/CO_Tree_defs.hh.orig 2014-04-29 13:11:33.725690719 -0300
+++ ppl-1.1/src/CO_Tree_defs.hh 2014-04-29 13:11:55.943691569 -0300
@@ -28,6 +28,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Coefficient_defs.hh"
#include <memory>
+#include <cstddef>
#ifndef PPL_CO_TREE_EXTRA_DEBUG
#ifdef PPL_ABI_BREAKING_EXTRA_DEBUG
@@ -159,7 +160,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef const data_type value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef data_type_const_reference reference;
@@ -314,7 +315,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef data_type value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef value_type& reference;
diff -up ppl-1.1/src/CO_Tree_inlines.hh.orig ppl-1.1/src/CO_Tree_inlines.hh
--- ppl-1.1/src/CO_Tree_inlines.hh.orig 2014-04-29 13:14:12.738696808 -0300
+++ ppl-1.1/src/CO_Tree_inlines.hh 2014-04-29 13:14:48.887698192 -0300
@@ -24,6 +24,8 @@ site: http://bugseng.com/products/ppl/ .
#ifndef PPL_CO_Tree_inlines_hh
#define PPL_CO_Tree_inlines_hh 1
+#include <cstddef>
+
namespace Parma_Polyhedra_Library {
inline dimension_type
@@ -31,7 +33,7 @@ CO_Tree::dfs_index(const_iterator itr) c
PPL_ASSERT(itr.current_index != 0);
PPL_ASSERT(itr.current_index >= indexes + 1);
PPL_ASSERT(itr.current_index <= indexes + reserved_size);
- const ptrdiff_t index = itr.current_index - indexes;
+ const std::ptrdiff_t index = itr.current_index - indexes;
return static_cast<dimension_type>(index);
}
@@ -40,7 +42,7 @@ CO_Tree::dfs_index(iterator itr) const {
PPL_ASSERT(itr.current_index != 0);
PPL_ASSERT(itr.current_index >= indexes + 1);
PPL_ASSERT(itr.current_index <= indexes + reserved_size);
- const ptrdiff_t index = itr.current_index - indexes;
+ const std::ptrdiff_t index = itr.current_index - indexes;
return static_cast<dimension_type>(index);
}
@@ -772,7 +774,7 @@ CO_Tree::tree_iterator::follow_left_chil
p -= (offset - 1);
while (*p == unused_index)
++p;
- const ptrdiff_t distance = p - tree.indexes;
+ const std::ptrdiff_t distance = p - tree.indexes;
PPL_ASSERT(distance >= 0);
i = static_cast<dimension_type>(distance);
offset = least_significant_one_mask(i);
@@ -787,7 +789,7 @@ CO_Tree::tree_iterator::follow_right_chi
p += (offset - 1);
while (*p == unused_index)
--p;
- const ptrdiff_t distance = p - tree.indexes;
+ const std::ptrdiff_t distance = p - tree.indexes;
PPL_ASSERT(distance >= 0);
i = static_cast<dimension_type>(distance);
offset = least_significant_one_mask(i);
diff -up ppl-1.1/src/Linear_Expression_defs.hh.orig ppl-1.1/src/Linear_Expression_defs.hh
--- ppl-1.1/src/Linear_Expression_defs.hh.orig 2014-04-29 13:15:39.793700141 -0300
+++ ppl-1.1/src/Linear_Expression_defs.hh 2014-04-29 13:16:07.464701201 -0300
@@ -51,6 +51,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Linear_Expression_Interface_defs.hh"
#include "Variable_defs.hh"
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -381,7 +382,7 @@ public:
public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef const Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef Coefficient_traits::const_reference reference;
diff -up ppl-1.1/src/CO_Tree.cc.orig ppl-1.1/src/CO_Tree.cc
--- ppl-1.1/src/CO_Tree.cc.orig 2014-04-29 13:19:37.192709232 -0300
+++ ppl-1.1/src/CO_Tree.cc 2014-04-29 13:19:58.000710029 -0300
@@ -954,7 +954,7 @@ PPL::CO_Tree
--subtree_size;
}
- const ptrdiff_t distance = first_unused_index - indexes;
+ const std::ptrdiff_t distance = first_unused_index - indexes;
PPL_ASSERT(distance >= 0);
return static_cast<dimension_type>(distance);
}
diff -up ppl-1.1/src/Constraint_System_defs.hh.orig ppl-1.1/src/Constraint_System_defs.hh
--- ppl-1.1/src/Constraint_System_defs.hh.orig 2014-04-29 13:30:05.530733294 -0300
+++ ppl-1.1/src/Constraint_System_defs.hh 2014-04-29 13:30:27.167734122 -0300
@@ -37,6 +37,7 @@ site: http://bugseng.com/products/ppl/ .
#include "termination_types.hh"
#include <iterator>
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -609,7 +610,7 @@ for (Constraint_System::const_iterator i
class Parma_Polyhedra_Library::Constraint_System_const_iterator
: public std::iterator<std::forward_iterator_tag,
Constraint,
- ptrdiff_t,
+ std::ptrdiff_t,
const Constraint*,
const Constraint&> {
public:
diff -up ppl-1.1/src/Congruence_System_defs.hh.orig ppl-1.1/src/Congruence_System_defs.hh
--- ppl-1.1/src/Congruence_System_defs.hh.orig 2014-04-29 13:33:56.927742155 -0300
+++ ppl-1.1/src/Congruence_System_defs.hh 2014-04-29 13:34:15.535742867 -0300
@@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Congruence_defs.hh"
#include "Constraint_System_types.hh"
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -249,7 +250,7 @@ public:
class const_iterator
: public std::iterator<std::forward_iterator_tag,
Congruence,
- ptrdiff_t,
+ std::ptrdiff_t,
const Congruence*,
const Congruence&> {
public:
diff -up ppl-1.1/src/Generator_System_defs.hh.orig ppl-1.1/src/Generator_System_defs.hh
--- ppl-1.1/src/Generator_System_defs.hh.orig 2014-04-29 13:44:30.122766402 -0300
+++ ppl-1.1/src/Generator_System_defs.hh 2014-04-29 13:44:48.167767093 -0300
@@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Poly_Con_Relation_defs.hh"
#include "Polyhedron_types.hh"
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -679,7 +680,7 @@ copy(gs.begin(), gs.end(), ostream_itera
class Parma_Polyhedra_Library::Generator_System_const_iterator
: public std::iterator<std::forward_iterator_tag,
Generator,
- ptrdiff_t,
+ std::ptrdiff_t,
const Generator*,
const Generator&> {
public:
diff -up ppl-1.1/src/Grid_Generator_System_defs.hh.orig ppl-1.1/src/Grid_Generator_System_defs.hh
--- ppl-1.1/src/Grid_Generator_System_defs.hh.orig 2014-04-29 13:45:26.073768544 -0300
+++ ppl-1.1/src/Grid_Generator_System_defs.hh 2014-04-29 13:45:42.535769175 -0300
@@ -31,6 +31,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Variables_Set_types.hh"
#include "Polyhedron_types.hh"
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -277,7 +278,7 @@ public:
class const_iterator
: public std::iterator<std::forward_iterator_tag,
Grid_Generator,
- ptrdiff_t,
+ std::ptrdiff_t,
const Grid_Generator*,
const Grid_Generator&> {
public: