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 ce86b4ad78

* move deprecated sig_hold after consts include
This commit is contained in:
Jacek Sieka 2017-05-16 20:45:10 +08:00 • committed by Dominik Picheta
commit 797301ace8
5 changed files with 27 additions and 2 deletions

View file

@ -119,10 +119,14 @@ proc v(name: string, typ = "cint", no_other = false) =
addf(tl,
"#ifdef $3\n fprintf(f, \"const $1* = $2(%ld)\\n\", $3);\n#endif\n",
n, t, name)
else:
of "cint", "cshort", "InAddrScalar", "TSa_Family":
addf(tl,
"#ifdef $3\n fprintf(f, \"const $1* = $2(%d)\\n\", $3);\n#endif\n",
n, t, name)
else:
addf(tl,
"#ifdef $3\n fprintf(f, \"const $1* = cast[$2](%d)\\n\", $3);\n#endif\n",
n, t, name)
header("<aio.h>")
@ -544,6 +548,11 @@ v("SS_DISABLE")
v("MINSIGSTKSZ")
v("SIGSTKSZ")
v("SIG_HOLD", "Sighandler")
v("SIG_DFL", "Sighandler")
v("SIG_ERR", "Sighandler")
v("SIG_IGN", "Sighandler")
header("<sys/ipc.h>")
v("IPC_CREAT")
v("IPC_EXCL")