diff options
author | BarrOff <58253563+BarrOff@users.noreply.github.com> | 2022-01-02 06:37:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 07:37:13 +0100 |
commit | 53e1d57419431050a54dcdf539a2a02bf6d28c5b (patch) | |
tree | baad533b65c68fe6ce988f872fe80c9d22368a05 | |
parent | 61d682e733005534a16af72fc9b0c0e74d2f9ebf (diff) | |
download | Nim-53e1d57419431050a54dcdf539a2a02bf6d28c5b.tar.gz |
add compile time option for POSIX sigwait on Illumos/Solaris (#19296)
* add compile time option for POSIX sigwait on Illumos/Solaris * fix link to documentation of `sigwait` on Illumos/Solaris
-rw-r--r-- | lib/posix/posix.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index 57dd6e2c7..912e395a7 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -772,6 +772,13 @@ else: proc sigtimedwait*(a1: var Sigset, a2: var SigInfo, a3: var Timespec): cint {.importc, header: "<signal.h>".} +when defined(sunos) or defined(solaris): + # The following compile time flag is needed on Illumos/Solaris to use the POSIX + # `sigwait` implementation. See the documentation here: + # https://docs.oracle.com/cd/E19455-01/806-5257/6je9h033k/index.html + # https://www.illumos.org/man/2/sigwait + {.passc: "-D_POSIX_PTHREAD_SEMANTICS".} + proc sigwait*(a1: var Sigset, a2: var cint): cint {. importc, header: "<signal.h>".} proc sigwaitinfo*(a1: var Sigset, a2: var SigInfo): cint {. |