mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
Merge pull request #1884 from def-/tcc-usevfork
Add workaround for TCC to make POSIX_SPAWN_USEVFORK available
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user