diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2017-05-16 20:45:10 +0800 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2017-05-16 13:45:09 +0100 |
commit | 797301ace8f0ce7e3e43eac9d5fbb11c0f6f615a (patch) | |
tree | 387e455f0d33c6fa76f0b87ea532c07b6997b0c6 /lib/posix/posix.nim | |
parent | 224eec595a6112c7aa3a4c06afacc99167580464 (diff) | |
download | Nim-797301ace8f0ce7e3e43eac9d5fbb11c0f6f615a.tar.gz |
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
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>".} |