From 797301ace8f0ce7e3e43eac9d5fbb11c0f6f615a Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Tue, 16 May 2017 20:45:10 +0800 Subject: add back SIG_IGN, SIG_DFL and friends to posix.nim (#5820) * add back SIG_IGN, SIG_DFL and friends to posix.nim accidentally wiped by ce86b4ad78aae11f62c50e4f46e8ab2a124356b4 * move deprecated sig_hold after consts include --- lib/posix/posix.nim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/posix/posix.nim') 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: "".} 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 signal*(a1: cint, a2: proc (x: cint) {.noconv.}) {. +proc signal*(a1: cint, a2: Sighandler) {. importc, header: "".} proc sigpause*(a1: cint): cint {.importc, header: "".} proc sigpending*(a1: var Sigset): cint {.importc, header: "".} -- cgit 1.4.1-2-gfad0