From f64f86b87659e3d8859e676996c496fe961dd1e6 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 25 Jun 2024 19:29:09 +0200 Subject: [PATCH] Fix negation in shell tests 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 d219daaf0338c..f6c3cf4e38161 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 fb8aab94c54d6..2c5e6af6f7603 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