syscall: always define WEXITED and WNOWAIT on GNU/Linux

Fixes https://gcc.gnu.org/PR88135
    
    Reviewed-on: https://go-review.googlesource.com/c/150897

From-SVN: r266495
This commit is contained in:
Ian Lance Taylor 2018-11-26 23:58:34 +00:00
parent 67b9fab0e6
commit 0abbc8f15e
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
26639de5b48ca895f517b7b5f5720b2613f885ce 3ecc845c337c15d9a19ed8d277e5ee9eaf49c3ad
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.

View File

@ -173,6 +173,15 @@ if grep '^const ___WALL = ' gen-sysinfo.go >/dev/null 2>&1 \
&& ! grep '^const _WALL = ' gen-sysinfo.go >/dev/null 2>&1; then && ! grep '^const _WALL = ' gen-sysinfo.go >/dev/null 2>&1; then
echo 'const WALL = ___WALL' >> ${OUT} echo 'const WALL = ___WALL' >> ${OUT}
fi fi
# On GNU/Linux the os package requires WEXITED and WNOWAIT.
if test "${GOOS}" = "linux"; then
if ! grep '^const WEXITED = ' ${OUT} >/dev/null 2>&1; then
echo 'const WEXITED = 4' >> ${OUT}
fi
if ! grep '^const WNOWAIT = ' ${OUT} >/dev/null 2>&1; then
echo 'const WNOWAIT = 0x01000000' >> ${OUT}
fi
fi
# Networking constants. # Networking constants.
egrep '^const _(AF|ARPHRD|ETH|IN|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go | egrep '^const _(AF|ARPHRD|ETH|IN|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |