office-gobmx/external/boost/clang-cl.patch.0
Stephan Bergmann 9d837f19d1 Upgrade to Boost 1.65.1
...<https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.bz2>.
One reason to upgrade is that with 1.63 CppunitTest_tools_test started to fail
with -fsanitize=signed-integer-overflow after
331e2e5ed3 "long->sal_Int32 in Fraction",

> workdir/UnpackedTarball/boost/boost/integer/common_factor_rt.hpp:300:5: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
>     #0 0x7f0f99bea71b in boost::integer::detail::gcd_optimal_evaluator<int>::operator()(int, int) const workdir/UnpackedTarball/boost/boost/integer/common_factor_rt.hpp:300:5
>     #1 0x7f0f99bea52a in int boost::integer::detail::gcd_optimal<int>(int const&, int const&) workdir/UnpackedTarball/boost/boost/integer/common_factor_rt.hpp:372:16
>     #2 0x7f0f99be7d70 in int boost::integer::gcd<int>(int const&, int const&) workdir/UnpackedTarball/boost/boost/integer/common_factor_rt.hpp:435:12
>     #3 0x7f0f99be7620 in boost::rational<int>::normalize() workdir/UnpackedTarball/boost/boost/rational.hpp:559:17
>     #4 0x7f0f99bdff29 in rational_FromDouble(double) tools/source/generic/fract.cxx:449:12
>     #5 0x7f0f99bdf8b4 in Fraction::Fraction(double) tools/source/generic/fract.cxx:93:25
>     #6 0x7f0f9a1bb987 in tools::FractionTest::testMinLongDouble() tools/qa/cppunit/test_fract.cxx:79:18
>     #7 0x7f0f9a1bddd2 in void std::_Bind<std::_Mem_fn<void (tools::FractionTest::*)()> (tools::FractionTest*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:933:11
>     #8 0x7f0f9a1bdbe9 in void std::_Bind<std::_Mem_fn<void (tools::FractionTest::*)()> (tools::FractionTest*)>::operator()<, void>() /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:991:17
>     #9 0x7f0fa5eb53b0 in CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
>     #10 0x7f0fa5e1bd1b in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12
>     #11 0x7f0fa5e8653d in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
>     #12 0x7f0fa5e7fb7c in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18
>     #13 0x7f0fa5f17fe0 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28
>     #14 0x7f0fa5eb398c in CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13
>     #15 0x7f0fa5eb7887 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #16 0x7f0fa5eb6a78 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #17 0x7f0fa5eb7887 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
>     #18 0x7f0fa5eb6a78 in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
>     #19 0x7f0fa5f46655 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27
>     #20 0x7f0fa5f16a66 in CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9
>     #21 0x7f0fa5f475c6 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14
>     #22 0x534a01 in (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:316:20
>     #23 0x532ac4 in sal_main() sal/cppunittester/cppunittester.cxx:466:20
>     #24 0x5324f2 in main sal/cppunittester/cppunittester.cxx:373:1
>     #25 0x7f0fa436e430 in __libc_start_main /usr/src/debug/glibc-2.24-66-gd5a4092c36/csu/../csu/libc-start.c:289
>     #26 0x4387b9 in _start (workdir/LinkTarget/Executable/cppunittester+0x4387b9)

Change-Id: Id1c3b216ee18c1d622768dc960ac257d5415c664
Reviewed-on: https://gerrit.libreoffice.org/42427
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-18 21:33:34 +02:00

103 lines
4.5 KiB
Text

--- boost/date_time/filetime_functions.hpp
+++ boost/date_time/filetime_functions.hpp
@@ -27,6 +27,16 @@
#include <boost/date_time/time.hpp>
#include <boost/date_time/date_defs.hpp>
+#if !defined(BOOST_USE_WINDOWS_H)
+extern "C" {
+ struct _FILETIME; // Windows Kits/8.1/Include/shared/minwindef.h
+ struct _SYSTEMTIME; // Windows Kits/8.1/Include/um/minwinbase.h
+ __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(_FILETIME* lpFileTime);
+ __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const _FILETIME* lpFileTime, _FILETIME* lpLocalFileTime);
+ __declspec(dllimport) void __stdcall GetSystemTime(_SYSTEMTIME* lpSystemTime);
+ __declspec(dllimport) int __stdcall SystemTimeToFileTime(const _SYSTEMTIME* lpSystemTime, _FILETIME* lpFileTime);
+}
+#endif
namespace boost {
namespace date_time {
@@ -54,10 +64,6 @@
boost::uint16_t wMilliseconds;
};
- __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME* lpFileTime);
- __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const FILETIME* lpFileTime, FILETIME* lpLocalFileTime);
- __declspec(dllimport) void __stdcall GetSystemTime(SYSTEMTIME* lpSystemTime);
- __declspec(dllimport) int __stdcall SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, FILETIME* lpFileTime);
} // extern "C"
@@ -74,7 +80,7 @@
GetSystemTimeAsFileTime(&ft_utc);
FileTimeToLocalFileTime(&ft_utc, &ft);
#elif defined(BOOST_HAS_GETSYSTEMTIMEASFILETIME)
- GetSystemTimeAsFileTime(&ft);
+ GetSystemTimeAsFileTime(reinterpret_cast<::_FILETIME *>(&ft));
#else
system_time st;
GetSystemTime(&st);
--- boost/multi_array/base.hpp
+++ boost/multi_array/base.hpp
@@ -222,7 +222,7 @@
// MSVC 2010 is broken in debug mode: it requires
// that an Output Iterator have output_iterator_tag in its iterator_category if
// that iterator is not bidirectional_iterator or random_access_iterator.
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600)
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || (defined __clang__ && BOOST_WORKAROUND(_MSC_VER, >= 1600))
struct mutable_iterator_tag
: boost::random_access_traversal_tag, std::input_iterator_tag
{
@@ -274,7 +274,7 @@
//
// iterator support
//
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600)
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || (defined __clang__ && BOOST_WORKAROUND(_MSC_VER, >= 1600))
// Deal with VC 2010 output_iterator_tag requirement
typedef array_iterator<T,T*,mpl::size_t<NumDims>,reference,
mutable_iterator_tag> iterator;
--- boost/multi_array/iterator.hpp
+++ boost/multi_array/iterator.hpp
@@ -60,7 +60,7 @@
, private
value_accessor_generator<T,NumDims>::type
{
- friend class iterator_core_access;
+ friend class boost::iterators::iterator_core_access;
typedef detail::multi_array::associated_types<T,NumDims> access_t;
typedef iterator_facade<
# workdir/UnpackedTarball/boost\boost/smart_ptr/detail/yield_k.hpp(63,29) : error: 'Sleep' redeclared without 'dllimport' attribute: previous 'dll# import' ignored [-Werror,-Winconsistent-dllimport]
# extern "C" void __stdcall Sleep( unsigned long ms );
# ^
# C:/PROGRA~2/WI3CF2~1/8.1/include/um\synchapi.h(908,1) : note: previous declaration is here
# Sleep(
# ^
--- boost/smart_ptr/detail/yield_k.hpp
+++ boost/smart_ptr/detail/yield_k.hpp
@@ -61,7 +61,7 @@
#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME
#if !BOOST_COMP_CLANG || !defined __MINGW32__
- extern "C" void __stdcall Sleep( unsigned long ms );
+ extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms );
#else
#include <_mingw.h>
#if !defined __MINGW64_VERSION_MAJOR
# workdir/UnpackedTarball/boost/libs/thread/src/win32/thread.cpp(1006,36) : error: dllimport cannot be applied to non-inline function definition
# BOOST_THREAD_DECL void __cdecl on_process_enter()
# ^
--- boost/thread/detail/config.hpp
+++ boost/thread/detail/config.hpp
@@ -396,7 +396,7 @@
#else //Use default
# if defined(BOOST_THREAD_PLATFORM_WIN32)
# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) \
- || defined(__MINGW32__) || defined(MINGW32) || defined(BOOST_MINGW32)
+ || defined(__MINGW32__) || defined(MINGW32) || defined(BOOST_MINGW32) || defined __clang__
//For compilers supporting auto-tss cleanup
//with Boost.Threads lib, use Boost.Threads lib
# define BOOST_THREAD_USE_LIB