Re: [PATCH 1/3] gcc: Fix nonportable shell syntax in "test" and "[" commands [PR105831]
Bernhard Reutner-Fischer
rep.dot.nop@gmail.com
Thu May 18 14:47:35 GMT 2023
On 18 May 2023 14:56:45 CEST, Jonathan Wakely via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>From: Michael B��uerle <micha@NetBSD.org>
>
>POSIX sh does not support the == for string comparisons, use = instead.
>
>gcc/ChangeLog:
>
> PR bootstrap/105831
>
>diff --git a/gcc/configure.ac b/gcc/configure.ac
>index 075424669c9..cc8dd9e20bf 100644
>--- a/gcc/configure.ac
>+++ b/gcc/configure.ac
>@@ -473,7 +473,7 @@ AC_CHECK_SIZEOF(dev_t)
> if test "$enable_largefile" != no; then
> case "$host, $build" in
> *-*-aix*,*|*,*-*-aix*)
>- if test "$ac_cv_sizeof_ino_t" == "4" -a "$ac_cv_sizeof_dev_t" == 4; then
>+ if test "$ac_cv_sizeof_ino_t" = "4" -a "$ac_cv_sizeof_dev_t" = 4; then
test(1) -a and -o are marked obsolescent in SUS and should be spelled out as && or ||, respectively: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
thanks,
More information about the Gcc-patches
mailing list