[committed] libstdc++: Replace obsolete shell syntax in configure.ac

Message ID 20230531122255.4117505-1-jwakely@redhat.com
State Committed
Headers
Series [committed] libstdc++: Replace obsolete shell syntax in configure.ac |

Commit Message

Jonathan Wakely May 31, 2023, 12:22 p.m. UTC
  Tested powerpc64le-linux. Pushed to trunk.

-- >8 --

The current POSIX standard says that the -a and -o operators to the
'test' utility are obsolete, and the shell operators && and || should be
used instead.

libstdc++-v3/ChangeLog:

	* configure.ac: Replace use of -o operator for test.
	* configure: Regenerate.
---
 libstdc++-v3/configure    | 2 +-
 libstdc++-v3/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 167aabd8fc5..4db8a284083 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -3298,7 +3298,7 @@  if test "$build" != "$host"; then
       *-*-darwin*,*-*-darwin*)
 	hostos=`echo $host | sed 's/.*-darwin/darwin/'`
 	targetos=`echo $target | sed 's/.*-darwin/darwin/'`
-	if test $hostos = $targetos -o $targetos = darwin ; then
+	if test $hostos = $targetos || test $targetos = darwin ; then
 	  GLIBCXX_IS_NATIVE=true
 	fi
 	;;
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index df01f58bd83..0abe54e7b9a 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -45,7 +45,7 @@  if test "$build" != "$host"; then
       *-*-darwin*,*-*-darwin*)
 	hostos=`echo $host | sed 's/.*-darwin/darwin/'`
 	targetos=`echo $target | sed 's/.*-darwin/darwin/'`
-	if test $hostos = $targetos -o $targetos = darwin ; then
+	if test $hostos = $targetos || test $targetos = darwin ; then
 	  GLIBCXX_IS_NATIVE=true
 	fi
 	;;