Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Petr Machata | eaa3d38783 | |
Denis Arnaud | f4262d6502 | |
Peter Robinson | 54575e952a | |
Petr Machata | 23c41eceea | |
Deji Akingunola | b1809b43d9 | |
Petr Machata | 38d9dfbb7a | |
Denis Arnaud | 0105dae1e6 | |
Denis Arnaud | 1194979fc4 |
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,15 @@
|
|||
diff --git a/boost/property_tree/detail/json_parser_read.hpp b/boost/property_tree/detail/json_parser_read.hpp
|
||||
index 3f06794..46acc5a 100644
|
||||
--- a/boost/property_tree/detail/json_parser_read.hpp
|
||||
+++ b/boost/property_tree/detail/json_parser_read.hpp
|
||||
@@ -179,6 +179,9 @@ namespace boost { namespace property_tree { namespace json_parser
|
||||
{
|
||||
|
||||
using namespace boost::spirit::classic;
|
||||
+ // There's a boost::assertion too, so another explicit using
|
||||
+ // here:
|
||||
+ using boost::spirit::classic::assertion;
|
||||
|
||||
// Assertions
|
||||
assertion<std::string> expect_object("expected object");
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
diff -up boost_1_47_0/boost/pool/pool.hpp\~ boost_1_47_0/boost/pool/pool.hpp
|
||||
--- boost_1_47_0/boost/pool/pool.hpp~ 2011-01-11 15:22:32.000000000 +0100
|
||||
+++ boost_1_47_0/boost/pool/pool.hpp 2012-06-07 01:00:26.936184589 +0200
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#include <boost/pool/poolfwd.hpp>
|
||||
|
||||
+// std::numeric_limits
|
||||
+#include <boost/limits.hpp>
|
||||
+// boost::math::static_lcm
|
||||
+#include <boost/math/common_factor.hpp>
|
||||
// boost::details::pool::ct_lcm
|
||||
#include <boost/pool/detail/ct_gcd_lcm.hpp>
|
||||
// boost::details::pool::lcm
|
||||
@@ -187,6 +191,15 @@ class pool: protected simple_segregated_
|
||||
return details::pool::lcm<size_type>(requested_size, min_size);
|
||||
}
|
||||
|
||||
+ size_type max_chunks() const
|
||||
+ { //! 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;
|
||||
+ }
|
||||
+
|
||||
// for the sake of code readability :)
|
||||
static void * & nextof(void * const ptr)
|
||||
{ return *(static_cast<void **>(ptr)); }
|
||||
@@ -198,7 +211,10 @@ class pool: protected simple_segregated_
|
||||
const size_type nnext_size = 32,
|
||||
const size_type nmax_size = 0)
|
||||
:list(0, 0), requested_size(nrequested_size), next_size(nnext_size), start_size(nnext_size),max_size(nmax_size)
|
||||
- { }
|
||||
+ {
|
||||
+ set_next_size(nnext_size);
|
||||
+ set_max_size(nmax_size);
|
||||
+ }
|
||||
|
||||
~pool() { purge_memory(); }
|
||||
|
||||
@@ -213,9 +229,17 @@ class pool: protected simple_segregated_
|
||||
|
||||
// These functions are extensions!
|
||||
size_type get_next_size() const { return next_size; }
|
||||
- void set_next_size(const size_type nnext_size) { next_size = start_size = nnext_size; }
|
||||
+ void set_next_size(const size_type nnext_size)
|
||||
+ {
|
||||
+ BOOST_USING_STD_MIN();
|
||||
+ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
|
||||
+ }
|
||||
size_type get_max_size() const { return max_size; }
|
||||
- void set_max_size(const size_type nmax_size) { max_size = nmax_size; }
|
||||
+ void set_max_size(const size_type nmax_size)
|
||||
+ {
|
||||
+ BOOST_USING_STD_MIN();
|
||||
+ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
|
||||
+ }
|
||||
size_type get_requested_size() const { return requested_size; }
|
||||
|
||||
// Both malloc and ordered_malloc do a quick inlined check first for any
|
||||
@@ -447,9 +471,9 @@ void * pool<UserAllocator>::malloc_need_
|
||||
|
||||
BOOST_USING_STD_MIN();
|
||||
if(!max_size)
|
||||
- next_size <<= 1;
|
||||
+ set_next_size(next_size << 1);
|
||||
else if( next_size*partition_size/requested_size < max_size)
|
||||
- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
|
||||
+ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
|
||||
|
||||
// initialize it,
|
||||
store().add_block(node.begin(), node.element_size(), partition_size);
|
||||
@@ -476,9 +500,9 @@ void * pool<UserAllocator>::ordered_mall
|
||||
|
||||
BOOST_USING_STD_MIN();
|
||||
if(!max_size)
|
||||
- next_size <<= 1;
|
||||
+ set_next_size(next_size << 1);
|
||||
else if( next_size*partition_size/requested_size < max_size)
|
||||
- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
|
||||
+ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
|
||||
|
||||
// initialize it,
|
||||
// (we can use "add_block" here because we know that
|
||||
@@ -519,6 +543,9 @@ void * pool<UserAllocator>::ordered_mall
|
||||
template <typename UserAllocator>
|
||||
void * pool<UserAllocator>::ordered_malloc(const size_type n)
|
||||
{
|
||||
+ if (n > max_chunks())
|
||||
+ return 0;
|
||||
+
|
||||
const size_type partition_size = alloc_size();
|
||||
const size_type total_req_size = n * requested_size;
|
||||
const size_type num_chunks = total_req_size / partition_size +
|
||||
@@ -549,9 +576,9 @@ void * pool<UserAllocator>::ordered_mall
|
||||
|
||||
BOOST_USING_STD_MIN();
|
||||
if(!max_size)
|
||||
- next_size <<= 1;
|
||||
+ set_next_size(next_size << 1);
|
||||
else if( next_size*partition_size/requested_size < max_size)
|
||||
- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
|
||||
+ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
|
||||
|
||||
// insert it into the list,
|
||||
// handle border case
|
||||
|
||||
Diff finished. Thu Jun 7 01:00:38 2012
|
75
boost.spec
75
boost.spec
|
@ -1,6 +1,6 @@
|
|||
# Support for documentation installation
|
||||
# As the %%doc macro erases the target directory, namely
|
||||
# $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}, manually installed
|
||||
# $RPM_BUILD_ROOT%%{_docdir}/%%{name}-%%{version}, manually installed
|
||||
# documentation must be saved into a temporary dedicated directory.
|
||||
%define boost_docdir __tmp_docdir
|
||||
|
||||
|
@ -11,7 +11,12 @@
|
|||
%endif
|
||||
|
||||
# Configuration of MPI backends
|
||||
%bcond_without mpich2
|
||||
%ifarch %{arm}
|
||||
%bcond_with mpich2
|
||||
%else
|
||||
%bcond_without mpich2
|
||||
%endif
|
||||
|
||||
%ifarch s390 s390x %{arm}
|
||||
# No OpenMPI support on these arches
|
||||
%bcond_with openmpi
|
||||
|
@ -22,17 +27,17 @@
|
|||
Name: boost
|
||||
Summary: The free peer-reviewed portable C++ source libraries
|
||||
Version: 1.46.0
|
||||
%define version_enc 1_46_0_beta1
|
||||
Release: 0.3.beta1%{?dist}
|
||||
%define version_enc 1_46_0
|
||||
Release: 4%{?dist}
|
||||
License: Boost
|
||||
|
||||
# The CMake build framework (set of CMakeLists.txt and module.cmake files) is
|
||||
# added on top of the official Boost release (http://www.boost.org), thanks to
|
||||
# a dedicated patch. That CMake framework (and patch) is hosted and maintained
|
||||
# on GitHub, for now in the following Git repository:
|
||||
# https://github.com/denisarnaud/boost-cmake
|
||||
# https://github.com/boost-lib/boost-cmake
|
||||
# A clone also exists on Gitorious, where CMake-related work was formely done:
|
||||
# http://gitorious.org/~denisarnaud/boost/denisarnauds-cmake
|
||||
# http://gitorious.org/boost/cmake
|
||||
# Upstream work is synchronised thanks to the Ryppl's hosted Git clone:
|
||||
# https://github.com/ryppl/boost-svn/tree/trunk
|
||||
%define toplev_dirname %{name}_%{version_enc}
|
||||
|
@ -53,8 +58,8 @@ Source: http://downloads.sourceforge.net/%{name}/%{toplev_dirname}.tar.bz2
|
|||
%endif
|
||||
|
||||
# boost is an "umbrella" package that pulls in all other boost
|
||||
# components, except for MPI sub-packages. Those are "speacial", one
|
||||
# doesn't necessarily need them and the more typical scenario, I
|
||||
# components, except for MPI sub-packages. Those are "special": one
|
||||
# does not necessarily need them and the more typical scenario, I
|
||||
# think, will be that the developer wants to pick one MPI flavor.
|
||||
Requires: boost-date-time = %{version}-%{release}
|
||||
Requires: boost-filesystem = %{version}-%{release}
|
||||
|
@ -81,18 +86,34 @@ BuildRequires: python-devel
|
|||
BuildRequires: libicu-devel
|
||||
BuildRequires: chrpath
|
||||
|
||||
Patch0: boost-1.46.0-cmakeify.patch
|
||||
Patch1: boost-1.46.0-cmakeify-more.patch
|
||||
# CMake-related files (CMakeLists.txt and module.cmake files)
|
||||
Patch0: boost-1.46.0-cmakeify-full.patch
|
||||
# Mainly Web-related documentation for the Trac Wiki devoted to "old"
|
||||
# Boost-CMake (up-to-date until Boost-1.41.0). Now part of
|
||||
# boost-1.46.0-cmakeify-full.patch
|
||||
#Patch1: boost-1.46.0-cmakeify-more.patch
|
||||
Patch2: boost-cmake-soname.patch
|
||||
|
||||
# https://svn.boost.org/trac/boost/ticket/4999
|
||||
# The patch may break c++03, and there is therefore no plan yet to include
|
||||
# it upstream: https://svn.boost.org/trac/boost/ticket/4999
|
||||
Patch3: boost-1.46.0-signals-erase.patch
|
||||
|
||||
# https://svn.boost.org/trac/boost/ticket/5119
|
||||
# Will be fixed in Boost-1.47: https://svn.boost.org/trac/boost/ticket/5119
|
||||
Patch4: boost-1.46.0-unordered-cctor.patch
|
||||
|
||||
# http://comments.gmane.org/gmane.comp.lib.boost.devel/214323
|
||||
# Has been fixed on Boost trunk (will be fixed in Boost-1.47:
|
||||
# https://svn.boost.org/trac/boost/changeset/68725)
|
||||
Patch5: boost-1.46.0-spirit.patch
|
||||
|
||||
# Has been fixed in Boost-1.46.1 (https://svn.boost.org/trac/boost/ticket/5424):
|
||||
# https://svn.boost.org/trac/boost/changeset/69684)
|
||||
Patch6: boost-1.46.0-ptree-assertion.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=828856
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=828857
|
||||
Patch7: boost-1.47.0-pool.patch
|
||||
|
||||
%bcond_with tests
|
||||
%bcond_with docs_generated
|
||||
|
||||
|
@ -414,14 +435,17 @@ a number of significant features and is now developed independently
|
|||
|
||||
# CMake framework (CMakeLists.txt, *.cmake and documentation files)
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH2} | %{__patch} -p0 --fuzz=0
|
||||
|
||||
# fixes
|
||||
%patch3 -p1
|
||||
%patch4 -p2
|
||||
%patch5 -p0
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
# Fix some permissions
|
||||
find ./boost/range -type f -name '*.hpp' -exec chmod 644 {} \;
|
||||
|
||||
%build
|
||||
# Support for building tests.
|
||||
|
@ -433,10 +457,10 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH2} | %{__patch} -p0 --fuzz=0
|
|||
( echo ============================= build serial ==================
|
||||
mkdir serial
|
||||
cd serial
|
||||
export CXXFLAGS="-DBOOST_IOSTREAMS_USE_DEPRECATED %{optflags}"
|
||||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo %{boost_testflags} \
|
||||
-DENABLE_SINGLE_THREADED=YES -DINSTALL_VERSIONED=OFF \
|
||||
-DWITH_MPI=OFF \
|
||||
-DCMAKE_CXX_FLAGS="%{optflags} -DBOOST_IOSTREAMS_USE_DEPRECATED" \
|
||||
..
|
||||
make VERBOSE=1 %{?_smp_mflags}
|
||||
)
|
||||
|
@ -834,6 +858,29 @@ find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec %{_
|
|||
%{_bindir}/bjam
|
||||
|
||||
%changelog
|
||||
* Wed Jun 6 2012 Petr Machata <pmachata@redhat.com> - 1.46.0-4
|
||||
- In Boost.Pool, be careful not to overflow allocated chunk size.
|
||||
- Resolves: #828857
|
||||
|
||||
* Thu Jun 23 2011 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.46.0-3
|
||||
- Fixed compilation errors when compiling JSON-related Boost::Property_Tree
|
||||
- Related: #715611
|
||||
|
||||
* Sat Jun 18 2011 Peter Robinson <pbrobinson@gmail.com> - 1.46.0-2
|
||||
- Fix compile on ARM platforms
|
||||
|
||||
* Mon Apr 4 2011 Petr Machata <pmachata@redhat.com> - 1.46.0-1
|
||||
- Yet another way to pass -DBOOST_LIB_INSTALL_DIR to cmake. Passing
|
||||
via CMAKE_CXX_FLAGS for some reason breaks when rpm re-quotes the
|
||||
expression as a result of %%{optflags} expansion.
|
||||
- Related: #667294
|
||||
|
||||
* Wed Mar 30 2011 Deji Akingunola <dakingun@gmail.com> - 1.46.0-0.5
|
||||
- Rebuild for mpich2 soname bump
|
||||
|
||||
* Thu Feb 24 2011 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.46.0-0.4
|
||||
- Merged the latest changes from the now final release of Boost-1.46
|
||||
|
||||
* Tue Feb 8 2011 Petr Machata <pmachata@redhat.com> - 1.46.0-0.3.beta1
|
||||
- spirit.patch: Fix a problem in using boost::spirit with utf-8
|
||||
strings. Thanks to Hicham HAOUARI for digging up the fix.
|
||||
|
|
Loading…
Reference in New Issue