Darwin has long deprecated the wait union, but their macros still assume it unless you define _POSIX_C_SOURCE. This trips up C++ compilers. This commit duplicates the behavior of WEXITSTATUS when _POSIX_C_SOURCE is defined.
This commit is contained in:
parent
821920aa39
commit
6737634d88
2 changed files with 16 additions and 1 deletions
13
tests/stdlib/t10231.nim
Normal file
13
tests/stdlib/t10231.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
target: cpp
|
||||
action: run
|
||||
exitcode: 0
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
if paramCount() == 0:
|
||||
# main process
|
||||
doAssert execShellCmd(getAppFilename().quoteShell & " test") == 1
|
||||
else:
|
||||
quit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue