summary refs log tree commit diff stats
path: root/tools/detect
diff options
context:
space:
mode:
authorJacek Sieka <arnetheduck@gmail.com>2017-05-16 20:45:10 +0800
committerDominik Picheta <dominikpicheta@googlemail.com>2017-05-16 13:45:09 +0100
commit797301ace8f0ce7e3e43eac9d5fbb11c0f6f615a (patch)
tree387e455f0d33c6fa76f0b87ea532c07b6997b0c6 /tools/detect
parent224eec595a6112c7aa3a4c06afacc99167580464 (diff)
downloadNim-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 'tools/detect')
-rw-r--r--tools/detect/detect.nim11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/detect/detect.nim b/tools/detect/detect.nim
index 3afe8ee67..1b016cef9 100644
--- a/tools/detect/detect.nim
+++ b/tools/detect/detect.nim
@@ -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")