66 lines
3.2 KiB
Diff
66 lines
3.2 KiB
Diff
|
Link: https://github.com/boostorg/context/commit/0405a69432565153d539ba49534884700fe2de0b
|
||
|
Subject: Fix check for BOOST_OS_MACOS
|
||
|
Bug: 153990
|
||
|
Tags: common
|
||
|
|
||
|
diff -rupN a/boost/context/continuation_ucontext.hpp b/boost/context/continuation_ucontext.hpp
|
||
|
--- a/boost/context/continuation_ucontext.hpp 2023-11-22 18:12:19.152647899 +0300
|
||
|
+++ b/boost/context/continuation_ucontext.hpp 2023-11-22 18:12:39.967544109 +0300
|
||
|
@@ -62,7 +62,7 @@ namespace detail {
|
||
|
// entered if the execution context
|
||
|
// is resumed for the first time
|
||
|
template <typename Record>
|
||
|
-#ifdef BOOST_OS_MACOS
|
||
|
+#if BOOST_OS_MACOS
|
||
|
static void entry_func(std::uint32_t data_high,
|
||
|
std::uint32_t data_low) noexcept {
|
||
|
auto data =
|
||
|
@@ -312,7 +312,7 @@ static activation_record * create_contex
|
||
|
record->uctx.uc_stack.ss_size = reinterpret_cast< uintptr_t >( storage) -
|
||
|
reinterpret_cast< uintptr_t >( stack_bottom) - static_cast< uintptr_t >( 64);
|
||
|
record->uctx.uc_link = nullptr;
|
||
|
-#ifdef BOOST_OS_MACOS
|
||
|
+#if BOOST_OS_MACOS
|
||
|
const auto integer = std::uint64_t(record);
|
||
|
::makecontext(&record->uctx, (void (*)()) & entry_func<capture_t>, 2,
|
||
|
std::uint32_t((integer >> 32) & 0xFFFFFFFF),
|
||
|
@@ -359,7 +359,7 @@ static activation_record * create_contex
|
||
|
record->uctx.uc_stack.ss_size = reinterpret_cast< uintptr_t >( storage) -
|
||
|
reinterpret_cast< uintptr_t >( stack_bottom) - static_cast< uintptr_t >( 64);
|
||
|
record->uctx.uc_link = nullptr;
|
||
|
-#ifdef BOOST_OS_MACOS
|
||
|
+#if BOOST_OS_MACOS
|
||
|
const auto integer = std::uint64_t(record);
|
||
|
::makecontext(&record->uctx, (void (*)()) & entry_func<capture_t>, 2,
|
||
|
std::uint32_t((integer >> 32) & 0xFFFFFFFF),
|
||
|
diff -rupN a/boost/context/fiber_ucontext.hpp b/boost/context/fiber_ucontext.hpp
|
||
|
--- a/boost/context/fiber_ucontext.hpp 2023-11-22 18:12:19.152647899 +0300
|
||
|
+++ b/boost/context/fiber_ucontext.hpp 2023-11-22 18:12:39.967544109 +0300
|
||
|
@@ -67,7 +67,7 @@ namespace detail {
|
||
|
// entered if the execution context
|
||
|
// is resumed for the first time
|
||
|
template <typename Record>
|
||
|
-#ifdef BOOST_OS_MACOS
|
||
|
+#if BOOST_OS_MACOS
|
||
|
static void fiber_entry_func(std::uint32_t data_high,
|
||
|
std::uint32_t data_low) noexcept {
|
||
|
auto data =
|
||
|
@@ -342,7 +342,7 @@ static fiber_activation_record * create_
|
||
|
record->uctx.uc_stack.ss_size = reinterpret_cast< uintptr_t >( storage) -
|
||
|
reinterpret_cast< uintptr_t >( stack_bottom) - static_cast< uintptr_t >( 64);
|
||
|
record->uctx.uc_link = nullptr;
|
||
|
-#ifdef BOOST_OS_MACOS
|
||
|
+#if BOOST_OS_MACOS
|
||
|
const auto integer = std::uint64_t(record);
|
||
|
::makecontext(&record->uctx, (void (*)()) & fiber_entry_func<capture_t>, 2,
|
||
|
std::uint32_t((integer >> 32) & 0xFFFFFFFF),
|
||
|
@@ -397,7 +397,7 @@ static fiber_activation_record * create_
|
||
|
record->uctx.uc_stack.ss_size = reinterpret_cast< uintptr_t >( storage) -
|
||
|
reinterpret_cast< uintptr_t >( stack_bottom) - static_cast< uintptr_t >( 64);
|
||
|
record->uctx.uc_link = nullptr;
|
||
|
-#ifdef BOOST_OS_MACOS
|
||
|
+#if BOOST_OS_MACOS
|
||
|
const auto integer = std::uint64_t(record);
|
||
|
::makecontext(&record->uctx, (void (*)()) & fiber_entry_func<capture_t>, 2,
|
||
|
std::uint32_t((integer >> 32) & 0xFFFFFFFF),
|