From 604e0a7bbe1efdfd1d2cca81a05e36eeb648f8df Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 25 Jun 2024 23:31:08 +0200 Subject: [PATCH] Fix negation in shell tests (#14662) According to documentation the `if test ! ...` is preferred to `if ! test ...`. The later is not portable: https://www.gnu.org/software/autoconf/manual/autoconf-2.72/autoconf.html --- ext/odbc/config.m4 | 8 +++----- scripts/dev/genfiles | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index d219daaf033..f6c3cf4e381 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -1,8 +1,6 @@ -AC_DEFUN([PHP_ODBC_CHECK_HEADER],[ -if ! test -f "$ODBC_INCDIR/$1"; then - AC_MSG_ERROR([ODBC header file '$ODBC_INCDIR/$1' not found!]) -fi -]) +AC_DEFUN([PHP_ODBC_CHECK_HEADER], +[AS_IF([test ! -f "$ODBC_INCDIR/$1"], + [AC_MSG_ERROR([ODBC header file '$ODBC_INCDIR/$1' not found!])])]) dnl dnl Figure out which library file to link with for the Solid support. diff --git a/scripts/dev/genfiles b/scripts/dev/genfiles index fb8aab94c54..2c5e6af6f76 100755 --- a/scripts/dev/genfiles +++ b/scripts/dev/genfiles @@ -95,7 +95,7 @@ else fi # Check if make exists. -if ! test -x "$(command -v $MAKE)"; then +if test ! -x "$(command -v $MAKE)"; then echo "genfiles: make not found. Please install make to generate files." >&2 exit 1 fi