From a6b1c8dbda1877557fbea634eed0b934372e6c08 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 10 Mar 2019 09:23:33 +0000 Subject: 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. --- regress/regress.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 # @@ -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 ------------------------------------------------ -- cgit v1.2.3-56-ge451