aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-03-10 09:23:33 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-03-10 09:23:33 +0000
commita6b1c8dbda1877557fbea634eed0b934372e6c08 (patch)
tree4511426478a314df14463189fda49b2ed982ec65
parent96b26b75942ef3682636c79b488427f342f8b6a6 (diff)
downloadmandoc-a6b1c8dbda1877557fbea634eed0b934372e6c08.tar.gz
mandoc-a6b1c8dbda1877557fbea634eed0b934372e6c08.tar.zst
mandoc-a6b1c8dbda1877557fbea634eed0b934372e6c08.zip
Automatically detect whether diff(1) supports the -a option.
Useful on illumos and on Oracle Solaris, where it doesn't. Patch written based on a report from Sevan Janiyan.
-rwxr-xr-xregress/regress.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/regress/regress.pl b/regress/regress.pl
index 9d8fcf58..7faa3a5f 100755
--- a/regress/regress.pl
+++ b/regress/regress.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# $Id: regress.pl,v 1.9 2018/12/16 00:17:04 schwarze Exp $
+# $Id: regress.pl,v 1.10 2019/03/10 09:23:33 schwarze Exp $
#
# Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
#
@@ -27,6 +27,7 @@ use IPC::Open3 qw(open3);
# Define this at one place such that it can easily be changed
# if diff(1) does not support the -a option.
my @diff = qw(diff -au);
+system @diff, '/dev/null', '/dev/null' and @diff = qw(diff -u);
# --- utility functions ------------------------------------------------