diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index fbe945df33f37..b8327b5ae146d 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -744,11 +744,11 @@ proc time*(a1: var Time): Time {.importc, header: "", sideEffect.} proc timer_create*(a1: ClockId, a2: var SigEvent, a3: var Timer): cint {.importc, header: "".} proc timer_delete*(a1: Timer): cint {.importc, header: "".} -proc timer_gettime*(a1: Timer, a2: var Itimerspec): cint {. +proc timer_gettime*(a1: Timer, a2: var ItimerSpec): cint {. importc, header: "".} proc timer_getoverrun*(a1: Timer): cint {.importc, header: "".} -proc timer_settime*(a1: Timer, a2: cint, a3: var Itimerspec, - a4: var Itimerspec): cint {.importc, header: "".} +proc timer_settime*(a1: Timer, a2: cint, a3: var ItimerSpec, + a4: var ItimerSpec): cint {.importc, header: "".} proc tzset*() {.importc, header: "".} @@ -783,46 +783,46 @@ proc bsd_signal*(a1: cint, a2: proc (x: pointer) {.noconv.}) {. proc kill*(a1: Pid, a2: cint): cint {.importc, header: "", sideEffect.} proc killpg*(a1: Pid, a2: cint): cint {.importc, header: "", sideEffect.} proc pthread_kill*(a1: Pthread, a2: cint): cint {.importc, header: "".} -proc pthread_sigmask*(a1: cint, a2, a3: var Sigset): cint {. +proc pthread_sigmask*(a1: cint, a2, a3: var SigSet): cint {. importc, header: "".} proc `raise`*(a1: cint): cint {.importc, header: "".} -proc sigaction*(a1: cint, a2, a3: var Sigaction): cint {. +proc sigaction*(a1: cint, a2, a3: var SigAction): cint {. importc, header: "".} -proc sigaction*(a1: cint, a2: var Sigaction; a3: ptr Sigaction = nil): cint {. +proc sigaction*(a1: cint, a2: var SigAction; a3: ptr SigAction = nil): cint {. importc, header: "".} -proc sigaddset*(a1: var Sigset, a2: cint): cint {.importc, header: "".} +proc sigaddset*(a1: var SigSet, a2: cint): cint {.importc, header: "".} proc sigaltstack*(a1, a2: var Stack): cint {.importc, header: "".} -proc sigdelset*(a1: var Sigset, a2: cint): cint {.importc, header: "".} -proc sigemptyset*(a1: var Sigset): cint {.importc, header: "".} -proc sigfillset*(a1: var Sigset): cint {.importc, header: "".} +proc sigdelset*(a1: var SigSet, a2: cint): cint {.importc, header: "".} +proc sigemptyset*(a1: var SigSet): cint {.importc, header: "".} +proc sigfillset*(a1: var SigSet): cint {.importc, header: "".} proc sighold*(a1: cint): cint {.importc, header: "".} proc sigignore*(a1: cint): cint {.importc, header: "".} proc siginterrupt*(a1, a2: cint): cint {.importc, header: "".} -proc sigismember*(a1: var Sigset, a2: cint): cint {.importc, header: "".} +proc sigismember*(a1: var SigSet, a2: cint): cint {.importc, header: "".} proc signal*(a1: cint, a2: Sighandler) {. importc, header: "".} proc sigpause*(a1: cint): cint {.importc, header: "".} -proc sigpending*(a1: var Sigset): cint {.importc, header: "".} -proc sigprocmask*(a1: cint, a2, a3: var Sigset): cint {. +proc sigpending*(a1: var SigSet): cint {.importc, header: "".} +proc sigprocmask*(a1: cint, a2, a3: var SigSet): cint {. importc, header: "".} proc sigqueue*(a1: Pid, a2: cint, a3: SigVal): cint {. importc, header: "".} proc sigrelse*(a1: cint): cint {.importc, header: "".} proc sigset*(a1: int, a2: proc (x: cint) {.noconv.}) {. importc, header: "".} -proc sigsuspend*(a1: var Sigset): cint {.importc, header: "".} +proc sigsuspend*(a1: var SigSet): cint {.importc, header: "".} when defined(android): proc syscall(arg: clong): clong {.varargs, importc: "syscall", header: "".} var NR_rt_sigtimedwait {.importc: "__NR_rt_sigtimedwait", header: "".}: clong var NSIGMAX {.importc: "NSIG", header: "".}: clong - proc sigtimedwait*(a1: var Sigset, a2: var SigInfo, a3: var Timespec): cint = + proc sigtimedwait*(a1: var SigSet, a2: var SigInfo, a3: var Timespec): cint = result = cint(syscall(NR_rt_sigtimedwait, addr(a1), addr(a2), addr(a3), NSIGMAX div 8)) else: - proc sigtimedwait*(a1: var Sigset, a2: var SigInfo, + proc sigtimedwait*(a1: var SigSet, a2: var SigInfo, a3: var Timespec): cint {.importc, header: "".} when defined(sunos) or defined(solaris): @@ -832,9 +832,9 @@ when defined(sunos) or defined(solaris): # https://www.illumos.org/man/2/sigwait {.passc: "-D_POSIX_PTHREAD_SEMANTICS".} -proc sigwait*(a1: var Sigset, a2: var cint): cint {. +proc sigwait*(a1: var SigSet, a2: var cint): cint {. importc, header: "".} -proc sigwaitinfo*(a1: var Sigset, a2: var SigInfo): cint {. +proc sigwaitinfo*(a1: var SigSet, a2: var SigInfo): cint {. importc, header: "".} when not defined(nintendoswitch): @@ -867,7 +867,7 @@ proc FD_SET*(a1: cint | SocketHandle, a2: var TFdSet) {. proc FD_ZERO*(a1: var TFdSet) {.importc, header: "".} proc pselect*(a1: cint, a2, a3, a4: ptr TFdSet, a5: ptr Timespec, - a6: var Sigset): cint {.importc, header: "".} + a6: var SigSet): cint {.importc, header: "".} proc select*(a1: cint | SocketHandle, a2, a3, a4: ptr TFdSet, a5: ptr Timeval): cint {. importc, header: "".} @@ -890,7 +890,7 @@ when hasSpawnH: proc posix_spawnattr_destroy*(a1: var Tposix_spawnattr): cint {. importc, header: "".} proc posix_spawnattr_getsigdefault*(a1: var Tposix_spawnattr, - a2: var Sigset): cint {.importc, header: "".} + a2: var SigSet): cint {.importc, header: "".} proc posix_spawnattr_getflags*(a1: var Tposix_spawnattr, a2: var cshort): cint {.importc, header: "".} proc posix_spawnattr_getpgroup*(a1: var Tposix_spawnattr, @@ -900,12 +900,12 @@ when hasSpawnH: proc posix_spawnattr_getschedpolicy*(a1: var Tposix_spawnattr, a2: var cint): cint {.importc, header: "".} proc posix_spawnattr_getsigmask*(a1: var Tposix_spawnattr, - a2: var Sigset): cint {.importc, header: "".} + a2: var SigSet): cint {.importc, header: "".} proc posix_spawnattr_init*(a1: var Tposix_spawnattr): cint {. importc, header: "".} proc posix_spawnattr_setsigdefault*(a1: var Tposix_spawnattr, - a2: var Sigset): cint {.importc, header: "".} + a2: var SigSet): cint {.importc, header: "".} proc posix_spawnattr_setflags*(a1: var Tposix_spawnattr, a2: cint): cint {. importc, header: "".} proc posix_spawnattr_setpgroup*(a1: var Tposix_spawnattr, a2: Pid): cint {. @@ -917,7 +917,7 @@ when hasSpawnH: a2: cint): cint {. importc, header: "".} proc posix_spawnattr_setsigmask*(a1: var Tposix_spawnattr, - a2: var Sigset): cint {.importc, header: "".} + a2: var SigSet): cint {.importc, header: "".} proc posix_spawnp*(a1: var Pid, a2: cstring, a3: var Tposix_spawn_file_actions, a4: var Tposix_spawnattr, diff --git a/lib/posix/posix_haiku.nim b/lib/posix/posix_haiku.nim index 32a6d24e26a32..eabf81edca353 100644 --- a/lib/posix/posix_haiku.nim +++ b/lib/posix/posix_haiku.nim @@ -268,7 +268,7 @@ type tm_wday*: cint ## Day of week [0,6] (Sunday =0). tm_yday*: cint ## Day of year [0,365]. tm_isdst*: cint ## Daylight Savings flag. - Itimerspec* {.importc: "struct itimerspec", header: "", + ItimerSpec* {.importc: "struct itimerspec", header: "", final, pure.} = object ## struct itimerspec it_interval*: Timespec ## Timer period. it_value*: Timespec ## Timer expiration. @@ -277,7 +277,7 @@ type ## Possibly volatile-qualified integer type of an object that can be ## accessed as an atomic entity, even in the presence of asynchronous ## interrupts. - Sigset* {.importc: "sigset_t", header: "".} = uint64 + SigSet* {.importc: "sigset_t", header: "".} = uint64 SigEvent* {.importc: "struct sigevent", header: "", final, pure.} = object ## struct sigevent @@ -291,12 +291,12 @@ type header: "", final, pure.} = object ## struct sigval sival_ptr*: pointer ## pointer signal value; ## integer signal value not defined! - Sigaction* {.importc: "struct sigaction", + SigAction* {.importc: "struct sigaction", header: "", final, pure.} = object ## struct sigaction sa_handler*: proc (x: cint) {.noconv.} ## Pointer to a signal-catching ## function or one of the macros ## SIG_IGN or SIG_DFL. - sa_mask*: Sigset ## Set of signals to be blocked during execution of + sa_mask*: SigSet ## Set of signals to be blocked during execution of ## the signal handling function. sa_flags*: cint ## Special flags. sa_sigaction*: proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.} @@ -340,7 +340,7 @@ type final, pure.} = object ## ucontext_t uc_link*: ptr Ucontext ## Pointer to the context that is resumed ## when this context returns. - uc_sigmask*: Sigset ## The set of signals that are blocked when this + uc_sigmask*: SigSet ## The set of signals that are blocked when this ## context is active. uc_stack*: Stack ## The stack used by this context. uc_mcontext*: Mcontext ## A machine-specific representation of the saved diff --git a/lib/posix/posix_linux_amd64.nim b/lib/posix/posix_linux_amd64.nim index 8d11c507d70a1..b6f1990cdccbf 100644 --- a/lib/posix/posix_linux_amd64.nim +++ b/lib/posix/posix_linux_amd64.nim @@ -276,7 +276,7 @@ type tm_gmtoff*: clong tm_zone*: cstring - Itimerspec* {.importc: "struct itimerspec", header: "", + ItimerSpec* {.importc: "struct itimerspec", header: "", final, pure.} = object ## struct itimerspec it_interval*: Timespec ## Timer period. it_value*: Timespec ## Timer expiration. @@ -285,7 +285,7 @@ type ## Possibly volatile-qualified integer type of an object that can be ## accessed as an atomic entity, even in the presence of asynchronous ## interrupts. - Sigset* {.importc: "sigset_t", header: "", final, pure.} = object + SigSet* {.importc: "sigset_t", header: "", final, pure.} = object abi: array[1024 div (8 * sizeof(culong)), culong] SigEvent* {.importc: "struct sigevent", @@ -301,12 +301,12 @@ type header: "", final, pure.} = object ## struct sigval sival_ptr*: pointer ## pointer signal value; ## integer signal value not defined! - Sigaction* {.importc: "struct sigaction", + SigAction* {.importc: "struct sigaction", header: "", final, pure.} = object ## struct sigaction sa_handler*: proc (x: cint) {.noconv.} ## Pointer to a signal-catching ## function or one of the macros ## SIG_IGN or SIG_DFL. - sa_mask*: Sigset ## Set of signals to be blocked during execution of + sa_mask*: SigSet ## Set of signals to be blocked during execution of ## the signal handling function. sa_flags*: cint ## Special flags. sa_restorer: proc() {.noconv.} ## not intended for application use. @@ -336,9 +336,9 @@ type si_value*: SigVal ## Signal value. pad {.importc: "_pad".}: array[128 - 56, uint8] -template sa_sigaction*(v: Sigaction): proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.} = +template sa_sigaction*(v: SigAction): proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.} = cast[proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.}](v.sa_handler) -proc `sa_sigaction=`*(v: var Sigaction, x: proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.}) = +proc `sa_sigaction=`*(v: var SigAction, x: proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.}) = v.sa_handler = cast[proc (x: cint) {.noconv.}](x) type @@ -372,7 +372,7 @@ type uc_stack*: Stack ## The stack used by this context. uc_mcontext*: Mcontext ## A machine-specific representation of the saved ## context. - uc_sigmask*: Sigset ## The set of signals that are blocked when this + uc_sigmask*: SigSet ## The set of signals that are blocked when this ## context is active. # todo fpregds_mem @@ -400,8 +400,8 @@ when hasSpawnH: header: "", final, pure.} = object flags: cshort pgrp: Pid - sd: Sigset - ss: Sigset + sd: SigSet + ss: SigSet sp: Sched_param policy: cint pad: array[16, cint] diff --git a/lib/posix/posix_macos_amd64.nim b/lib/posix/posix_macos_amd64.nim index d6b5834cb68ee..893ea1aa72c24 100644 --- a/lib/posix/posix_macos_amd64.nim +++ b/lib/posix/posix_macos_amd64.nim @@ -257,7 +257,7 @@ type tm_wday*: cint ## Day of week [0,6] (Sunday =0). tm_yday*: cint ## Day of year [0,365]. tm_isdst*: cint ## Daylight Savings flag. - Itimerspec* {.importc: "struct itimerspec", header: "", + ItimerSpec* {.importc: "struct itimerspec", header: "", final, pure.} = object ## struct itimerspec it_interval*: Timespec ## Timer period. it_value*: Timespec ## Timer expiration. @@ -266,7 +266,7 @@ type ## Possibly volatile-qualified integer type of an object that can be ## accessed as an atomic entity, even in the presence of asynchronous ## interrupts. - Sigset* {.importc: "sigset_t", header: "", final, pure.} = object + SigSet* {.importc: "sigset_t", header: "", final, pure.} = object SigEvent* {.importc: "struct sigevent", header: "", final, pure.} = object ## struct sigevent @@ -280,12 +280,12 @@ type header: "", final, pure.} = object ## struct sigval sival_ptr*: pointer ## pointer signal value; ## integer signal value not defined! - Sigaction* {.importc: "struct sigaction", + SigAction* {.importc: "struct sigaction", header: "", final, pure.} = object ## struct sigaction sa_handler*: proc (x: cint) {.noconv.} ## Pointer to a signal-catching ## function or one of the macros ## SIG_IGN or SIG_DFL. - sa_mask*: Sigset ## Set of signals to be blocked during execution of + sa_mask*: SigSet ## Set of signals to be blocked during execution of ## the signal handling function. sa_flags*: cint ## Special flags. sa_sigaction*: proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.} @@ -341,7 +341,7 @@ type final, pure.} = object ## ucontext_t uc_link*: ptr Ucontext ## Pointer to the context that is resumed ## when this context returns. - uc_sigmask*: Sigset ## The set of signals that are blocked when this + uc_sigmask*: SigSet ## The set of signals that are blocked when this ## context is active. uc_stack*: Stack ## The stack used by this context. uc_mcontext*: Mcontext ## A machine-specific representation of the saved diff --git a/lib/posix/posix_nintendoswitch.nim b/lib/posix/posix_nintendoswitch.nim index b66563695c1ee..67db55d28fc98 100644 --- a/lib/posix/posix_nintendoswitch.nim +++ b/lib/posix/posix_nintendoswitch.nim @@ -251,7 +251,7 @@ type tm_yday*: cint ## Day of year [0,365]. tm_isdst*: cint ## Daylight Savings flag. - Itimerspec* {.importc: "struct itimerspec", header: "", + ItimerSpec* {.importc: "struct itimerspec", header: "", final, pure.} = object ## struct itimerspec it_interval*: Timespec ## Timer period. it_value*: Timespec ## Timer expiration. @@ -260,7 +260,7 @@ type ## Possibly volatile-qualified integer type of an object that can be ## accessed as an atomic entity, even in the presence of asynchronous ## interrupts. - Sigset* {.importc: "sigset_t", header: "", final.} = culong + SigSet* {.importc: "sigset_t", header: "", final.} = culong SigEvent* {.importc: "struct sigevent", header: "", final, pure.} = object ## struct sigevent @@ -273,12 +273,12 @@ type sival_int*: cint ## integer signal value sival_ptr*: pointer ## pointer signal value; - Sigaction* {.importc: "struct sigaction", + SigAction* {.importc: "struct sigaction", header: "", final, pure.} = object ## struct sigaction sa_handler*: proc (x: cint) {.noconv.} ## Pointer to a signal-catching ## function or one of the macros ## SIG_IGN or SIG_DFL. - sa_mask*: Sigset ## Set of signals to be blocked during execution of + sa_mask*: SigSet ## Set of signals to be blocked during execution of ## the signal handling function. sa_flags*: cint ## Special flags. diff --git a/lib/posix/posix_openbsd_amd64.nim b/lib/posix/posix_openbsd_amd64.nim index 1ef4a4182dfdc..276ef2272a5f6 100644 --- a/lib/posix/posix_openbsd_amd64.nim +++ b/lib/posix/posix_openbsd_amd64.nim @@ -256,7 +256,7 @@ type tm_wday*: cint ## Day of week [0,6] (Sunday =0). tm_yday*: cint ## Day of year [0,365]. tm_isdst*: cint ## Daylight Savings flag. - Itimerspec* {.importc: "struct itimerspec", header: "", + ItimerSpec* {.importc: "struct itimerspec", header: "", final, pure.} = object ## struct itimerspec it_interval*: Timespec ## Timer period. it_value*: Timespec ## Timer expiration. @@ -265,7 +265,7 @@ type ## Possibly volatile-qualified integer type of an object that can be ## accessed as an atomic entity, even in the presence of asynchronous ## interrupts. - Sigset* {.importc: "sigset_t", header: "", final, pure.} = object + SigSet* {.importc: "sigset_t", header: "", final, pure.} = object SigEvent* {.importc: "struct sigevent", header: "", final, pure.} = object ## struct sigevent @@ -279,12 +279,12 @@ type header: "", final, pure.} = object ## struct sigval sival_ptr*: pointer ## pointer signal value; ## integer signal value not defined! - Sigaction* {.importc: "struct sigaction", + SigAction* {.importc: "struct sigaction", header: "", final, pure.} = object ## struct sigaction sa_handler*: proc (x: cint) {.noconv.} ## Pointer to a signal-catching ## function or one of the macros ## SIG_IGN or SIG_DFL. - sa_mask*: Sigset ## Set of signals to be blocked during execution of + sa_mask*: SigSet ## Set of signals to be blocked during execution of ## the signal handling function. sa_flags*: cint ## Special flags. sa_sigaction*: proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.} @@ -341,7 +341,7 @@ type final, pure.} = object ## ucontext_t uc_link*: ptr Ucontext ## Pointer to the context that is resumed ## when this context returns. - uc_sigmask*: Sigset ## The set of signals that are blocked when this + uc_sigmask*: SigSet ## The set of signals that are blocked when this ## context is active. uc_stack*: Stack ## The stack used by this context. uc_mcontext*: Mcontext ## A machine-specific representation of the saved diff --git a/lib/posix/posix_other.nim b/lib/posix/posix_other.nim index ea8731405df84..09eea0b07c748 100644 --- a/lib/posix/posix_other.nim +++ b/lib/posix/posix_other.nim @@ -281,7 +281,7 @@ type tm_wday*: cint ## Day of week [0,6] (Sunday =0). tm_yday*: cint ## Day of year [0,365]. tm_isdst*: cint ## Daylight Savings flag. - Itimerspec* {.importc: "struct itimerspec", header: "", + ItimerSpec* {.importc: "struct itimerspec", header: "", final, pure.} = object ## struct itimerspec it_interval*: Timespec ## Timer period. it_value*: Timespec ## Timer expiration. @@ -290,7 +290,7 @@ type ## Possibly volatile-qualified integer type of an object that can be ## accessed as an atomic entity, even in the presence of asynchronous ## interrupts. - Sigset* {.importc: "sigset_t", header: "", final, pure.} = object + SigSet* {.importc: "sigset_t", header: "", final, pure.} = object SigEvent* {.importc: "struct sigevent", header: "", final, pure.} = object ## struct sigevent @@ -304,12 +304,12 @@ type header: "", final, pure.} = object ## struct sigval sival_ptr*: pointer ## pointer signal value; ## integer signal value not defined! - Sigaction* {.importc: "struct sigaction", + SigAction* {.importc: "struct sigaction", header: "", final, pure.} = object ## struct sigaction sa_handler*: proc (x: cint) {.noconv.} ## Pointer to a signal-catching ## function or one of the macros ## SIG_IGN or SIG_DFL. - sa_mask*: Sigset ## Set of signals to be blocked during execution of + sa_mask*: SigSet ## Set of signals to be blocked during execution of ## the signal handling function. sa_flags*: cint ## Special flags. sa_sigaction*: proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.} @@ -365,7 +365,7 @@ type final, pure.} = object ## ucontext_t uc_link*: ptr Ucontext ## Pointer to the context that is resumed ## when this context returns. - uc_sigmask*: Sigset ## The set of signals that are blocked when this + uc_sigmask*: SigSet ## The set of signals that are blocked when this ## context is active. uc_stack*: Stack ## The stack used by this context. uc_mcontext*: Mcontext ## A machine-specific representation of the saved