Apply several patches to fix problems revealed by the test suite

This commit is contained in:
Petr Machata 2013-08-23 12:29:23 +02:00
parent da0e080e4c
commit 0f7ace626f
4 changed files with 170 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -up ./boost/pool/pool.hpp~ ./boost/pool/pool.hpp
--- ./boost/pool/pool.hpp~ 2013-08-21 17:49:56.023296922 +0200
+++ ./boost/pool/pool.hpp 2013-08-22 11:38:01.133912638 +0200
@@ -361,9 +361,7 @@ class pool: protected simple_segregated_
{ //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
size_type partition_size = alloc_size();
size_type POD_size = math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
- size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
-
- return max_chunks;
+ return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
}
static void * & nextof(void * const ptr)

View File

@ -0,0 +1,31 @@
diff -up ./libs/pool/test/Jamfile.v2~ ./libs/pool/test/Jamfile.v2
--- ./libs/pool/test/Jamfile.v2~ 2011-08-02 19:04:07.000000000 +0200
+++ ./libs/pool/test/Jamfile.v2 2013-08-22 11:48:34.907287286 +0200
@@ -24,17 +24,17 @@ run valgrind_config_check.cpp : : : <tes
explicit valgrind_config_check ;
test-suite pool :
- [ run test_simple_seg_storage.cpp ]
- [ run test_pool_alloc.cpp ]
- [ run pool_msvc_compiler_bug_test.cpp ]
- [ run test_msvc_mem_leak_detect.cpp ]
- [ run test_bug_3349.cpp ]
- [ run test_bug_4960.cpp ]
- [ run test_bug_1252.cpp ]
- [ run test_bug_2696.cpp ]
- [ run test_bug_5526.cpp ]
+ [ run test_simple_seg_storage.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
+ [ run pool_msvc_compiler_bug_test.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_msvc_mem_leak_detect.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_3349.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_4960.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_1252.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_2696.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_5526.cpp : : : <library>/boost/system//boost_system ]
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread <toolset>gcc:<cxxflags>-Wno-attributes <toolset>gcc:<cxxflags>-Wno-missing-field-initializers ]
- [ run ../example/time_pool_alloc.cpp ]
+ [ run ../example/time_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
[ compile test_poisoned_macros.cpp ]
#

View File

@ -0,0 +1,104 @@
diff -up ./boost/thread/pthread/condition_variable.hpp~ ./boost/thread/pthread/condition_variable.hpp
--- ./boost/thread/pthread/condition_variable.hpp~ 2013-01-14 18:17:50.000000000 +0100
+++ ./boost/thread/pthread/condition_variable.hpp 2013-08-22 11:47:48.330596804 +0200
@@ -200,15 +200,15 @@ namespace boost
#if defined BOOST_THREAD_USES_DATETIME
template<typename lock_type>
- bool timed_wait(lock_type& m,boost::system_time const& wait_until)
+ bool timed_wait(lock_type& m,boost::system_time const& a_wait_until)
{
- struct timespec const timeout=detail::to_timespec(wait_until);
+ struct timespec const timeout=detail::to_timespec(a_wait_until);
return do_wait_until(m, timeout);
}
template<typename lock_type>
- bool timed_wait(lock_type& m,xtime const& wait_until)
+ bool timed_wait(lock_type& m,xtime const& a_wait_until)
{
- return timed_wait(m,system_time(wait_until));
+ return timed_wait(m,system_time(a_wait_until));
}
template<typename lock_type,typename duration_type>
@@ -218,20 +218,20 @@ namespace boost
}
template<typename lock_type,typename predicate_type>
- bool timed_wait(lock_type& m,boost::system_time const& wait_until,predicate_type pred)
+ bool timed_wait(lock_type& m,boost::system_time const& a_wait_until,predicate_type pred)
{
while (!pred())
{
- if(!timed_wait(m, wait_until))
+ if(!timed_wait(m, a_wait_until))
return pred();
}
return true;
}
template<typename lock_type,typename predicate_type>
- bool timed_wait(lock_type& m,xtime const& wait_until,predicate_type pred)
+ bool timed_wait(lock_type& m,xtime const& a_wait_until,predicate_type pred)
{
- return timed_wait(m,system_time(wait_until),pred);
+ return timed_wait(m,system_time(a_wait_until),pred);
}
template<typename lock_type,typename duration_type,typename predicate_type>
diff -up ./boost/thread/pthread/condition_variable_fwd.hpp~ ./boost/thread/pthread/condition_variable_fwd.hpp
--- ./boost/thread/pthread/condition_variable_fwd.hpp~ 2013-01-14 18:17:50.000000000 +0100
+++ ./boost/thread/pthread/condition_variable_fwd.hpp 2013-08-22 11:46:26.579385366 +0200
@@ -98,21 +98,21 @@ namespace boost
#if defined BOOST_THREAD_USES_DATETIME
inline bool timed_wait(
unique_lock<mutex>& m,
- boost::system_time const& wait_until)
+ boost::system_time const& a_wait_until)
{
#if defined BOOST_THREAD_WAIT_BUG
- struct timespec const timeout=detail::to_timespec(wait_until + BOOST_THREAD_WAIT_BUG);
+ struct timespec const timeout=detail::to_timespec(a_wait_until + BOOST_THREAD_WAIT_BUG);
return do_wait_until(m, timeout);
#else
- struct timespec const timeout=detail::to_timespec(wait_until);
+ struct timespec const timeout=detail::to_timespec(a_wait_until);
return do_wait_until(m, timeout);
#endif
}
bool timed_wait(
unique_lock<mutex>& m,
- xtime const& wait_until)
+ xtime const& a_wait_until)
{
- return timed_wait(m,system_time(wait_until));
+ return timed_wait(m,system_time(a_wait_until));
}
template<typename duration_type>
@@ -126,11 +126,11 @@ namespace boost
template<typename predicate_type>
bool timed_wait(
unique_lock<mutex>& m,
- boost::system_time const& wait_until,predicate_type pred)
+ boost::system_time const& a_wait_until,predicate_type pred)
{
while (!pred())
{
- if(!timed_wait(m, wait_until))
+ if(!timed_wait(m, a_wait_until))
return pred();
}
return true;
@@ -139,9 +139,9 @@ namespace boost
template<typename predicate_type>
bool timed_wait(
unique_lock<mutex>& m,
- xtime const& wait_until,predicate_type pred)
+ xtime const& a_wait_until,predicate_type pred)
{
- return timed_wait(m,system_time(wait_until),pred);
+ return timed_wait(m,system_time(a_wait_until),pred);
}
template<typename duration_type,typename predicate_type>

View File

@ -36,7 +36,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries Summary: The free peer-reviewed portable C++ source libraries
Version: 1.54.0 Version: 1.54.0
%define version_enc 1_54_0 %define version_enc 1_54_0
Release: 3%{?dist} Release: 4%{?dist}
License: Boost and MIT and Python License: Boost and MIT and Python
%define toplev_dirname %{name}_%{version_enc} %define toplev_dirname %{name}_%{version_enc}
@ -181,6 +181,15 @@ Patch49: boost-1.54.0-python-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8941 # https://svn.boost.org/trac/boost/ticket/8941
Patch50: boost-1.54.0-lexical_cast-int128.patch Patch50: boost-1.54.0-lexical_cast-int128.patch
# https://svn.boost.org/trac/boost/ticket/9038
Patch51: boost-1.54.0-pool-test_linking.patch
# https://svn.boost.org/trac/boost/ticket/9037
Patch52: boost-1.54.0-thread-cond_variable_shadow.patch
# This was already fixed upstream, so no tracking bug.
Patch53: boost-1.54.0-pool-max_chunks_shadow.patch
%bcond_with tests %bcond_with tests
%bcond_with docs_generated %bcond_with docs_generated
@ -666,6 +675,9 @@ a number of significant features and is now developed independently
%patch48 -p1 %patch48 -p1
%patch49 -p1 %patch49 -p1
%patch50 -p0 %patch50 -p0
%patch51 -p1
%patch52 -p1
%patch53 -p1
# At least python2_version needs to be a macro so that it's visible in # At least python2_version needs to be a macro so that it's visible in
# %%install as well. # %%install as well.
@ -1246,6 +1258,14 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/bjam.1* %{_mandir}/man1/bjam.1*
%changelog %changelog
* Fri Aug 23 2013 Petr Machata <pmachata@redhat.com> - 1.54.0-4
- Fix compilation of Boost.Pool test cases
(boost-1.54.0-pool-test_linking.patch)
- Fix -Wshadow warnings in Boost.Pool
(boost-1.54.0-pool-max_chunks_shadow.patch)
-Wshadow warnings in Boost.Thread
(boost-1.54.0-thread-cond_variable_shadow.patch)
* Mon Aug 19 2013 Petr Machata <pmachata@redhat.com> - 1.54.0-3 * Mon Aug 19 2013 Petr Machata <pmachata@redhat.com> - 1.54.0-3
- Bump odeint obsoletes and provides a notch to cover a build that - Bump odeint obsoletes and provides a notch to cover a build that
sneaked into rawhide (bug 892850). sneaked into rawhide (bug 892850).