diff options
Diffstat (limited to 'lib/posix/posix.nim')
-rw-r--r-- | lib/posix/posix.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index 02312a4d5..55d1dd2eb 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -79,6 +79,9 @@ const DT_SOCK* = 12 ## UNIX domain socket. DT_WHT* = 14 +# Special types +type Sighandler = proc (a: cint) {.noconv.} + # Platform specific stuff when defined(linux) and defined(amd64): @@ -86,6 +89,9 @@ when defined(linux) and defined(amd64): else: include posix_other +# There used to be this name in posix.nim a long time ago, not sure why! +{.deprecated: [cSIG_HOLD: SIG_HOLD].} + when not defined(macosx): proc st_atime*(s: Stat): Time {.inline.} = ## Second-granularity time of last access @@ -659,7 +665,7 @@ proc sighold*(a1: cint): cint {.importc, header: "<signal.h>".} proc sigignore*(a1: cint): cint {.importc, header: "<signal.h>".} proc siginterrupt*(a1, a2: cint): cint {.importc, header: "<signal.h>".} proc sigismember*(a1: var Sigset, a2: cint): cint {.importc, header: "<signal.h>".} -proc signal*(a1: cint, a2: proc (x: cint) {.noconv.}) {. +proc signal*(a1: cint, a2: Sighandler) {. importc, header: "<signal.h>".} proc sigpause*(a1: cint): cint {.importc, header: "<signal.h>".} proc sigpending*(a1: var Sigset): cint {.importc, header: "<signal.h>".} |