mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 11:22:48 +08:00
[vcpkg] Fix OSX build for old GCC versions
This commit is contained in:
parent
d5828e6df6
commit
df82d21f32
@ -22,6 +22,8 @@ namespace vcpkg
|
|||||||
|
|
||||||
struct CtrlCStateMachine
|
struct CtrlCStateMachine
|
||||||
{
|
{
|
||||||
|
CtrlCStateMachine();
|
||||||
|
|
||||||
void transition_to_spawn_process() noexcept;
|
void transition_to_spawn_process() noexcept;
|
||||||
void transition_from_spawn_process() noexcept;
|
void transition_from_spawn_process() noexcept;
|
||||||
void transition_handle_ctrl_c() noexcept;
|
void transition_handle_ctrl_c() noexcept;
|
||||||
@ -34,7 +36,7 @@ namespace vcpkg
|
|||||||
exit_requested,
|
exit_requested,
|
||||||
};
|
};
|
||||||
|
|
||||||
std::atomic<CtrlCState> m_state = CtrlCState::normal;
|
std::atomic<CtrlCState> m_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
static CtrlCStateMachine g_ctrl_c_state;
|
static CtrlCStateMachine g_ctrl_c_state;
|
||||||
|
@ -17,6 +17,8 @@ namespace vcpkg
|
|||||||
|
|
||||||
GlobalState::CtrlCStateMachine GlobalState::g_ctrl_c_state;
|
GlobalState::CtrlCStateMachine GlobalState::g_ctrl_c_state;
|
||||||
|
|
||||||
|
GlobalState::CtrlCStateMachine::CtrlCStateMachine() : m_state(CtrlCState::normal) {}
|
||||||
|
|
||||||
void GlobalState::CtrlCStateMachine::transition_to_spawn_process() noexcept
|
void GlobalState::CtrlCStateMachine::transition_to_spawn_process() noexcept
|
||||||
{
|
{
|
||||||
auto expected = CtrlCState::normal;
|
auto expected = CtrlCState::normal;
|
||||||
|
Loading…
Reference in New Issue
Block a user