[boost] Fix detection of availability of 128-bit integers in Boost.LexicalCast

Petr Machata pmachata at fedoraproject.org
Tue Jul 30 17:50:51 UTC 2013


commit c3593a1e326ab03a37cf677f35e4d59324908788
Author: Petr Machata <pmachata at redhat.com>
Date:   Tue Jul 30 19:50:23 2013 +0200

    Fix detection of availability of 128-bit integers in Boost.LexicalCast

 boost-1.54.0-lexical_cast-int128.patch |   61 ++++++++++++++++++++++++++++++++
 boost.spec                             |   10 +++++-
 2 files changed, 70 insertions(+), 1 deletions(-)
---
diff --git a/boost-1.54.0-lexical_cast-int128.patch b/boost-1.54.0-lexical_cast-int128.patch
new file mode 100644
index 0000000..8e6c63c
--- /dev/null
+++ b/boost-1.54.0-lexical_cast-int128.patch
@@ -0,0 +1,61 @@
+diff -up boost/lexical_cast.hpp\~ boost/lexical_cast.hpp
+--- boost/lexical_cast.hpp~	2013-07-27 12:03:21.000000000 +0200
++++ boost/lexical_cast.hpp	2013-07-30 19:30:54.969548144 +0200
+@@ -69,11 +69,6 @@
+     throw_exception(bad_lexical_cast(typeid(Source), typeid(Target)))
+ #endif
+ 
+-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
+-#define BOOST_LCAST_HAS_INT128
+-#endif
+-
+-
+ namespace boost
+ {
+     // exception used to indicate runtime lexical_cast failure
+@@ -316,7 +311,7 @@ namespace boost {
+         > {};
+ #endif
+ 
+-#ifdef BOOST_LCAST_HAS_INT128
++#ifdef BOOST_HAS_INT128
+         template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {};
+         template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {};
+ #endif
+@@ -613,7 +608,7 @@ namespace boost {
+         BOOST_LCAST_DEF(unsigned __int64)
+         BOOST_LCAST_DEF(         __int64)
+ #endif
+-#ifdef BOOST_LCAST_HAS_INT128
++#ifdef BOOST_HAS_INT128
+         BOOST_LCAST_DEF(boost::int128_type)
+         BOOST_LCAST_DEF(boost::uint128_type)
+ #endif
+@@ -1827,7 +1822,7 @@ namespace boost {
+             bool operator<<(         __int64 n)         { return shl_signed(n); }
+ #endif
+ 
+-#ifdef BOOST_LCAST_HAS_INT128
++#ifdef BOOST_HAS_INT128
+         bool operator<<(const boost::uint128_type& n)   { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+         bool operator<<(const boost::int128_type& n)    { return shl_signed(n); }
+ #endif
+@@ -2039,7 +2034,7 @@ namespace boost {
+             bool operator>>(__int64& output)                    { return shr_signed(output); }
+ #endif
+ 
+-#ifdef BOOST_LCAST_HAS_INT128
++#ifdef BOOST_HAS_INT128
+             bool operator>>(boost::uint128_type& output)        { return shr_unsigned(output); }
+             bool operator>>(boost::int128_type& output)         { return shr_signed(output); }
+ #endif
+@@ -2719,7 +2714,6 @@ namespace boost {
+ 
+ #undef BOOST_LCAST_THROW_BAD_CAST
+ #undef BOOST_LCAST_NO_WCHAR_T
+-#undef BOOST_LCAST_HAS_INT128
+ 
+ #endif // BOOST_LEXICAL_CAST_INCLUDED
+ 
+
+Diff finished.  Tue Jul 30 19:30:58 2013
diff --git a/boost.spec b/boost.spec
index 4880f60..bce2df8 100644
--- a/boost.spec
+++ b/boost.spec
@@ -34,7 +34,7 @@ Name: boost
 Summary: The free peer-reviewed portable C++ source libraries
 Version: 1.54.0
 %define version_enc 1_54_0
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: Boost and MIT and Python
 
 %define toplev_dirname %{name}_%{version_enc}
@@ -176,6 +176,9 @@ Patch48: boost-1.54.0-mpi-unused_typedef.patch
 # https://svn.boost.org/trac/boost/ticket/8888
 Patch49: boost-1.54.0-python-unused_typedef.patch
 
+# https://svn.boost.org/trac/boost/ticket/8941
+Patch50: boost-1.54.0-lexical_cast-int128.patch
+
 %bcond_with tests
 %bcond_with docs_generated
 
@@ -660,6 +663,7 @@ a number of significant features and is now developed independently
 %patch47 -p1
 %patch48 -p1
 %patch49 -p1
+%patch50 -p0
 
 # At least python2_version needs to be a macro so that it's visible in
 # %%install as well.
@@ -1240,6 +1244,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/bjam.1*
 
 %changelog
+* Tue Jul 30 2013 Petr Machata <pmachata at redhat.com> - 1.54.0-2
+- Fix detection of availability of 128-bit integers in
+  Boost.LexicalCast (boost-1.54.0-lexical_cast-int128.patch)
+
 * Fri Jul 26 2013 Petr Machata <pmachata at redhat.com> - 1.54.0-1
 - Rebase to 1.54.0
   - Add new sub-package boost-log


More information about the scm-commits mailing list