aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-11-26 23:58:34 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-11-26 23:58:34 +0000
commit0abbc8f15ef80c104bd38116680ef6a1c1777143 (patch)
tree7b1fe0141e6dd2f9623a927db81188cf89e9b654
parent67b9fab0e6f9fac918523df18ae2d8bbb88d7748 (diff)
downloadgcc-0abbc8f15ef80c104bd38116680ef6a1c1777143.zip
gcc-0abbc8f15ef80c104bd38116680ef6a1c1777143.tar.gz
gcc-0abbc8f15ef80c104bd38116680ef6a1c1777143.tar.bz2
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
-rw-r--r--gcc/go/gofrontend/MERGE2
-rwxr-xr-xlibgo/mksysinfo.sh9
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 89d79de..d68d123 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-26639de5b48ca895f517b7b5f5720b2613f885ce
+3ecc845c337c15d9a19ed8d277e5ee9eaf49c3ad
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index d4286dc..02f0b5b 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -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
echo 'const WALL = ___WALL' >> ${OUT}
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.
egrep '^const _(AF|ARPHRD|ETH|IN|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |