diff options
author | David Tardon <dtardon@redhat.com> | 2015-06-29 14:31:57 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-06-29 14:35:10 +0200 |
commit | bead58cb4042ac42dee890e2f21ab7ea81136e54 (patch) | |
tree | 62d97ff96f973a2830c25d6d0d8f028cc7ec6cf5 /external/mdds | |
parent | 48abc97220bd95841225cf4e18cd067ef470929a (diff) |
fix build of libetonyek with older versions of gcc
Change-Id: I19586eaae36fac7fa750614e6e31eff1a1e8440c
Diffstat (limited to 'external/mdds')
-rw-r--r-- | external/mdds/0001-another-step-to-allow-fst-to-use-any-value-type.patch.1 | 55 | ||||
-rw-r--r-- | external/mdds/UnpackedTarball_mdds.mk | 1 |
2 files changed, 56 insertions, 0 deletions
diff --git a/external/mdds/0001-another-step-to-allow-fst-to-use-any-value-type.patch.1 b/external/mdds/0001-another-step-to-allow-fst-to-use-any-value-type.patch.1 new file mode 100644 index 000000000000..0c5b928679e2 --- /dev/null +++ b/external/mdds/0001-another-step-to-allow-fst-to-use-any-value-type.patch.1 @@ -0,0 +1,55 @@ +From 5fc9214fb94595e1a2c0b9e0285037f5a2fa59bf Mon Sep 17 00:00:00 2001 +From: David Tardon <dtardon@redhat.com> +Date: Mon, 29 Jun 2015 14:28:42 +0200 +Subject: [PATCH] another step to allow fst to use any value type + +For some reason this is not a problem on modern compilers... +--- + include/mdds/flat_segment_tree.hpp | 1 - + include/mdds/flat_segment_tree_def.inl | 2 +- + src/flat_segment_tree_test.cpp | 4 ++++ + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/include/mdds/flat_segment_tree.hpp b/include/mdds/flat_segment_tree.hpp +index b656bc3..02cf87e 100644 +--- a/include/mdds/flat_segment_tree.hpp ++++ b/include/mdds/flat_segment_tree.hpp +@@ -32,7 +32,6 @@ + #include <sstream> + #include <utility> + #include <cassert> +-#include <limits> + + #include "mdds/node.hpp" + #include "mdds/flat_segment_tree_itr.hpp" +diff --git a/include/mdds/flat_segment_tree_def.inl b/include/mdds/flat_segment_tree_def.inl +index ebfee99..5fef1c3 100644 +--- a/include/mdds/flat_segment_tree_def.inl ++++ b/include/mdds/flat_segment_tree_def.inl +@@ -46,7 +46,7 @@ flat_segment_tree<_Key, _Value>::flat_segment_tree(key_type min_val, key_type ma + // We don't ever use the value of the right leaf node, but we need the + // value to be always the same, to make it easier to check for + // equality. +- m_right_leaf->value_leaf.value = ::std::numeric_limits<value_type>::max(); ++ m_right_leaf->value_leaf.value = init_val; + } + + template<typename _Key, typename _Value> +diff --git a/src/flat_segment_tree_test.cpp b/src/flat_segment_tree_test.cpp +index 81858f5..f7aead7 100644 +--- a/src/flat_segment_tree_test.cpp ++++ b/src/flat_segment_tree_test.cpp +@@ -1943,6 +1943,10 @@ void fst_test_non_numeric_value() + db.search(1, result); + + assert(result == "hello world"); ++ ++ db_type db2(db); ++ ++ assert(db == db2); + } + + int main (int argc, char **argv) +-- +2.4.2 + diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk index 974a8e126c9a..504406bbb60a 100644 --- a/external/mdds/UnpackedTarball_mdds.mk +++ b/external/mdds/UnpackedTarball_mdds.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,3)) $(eval $(call gb_UnpackedTarball_add_patches,mdds,\ external/mdds/mdds_0.6.0.patch \ external/mdds/mdds-c++98.patch.0 \ + external/mdds/0001-another-step-to-allow-fst-to-use-any-value-type.patch.1 \ )) # vim: set noet sw=4 ts=4: |