diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-07-22 11:38:20 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-07-22 11:57:18 -0700 |
commit | cf1725610526fe347d2530455b32affc033fd7fc (patch) | |
tree | dc4777c35f2c5c8c8c655c55a369029ffe1145dd | |
parent | 41da4070a2acd9a9c1a24446d1a670bc70462886 (diff) | |
download | gcc-cf1725610526fe347d2530455b32affc033fd7fc.zip gcc-cf1725610526fe347d2530455b32affc033fd7fc.tar.gz gcc-cf1725610526fe347d2530455b32affc033fd7fc.tar.bz2 |
libgo: use POSIX shell arithmetic expansion
Avoid bash-specific ((expression)) syntax. As the bash syntax
converts a non-zero value to a zero status (and a zero value to a 1
status), and POSIX arithmetic expansion does not, we have to negate
the result.
Based on patch by Sören Tempel.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/419154
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rwxr-xr-x | libgo/match.sh | 2 | ||||
-rwxr-xr-x | libgo/testsuite/gotest | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 5ea0406..2f2fafd 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -ff68b1a147eb60082fd60c198db0ef5477ade938 +a62f20ae78ddd41be682dde8cab075ca4f5dbb2a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/match.sh b/libgo/match.sh index 7ed587f..e5ed98d 100755 --- a/libgo/match.sh +++ b/libgo/match.sh @@ -111,7 +111,7 @@ gobuild() { if test "$goarch" != "386"; then line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g") fi - (($line)) + return $((!($line))) } matched= diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 04e4267..0a0a7e1 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -302,7 +302,7 @@ gobuild() { if test "$goarch" != "386"; then line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g") fi - (($line)) + return $((!($line))) } case "x$gofiles" in |