diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-01-07 14:15:44 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-01-07 14:15:44 +0100 |
commit | f2e717da2d44a184bc8ce7056391d975cb641e81 (patch) | |
tree | e7f2e1bf5b204d2145f86340c432249fa15891b7 /lib | |
parent | e386b7460b83159e5ae86df15677df367a2fc077 (diff) | |
parent | 9a36c17c05e458d596e4ecc60322f0bf9d6d3ae6 (diff) | |
download | Nim-f2e717da2d44a184bc8ce7056391d975cb641e81.tar.gz |
Merge pull request #1884 from def-/tcc-usevfork
Add workaround for TCC to make POSIX_SPAWN_USEVFORK available
Diffstat (limited to 'lib')
-rw-r--r-- | lib/posix/posix.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index 0498a0e70..d56adf7f5 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -1739,7 +1739,12 @@ when hasSpawnH: when defined(linux): # better be safe than sorry; Linux has this flag, macosx doesn't, don't # know about the other OSes - var POSIX_SPAWN_USEVFORK* {.importc, header: "<spawn.h>".}: cint + when defined(tcc): + # TCC doesn't define __USE_GNU, so we can't get the magic number from + # spawn.h + const POSIX_SPAWN_USEVFORK* = cint(0x40) + else: + var POSIX_SPAWN_USEVFORK* {.importc, header: "<spawn.h>".}: cint else: # macosx lacks this, so we define the constant to be 0 to not affect # OR'ing of flags: |