[mingw32-boost] Fix compilation failure when including interlocked.hpp in c++11 mode (RHBZ #799332)
epienbro
epienbro at fedoraproject.org
Sat Mar 3 18:46:42 UTC 2012
commit 17bb3a76bced244175360f014bf902c945fdc9d7
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Sat Mar 3 19:46:26 2012 +0100
Fix compilation failure when including interlocked.hpp in c++11 mode (RHBZ #799332)
changeset_75396.diff | 36 ++++++++++++++++++++++++++++++++++++
mingw32-boost.spec | 12 +++++++++++-
2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/changeset_75396.diff b/changeset_75396.diff
new file mode 100644
index 0000000..cc7ca87
--- /dev/null
+++ b/changeset_75396.diff
@@ -0,0 +1,36 @@
+Index: trunk/boost/detail/interlocked.hpp
+===================================================================
+--- trunk/boost/detail/interlocked.hpp (revision 70383)
++++ trunk/boost/detail/interlocked.hpp (revision 75396)
+@@ -55,5 +55,9 @@
+ #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
+
+-#if defined( __CLRCALL_PURE_OR_CDECL )
++#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
++
++#include <intrin.h>
++
++#elif defined( __CLRCALL_PURE_OR_CDECL )
+
+ extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
+@@ -120,13 +124,13 @@
+ {
+
+-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );
+-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );
+-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );
+-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );
+-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );
++extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );
++extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );
++extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );
++extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );
++extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );
+
+ # if defined(_M_IA64) || defined(_M_AMD64)
+-extern "C"BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
+-extern "C"BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
++extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
++extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
+ # endif
+
diff --git a/mingw32-boost.spec b/mingw32-boost.spec
index 008c608..e61468f 100644
--- a/mingw32-boost.spec
+++ b/mingw32-boost.spec
@@ -12,7 +12,7 @@ Version: 1.48.0
%define version_enc 1_48_0
%global dllboostver 1_48
%global dllgccver gcc47
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: MinGW Windows port of Boost C++ Libraries
License: Boost
@@ -72,6 +72,11 @@ Patch10: boost-1.48.0-mingw32.patch
# instead of %{mingw32_libdir}
Patch11: boost-install-dlls-to-bindir.patch
+# Fix compilation when using c++11 mode
+# https://bugzilla.redhat.com/show_bug.cgi?id=799332
+# https://svn.boost.org/trac/boost/changeset/75396
+Patch12: changeset_75396.diff
+
BuildArch: noarch
BuildRequires: cmake
@@ -128,6 +133,8 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH1} | %{__patch} -p0 --fuzz=0
%patch9 -p0 -b .gcc47wt
%patch10 -p0 -b .mingw32
%patch11 -p0 -b .bindir
+%patch12 -p1 -b .c++11
+
%build
# Support for building tests.
@@ -448,6 +455,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Mar 3 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.48.0-5
+- Fix compilation failure when including interlocked.hpp in c++11 mode (RHBZ #799332)
+
* Tue Feb 28 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.48.0-4
- Rebuild against the mingw-w64 toolchain
More information about the scm-commits
mailing list