diff --git a/boost-add_timer_canceling_test.patch b/boost-add_timer_canceling_test.patch new file mode 100644 index 0000000..3c429bb --- /dev/null +++ b/boost-add_timer_canceling_test.patch @@ -0,0 +1,38 @@ +Add a test for timer canceling. + +--- libs/asio/test/deadline_timer.cpp ++++ libs/asio/test/deadline_timer.cpp +@@ -180,8 +180,33 @@ + } + ++void timer_handler(const boost::system::error_code&) ++{ ++} ++ ++void deadline_timer_cancel_test() ++{ ++ static boost::asio::io_service io_service; ++ struct timer ++ { ++ boost::asio::deadline_timer t; ++ timer() : t(io_service) { t.expires_at(boost::posix_time::pos_infin); } ++ } timers[50]; ++ ++ timers[2].t.async_wait(timer_handler); ++ timers[41].t.async_wait(timer_handler); ++ for (int i = 10; i < 20; ++i) ++ timers[i].t.async_wait(timer_handler); ++ ++ BOOST_CHECK(timers[2].t.cancel() == 1); ++ BOOST_CHECK(timers[41].t.cancel() == 1); ++ for (int i = 10; i < 20; ++i) ++ BOOST_CHECK(timers[i].t.cancel() == 1); ++} ++ + test_suite* init_unit_test_suite(int, char*[]) + { + test_suite* test = BOOST_TEST_SUITE("deadline_timer"); + test->add(BOOST_TEST_CASE(&deadline_timer_test)); ++ test->add(BOOST_TEST_CASE(&deadline_timer_cancel_test)); + return test; + } diff --git a/boost-fix_hash_resizing.patch b/boost-fix_hash_resizing.patch new file mode 100644 index 0000000..fb62a0d --- /dev/null +++ b/boost-fix_hash_resizing.patch @@ -0,0 +1,15 @@ +--- boost/asio/detail/hash_map.hpp ++++ boost/asio/detail/hash_map.hpp +@@ -232,7 +232,11 @@ + buckets_[bucket].first = buckets_[bucket].last = iter++; + } ++ else if (++buckets_[bucket].last == iter) ++ { ++ ++iter; ++ } + else + { +- values_.splice(++buckets_[bucket].last, values_, iter++); ++ values_.splice(buckets_[bucket].last, values_, iter++); + --buckets_[bucket].last; + } diff --git a/boost-function_without_exception.patch b/boost-function_without_exception.patch new file mode 100644 index 0000000..3360d77 --- /dev/null +++ b/boost-function_without_exception.patch @@ -0,0 +1,17 @@ +The ifdef is misplaced and leads to compilation errors when +when BOOST_NO_EXCEPTIONS is defined (bnc#479659). + +--- boost/function/function_template.hpp ++++ boost/function/function_template.hpp +@@ -950,10 +950,10 @@ + f.vtable->manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; +-#if !defined(BOOST_NO_EXCEPTIONS) + } else { + clear(); + } ++#if !defined(BOOST_NO_EXCEPTIONS) + } catch (...) { + vtable = 0; + throw; diff --git a/boost.changes b/boost.changes index 5d29c9f..f3b5b35 100644 --- a/boost.changes +++ b/boost.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Aug 6 18:50:30 CEST 2009 - pth@suse.de + +- Add a fix from boost bugtracker that fixes the hash resizing + (boost#54376) +- Add a test for cancelling deadline timers from the same changeset. + +------------------------------------------------------------------- +Tue Aug 4 13:13:27 CEST 2009 - pth@suse.de + +- Readd the patch to fix the misplaced ifdef in + template_function.hpp:move_assign. + ------------------------------------------------------------------- Tue Jul 28 22:01:41 CEST 2009 - coolo@novell.com diff --git a/boost.spec b/boost.spec index 62162ff..97022fd 100644 --- a/boost.spec +++ b/boost.spec @@ -45,7 +45,7 @@ Group: Development/Libraries/C and C++ Summary: Boost C++ Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-build Version: 1.39.0 -Release: 1 +Release: 2 Source0: %{name}_1_39_0.tar.bz2 Source1: boost-rpmlintrc Source2: boost_1_33_1_man.tar.bz2 @@ -62,6 +62,9 @@ Patch8: boost-no_segfault_in_Regex_filter.patch Patch19: boost-sane_versioning.patch Patch20: boost-strict_aliasing.patch Patch21: boost-lib64.patch +Patch22: boost-function_without_exception.patch +Patch23: boost-fix_hash_resizing.patch +Patch24: boost-add_timer_canceling_test.patch Recommends: %{all_libs} %define _docdir %{_datadir}/doc/packages/boost-%{version} @@ -314,6 +317,9 @@ find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {} %patch19 %patch20 %patch21 +%patch22 +%patch23 +%patch24 #stupid build machinery copies .orig files find . -name \*.orig -exec rm {} + diff --git a/boost.spec.in b/boost.spec.in index a35092b..943d96d 100644 --- a/boost.spec.in +++ b/boost.spec.in @@ -72,6 +72,9 @@ Patch8: boost-no_segfault_in_Regex_filter.patch Patch19: boost-sane_versioning.patch Patch20: boost-strict_aliasing.patch Patch21: boost-lib64.patch +Patch22: boost-function_without_exception.patch +Patch23: boost-fix_hash_resizing.patch +Patch24: boost-add_timer_canceling_test.patch Recommends: %{all_libs} %define _docdir %{_datadir}/doc/packages/boost-%{version} @@ -324,6 +327,9 @@ find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {} %patch19 %patch20 %patch21 +%patch22 +%patch23 +%patch24 #stupid build machinery copies .orig files find . -name \*.orig -exec rm {} +