Accepting request 17446 from devel:libraries:c_c++

Copy from devel:libraries:c_c++/boost based on submit request 17446 from user psmt

OBS-URL: https://build.opensuse.org/request/show/17446
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/boost?expand=0&rev=33
This commit is contained in:
OBS User autobuild 2009-08-13 15:36:15 +00:00 committed by Git OBS Bridge
parent 2ee4a0afc3
commit b39ff1c8b8
6 changed files with 96 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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

View File

@ -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 {} +

View File

@ -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 {} +