View | Details | Raw Unified | Return to bug 187958
Collapse All | Expand All

(-)Makefile (+2 lines)
Lines 4-9 Link Here
4
PORTNAME=	boost-libs
4
PORTNAME=	boost-libs
5
COMMENT=	Free portable C++ libraries (without Boost.Python)
5
COMMENT=	Free portable C++ libraries (without Boost.Python)
6
6
7
PORTREVISION=	1
8
7
BUILD_DEPENDS+=	bjam:${PORTSDIR}/devel/boost-jam
9
BUILD_DEPENDS+=	bjam:${PORTSDIR}/devel/boost-jam
8
10
9
OPTIONS_DEFINE=	VERBOSE_BUILD DEBUG ICU OPTIMIZED_CFLAGS
11
OPTIONS_DEFINE=	VERBOSE_BUILD DEBUG ICU OPTIMIZED_CFLAGS
(-)files/patch-boost__atomic__detail__cas128strong.hpp (+33 lines)
Line 0 Link Here
1
--- boost/atomic/detail/cas128strong.hpp	2013-07-20 20:01:35.000000000 +0200
2
+++ boost/atomic/detail/cas128strong.hpp.orig	2014-04-03 16:34:19.000000000 +0200
3
@@ -196,15 +196,17 @@
4
 
5
 public:
6
     BOOST_DEFAULTED_FUNCTION(base_atomic(void), {})
7
-    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
8
+    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
9
     {
10
+        memset(&v_, 0, sizeof(v_));
11
         memcpy(&v_, &v, sizeof(value_type));
12
     }
13
 
14
     void
15
     store(value_type const& value, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
16
     {
17
-        storage_type value_s = 0;
18
+        storage_type value_s;
19
+        memset(&value_s, 0, sizeof(value_s));
20
         memcpy(&value_s, &value, sizeof(value_type));
21
         platform_fence_before_store(order);
22
         platform_store128(value_s, &v_);
23
@@ -247,7 +249,9 @@
24
         memory_order success_order,
25
         memory_order failure_order) volatile BOOST_NOEXCEPT
26
     {
27
-        storage_type expected_s = 0, desired_s = 0;
28
+        storage_type expected_s, desired_s;
29
+        memset(&expected_s, 0, sizeof(expected_s));
30
+        memset(&desired_s, 0, sizeof(desired_s));
31
         memcpy(&expected_s, &expected, sizeof(value_type));
32
         memcpy(&desired_s, &desired, sizeof(value_type));
33
 
(-)files/patch-boost__atomic__detail__gcc-atomic.hpp (+53 lines)
Line 0 Link Here
1
--- boost/atomic/detail/gcc-atomic.hpp	2013-07-20 20:01:35.000000000 +0200
2
+++ boost/atomic/detail/gcc-atomic.hpp	2014-04-03 18:03:30.000000000 +0200
3
@@ -958,14 +958,16 @@
4
 
5
 public:
6
     BOOST_DEFAULTED_FUNCTION(base_atomic(void), {})
7
-    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
8
+    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
9
     {
10
+        memset(&v_, 0, sizeof(v_));
11
         memcpy(&v_, &v, sizeof(value_type));
12
     }
13
 
14
     void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
15
     {
16
-        storage_type tmp = 0;
17
+        storage_type tmp;
18
+        memset(&tmp, 0, sizeof(tmp));
19
         memcpy(&tmp, &v, sizeof(value_type));
20
         __atomic_store_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order));
21
     }
22
@@ -980,7 +982,8 @@
23
 
24
     value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
25
     {
26
-        storage_type tmp = 0;
27
+        storage_type tmp;
28
+        memset(&tmp, 0, sizeof(tmp));
29
         memcpy(&tmp, &v, sizeof(value_type));
30
         tmp = __atomic_exchange_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order));
31
         value_type res;
32
@@ -994,7 +997,9 @@
33
         memory_order success_order,
34
         memory_order failure_order) volatile BOOST_NOEXCEPT
35
     {
36
-        storage_type expected_s = 0, desired_s = 0;
37
+        storage_type expected_s, desired_s;
38
+        memset(&expected_s, 0, sizeof(expected_s));
39
+        memset(&desired_s, 0, sizeof(desired_s));
40
         memcpy(&expected_s, &expected, sizeof(value_type));
41
         memcpy(&desired_s, &desired, sizeof(value_type));
42
         const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, false,
43
@@ -1010,7 +1015,9 @@
44
         memory_order success_order,
45
         memory_order failure_order) volatile BOOST_NOEXCEPT
46
     {
47
-        storage_type expected_s = 0, desired_s = 0;
48
+        storage_type expected_s, desired_s;
49
+        memset(&expected_s, 0, sizeof(expected_s));
50
+        memset(&desired_s, 0, sizeof(desired_s));
51
         memcpy(&expected_s, &expected, sizeof(value_type));
52
         memcpy(&desired_s, &desired, sizeof(value_type));
53
         const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, true,

Return to bug 187958