libgo: use POSIX shell arithmetic expansion
authorIan Lance Taylor <iant@golang.org>
Fri, 22 Jul 2022 18:38:20 +0000 (11:38 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 22 Jul 2022 18:57:18 +0000 (11:57 -0700)
commitcf1725610526fe347d2530455b32affc033fd7fc
treedc4777c35f2c5c8c8c655c55a369029ffe1145dd
parent41da4070a2acd9a9c1a24446d1a670bc70462886
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
gcc/go/gofrontend/MERGE
libgo/match.sh
libgo/testsuite/gotest