]> Savannah Git Hosting - gnulib.git/commitdiff
tests: for compare_(), use cmp -s where available
authorPádraig Brady <P@draigBrady.com>
Wed, 25 Nov 2015 14:26:59 +0000 (14:26 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 1 Jan 2016 14:06:29 +0000 (14:06 +0000)
* tests/init.sh (compare_): Only fall back to cmp without
the POSIX defined -s option, where this is not available.

ChangeLog
tests/init.sh

index 9aa8bb58279b9aac8485e8a251a1517584305b05..c41b27dc8f3731c94572d45404133f572706082f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-01  Pádraig Brady  <P@draigBrady.com>
+
+       tests: for compare_(), use cmp -s where available
+       * tests/init.sh (compare_): Only fall back to cmp without
+       the POSIX defined -s option, where this is not available.
+
 2016-01-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        version-etc: new year
index 67466bfb2ffc7534840f3e9736339c6011ab726f..ee0802241ff56f137e770c9a2b3e8339f0f0cdd1 100644 (file)
@@ -327,7 +327,7 @@ elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
       fi
     }
   fi
-elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
   compare_ () { cmp -s "$@"; }
 else
   compare_ () { cmp "$@"; }