Magellan Linux

Contents of /trunk/boost/patches/boost-1.54.0-fix-macro-for-int128-detection.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2315 - (show annotations) (download)
Wed Oct 23 11:14:45 2013 UTC (10 years, 6 months ago) by niro
File size: 1789 byte(s)
-patches for 1.54.0
1 Index: /trunk/boost/lexical_cast.hpp
2 ===================================================================
3 --- /trunk/boost/lexical_cast.hpp (revision 84136)
4 +++ /trunk/boost/lexical_cast.hpp (revision 84965)
5 @@ -70,8 +70,8 @@
6 #endif
7
8 -#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
9 +// GCC 4.6 has some issues with int128 and uint128. Issues were fixed in GCC 4.7
10 +#if defined(BOOST_HAS_INT128) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6))
11 #define BOOST_LCAST_HAS_INT128
12 #endif
13 -
14
15 namespace boost
16 Index: /trunk/libs/conversion/test/lexical_cast_integral_types_test.cpp
17 ===================================================================
18 --- /trunk/libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 83717)
19 +++ /trunk/libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 84965)
20 @@ -49,5 +49,5 @@
21 #endif
22
23 -#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
24 +#if defined(BOOST_HAS_INT128) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6))
25 #define BOOST_LCAST_HAS_INT128
26 #endif
27 @@ -445,6 +445,6 @@
28
29 // Overflow test case from David W. Birdsall
30 - std::string must_owerflow_str = "160000000000000000000";
31 - std::string must_owerflow_negative_str = "-160000000000000000000";
32 + std::string must_owerflow_str = (sizeof(T) < 16 ? "160000000000000000000" : "1600000000000000000000000000000000000000");
33 + std::string must_owerflow_negative_str = (sizeof(T) < 16 ? "-160000000000000000000" : "-1600000000000000000000000000000000000000");
34 for (int i = 0; i < 15; ++i) {
35 BOOST_CHECK_THROW(lexical_cast<T>(must_owerflow_str), bad_lexical_cast);