Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 3f0cc9c

Browse files
ibuclawdlang-bot
authored andcommitted
core.sys.posix.ucontext: Define mcontext_t and ucontext_t for Darwin
1 parent 0073c42 commit 3f0cc9c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/core/sys/posix/ucontext.d

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ nothrow:
2424
@nogc:
2525
@system:
2626

27+
version (OSX)
28+
version = Darwin;
29+
else version (iOS)
30+
version = Darwin;
31+
else version (TVOS)
32+
version = Darwin;
33+
else version (WatchOS)
34+
version = Darwin;
35+
2736
version (MIPS32) version = MIPS_Any;
2837
version (MIPS64) version = MIPS_Any;
2938
version (PPC) version = PPC_Any;
@@ -910,6 +919,22 @@ else version (CRuntime_Musl)
910919
else
911920
static assert(0, "unimplemented");
912921
}
922+
else version (Darwin)
923+
{
924+
alias mcontext_t = void;
925+
926+
struct ucontext
927+
{
928+
int uc_onstack;
929+
sigset_t uc_sigmask;
930+
stack_t uc_stack;
931+
ucontext* uc_link;
932+
size_t uc_mcsize;
933+
mcontext_t* uc_mcontext;
934+
}
935+
936+
alias ucontext_t = ucontext;
937+
}
913938
else version (FreeBSD)
914939
{
915940
// <machine/ucontext.h>

0 commit comments

Comments
 (0)