]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Some `diff' refuse to diff with /dev/null, such as Tru64's.
authorAkim Demaille <akim@epita.fr>
Fri, 18 Feb 2000 13:44:17 +0000 (13:44 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 18 Feb 2000 13:44:17 +0000 (13:44 +0000)
Reported by Nicolas Joly.

* tests/atgeneral.m4 (empty): New dummy file.
Changed various `diff /dev/null' as `diff empty'.

ChangeLog
lib/autotest/general.m4
tests/atgeneral.m4

index fd53c65c1f6d11dc46333461d007f14ce2b875cf..dbb9fa64d8267153ef3e8df867ae517f0d07260d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-02-18  Akim Demaille  <akim@epita.fr>
+
+       Some `diff' refuse to diff with /dev/null, such as Tru64's.
+       Reported by Nicolas Joly.
+
+       * tests/atgeneral.m4 (empty): New dummy file.
+       Changed various `diff /dev/null' as `diff empty'.
+
 2000-02-18  Akim Demaille  <akim@epita.fr>
 
        * tests/atspecific.m4 (TEST_MACRO): Don't run AC_PATH_TOOL and
index ce6c6cf159521f612322257bd3ce0b74564513f6..3d4b4cadf628e2c87dd8e378c524486ee9a6fc26 100644 (file)
@@ -139,9 +139,12 @@ done
 # environments, `diff' considers that two files are equal included
 # when there are only differences on the coding of new lines. `cmp'
 # does not.
-# Finally, not all the `diff' support `-u'.
+#
+# Finally, not all the `diff' support `-u', and some, like Tru64, even
+# refuse to `diff' /dev/null.
+: >empty
 
-if diff -u /dev/null /dev/null >/dev/null 2>&1; then
+if diff -u empty empty >/dev/null 2>&1; then
   at_diff='diff -u'
 else
   at_diff='diff'
@@ -370,13 +373,13 @@ if test -z "$at_no_redirs"; then
           ignore, [test -n "$at_verbose" && cat stdout;:],
           expout, [AT_DEFINE([AT_data_expout], [ expout])dnl
 $at_diff expout stdout || exit 1],
-          [], [$at_diff /dev/null stdout || exit 1],
+          [], [$at_diff empty stdout || exit 1],
           [echo $at_n "patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout || exit 1])
   AT_CASE([$4],
           ignore, [test -n "$at_verbose" && cat stderr;:],
           experr, [AT_DEFINE([AT_data_experr], [ experr])dnl
 $at_diff experr stderr || exit 1],
-          [], [$at_diff /dev/null stderr || exit 1],
+          [], [$at_diff empty stderr || exit 1],
           [echo $at_n "patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr || exit 1])
 fi
 $at_traceon
index ce6c6cf159521f612322257bd3ce0b74564513f6..3d4b4cadf628e2c87dd8e378c524486ee9a6fc26 100644 (file)
@@ -139,9 +139,12 @@ done
 # environments, `diff' considers that two files are equal included
 # when there are only differences on the coding of new lines. `cmp'
 # does not.
-# Finally, not all the `diff' support `-u'.
+#
+# Finally, not all the `diff' support `-u', and some, like Tru64, even
+# refuse to `diff' /dev/null.
+: >empty
 
-if diff -u /dev/null /dev/null >/dev/null 2>&1; then
+if diff -u empty empty >/dev/null 2>&1; then
   at_diff='diff -u'
 else
   at_diff='diff'
@@ -370,13 +373,13 @@ if test -z "$at_no_redirs"; then
           ignore, [test -n "$at_verbose" && cat stdout;:],
           expout, [AT_DEFINE([AT_data_expout], [ expout])dnl
 $at_diff expout stdout || exit 1],
-          [], [$at_diff /dev/null stdout || exit 1],
+          [], [$at_diff empty stdout || exit 1],
           [echo $at_n "patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout || exit 1])
   AT_CASE([$4],
           ignore, [test -n "$at_verbose" && cat stderr;:],
           experr, [AT_DEFINE([AT_data_experr], [ experr])dnl
 $at_diff experr stderr || exit 1],
-          [], [$at_diff /dev/null stderr || exit 1],
+          [], [$at_diff empty stderr || exit 1],
           [echo $at_n "patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr || exit 1])
 fi
 $at_traceon