From MAILER-DAEMON Sat Feb 04 17:09:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rtnng-0007v9-HP
	for mharc-bug-diffutils@gnu.org; Sat, 04 Feb 2012 17:09:40 -0500
Received: from eggs.gnu.org ([140.186.70.92]:52802)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tom@oxix.org>) id 1RtfXS-0000b2-R5
	for bug-diffutils@gnu.org; Sat, 04 Feb 2012 08:20:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tom@oxix.org>) id 1RtfXR-0007ed-Tb
	for bug-diffutils@gnu.org; Sat, 04 Feb 2012 08:20:22 -0500
Received: from vsl.vm.bytemark.co.uk ([212.110.185.144]:35306)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <tom@oxix.org>)
	id 1RtfXR-0007eS-PI
	for bug-diffutils@gnu.org; Sat, 04 Feb 2012 08:20:21 -0500
Received: by vsl.vm.bytemark.co.uk (Postfix, from userid 1002)
	id 9CBD71E08A; Sat,  4 Feb 2012 13:20:19 +0000 (GMT)
Date: Sat, 4 Feb 2012 13:20:19 +0000
From: Tom Jones <tom@oxix.org>
To: bug-diffutils@gnu.org
Message-ID: <20120204132019.GT8981@vsl.vm.bytemark.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.18 (2008-05-17)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1)
X-Received-From: 212.110.185.144
X-Mailman-Approved-At: Sat, 04 Feb 2012 17:09:38 -0500
Subject: [bug-diffutils] -N option doesn't work with "-" as a file argument
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 04 Feb 2012 13:20:23 -0000

Hello,

The -N option doesn't seem to work when one of the file arguments
is "-".

    $ diff -N - /no_exist
    diff: /no_exist: No such file or directory

    $ diff -N /no_exist -
    diff: /no_exist: No such file or directory

On my current development platform I can use /dev/stdin as a workaround:

    $ diff -N /dev/stdin /no_exist
    foo
    1d0
    < foo

regards, Tom Jones.

-- 
Tom Jones


From MAILER-DAEMON Sun Feb 05 01:15:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtvNt-0004dH-0F
	for mharc-bug-diffutils@gnu.org; Sun, 05 Feb 2012 01:15:33 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40742)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RtvNq-0004dA-9l
	for bug-diffutils@gnu.org; Sun, 05 Feb 2012 01:15:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RtvNo-0002aC-GV
	for bug-diffutils@gnu.org; Sun, 05 Feb 2012 01:15:30 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:51303)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RtvNo-0002a3-47
	for bug-diffutils@gnu.org; Sun, 05 Feb 2012 01:15:28 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 47F3939E8006;
	Sat,  4 Feb 2012 22:15:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id IWHUcv5atnqF; Sat,  4 Feb 2012 22:15:24 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 8C758A60002;
	Sat,  4 Feb 2012 22:15:24 -0800 (PST)
Message-ID: <4F2E1E79.80207@cs.ucla.edu>
Date: Sat, 04 Feb 2012 22:15:21 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111229 Thunderbird/9.0
MIME-Version: 1.0
To: Tom Jones <tom@oxix.org>
References: <20120204132019.GT8981@vsl.vm.bytemark.co.uk>
In-Reply-To: <20120204132019.GT8981@vsl.vm.bytemark.co.uk>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: bug-diffutils@gnu.org
Subject: Re: [bug-diffutils] -N option doesn't work with "-" as a file
	argument
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Feb 2012 06:15:31 -0000

Thanks for the bug report; I installed the following patch.

>From 96bc67a57d291edb5129f482f6304c2d8cb7e518 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 4 Feb 2012 22:10:40 -0800
Subject: [PATCH] diff: -N, --unidirectional-new-file now compare to "-" too

* NEWS: Document this.
* doc/diffutils.texi (Comparing Directories): Likewise.
Also, document that these options work at the top level.
* src/diff.c (compare_files): Treat EBADF like ENOENT, to handle
the case where "-" is closed.  Allow the other file to be
STDIN_FILENO, in case it's "-".
* tests/Makefile.am (TESTS): Add new-file.
* tests/new-file: New file.
---
 NEWS               |    5 +++++
 doc/diffutils.texi |   33 +++++++++++++++++----------------
 src/diff.c         |   16 +++++++---------
 tests/Makefile.am  |    1 +
 tests/new-file     |   38 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 68 insertions(+), 25 deletions(-)
 create mode 100755 tests/new-file

diff --git a/NEWS b/NEWS
index 808c603..5a69cd7 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ GNU diffutils NEWS                                    -*- outline -*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** New features
+
+  --new-file (-N) and --unidirectional-new-file now allow comparisons to "-".
+  A standard input that's closed acts like a nonexistent file.
+
 
 * Noteworthy changes in release 3.2 (2011-09-02) [stable]
 
diff --git a/doc/diffutils.texi b/doc/diffutils.texi
index 00403df..d4a68f8 100644
--- a/doc/diffutils.texi
+++ b/doc/diffutils.texi
@@ -1784,20 +1784,23 @@ subdirectories' files, but if you use the @option{-r} or
 @option{--recursive} option, it compares every corresponding pair of files
 in the directory trees, as many levels deep as they go.
 
-For file names that are in only one of the directories, @command{diff}
-normally does not show the contents of the file that exists; it reports
-only that the file exists in that directory and not in the other.  You
-can make @command{diff} act as though the file existed but was empty in the
-other directory, so that it outputs the entire contents of the file that
+If only one file exists, @command{diff} normally does not show its
+contents; it merely reports that one file exists but the other does
+not.  You can make @command{diff} act as though the missing file is
+empty, so that it outputs the entire contents of the file that
 actually exists.  (It is output as either an insertion or a
-deletion, depending on whether it is in the first or the second
-directory given.)  To do this, use the @option{--new-file} (@option{-N})
-option.
-
-If the older directory contains one or more large files that are not in
+deletion, depending on whether the missing file is in the first or the
+second position.)  To do this, use the @option{--new-file}
+(@option{-N}) option.  This option affects command-line arguments as
+well as files found via directory traversal; for example, @samp{diff
+-N a b} treats @file{a} as empty if @file{a} does not exist but
+@file{b} does, and similarly @samp{diff -N - b} treats standard input
+as empty if it is closed but @file{b} exists.
+
+If the older directory contains large files that are not in
 the newer directory, you can make the patch smaller by using the
 @option{--unidirectional-new-file} option instead of @option{-N}.
-This option is like @option{-N} except that it only inserts the contents
+This option is like @option{-N} except that it inserts the contents only
 of files that appear in the second directory but not the first (that is,
 files that were added).  At the top of the patch, write instructions for
 the user applying the patch to remove the files that were deleted before
@@ -3843,9 +3846,8 @@ specifies the number of lines affected.  @xref{RCS}.
 
 @item -N
 @itemx --new-file
-In directory comparison, if a file is found in only one directory,
-treat it as present but empty in the other directory.  @xref{Comparing
-Directories}.
+If one file is missing, treat it as present but empty.
+@xref{Comparing Directories}.
 
 @item --new-group-format=@var{format}
 Use @var{format} to output a group of lines taken from just the second
@@ -3937,8 +3939,7 @@ Use @var{format} to output a line common to both files in if-then-else
 format.  @xref{Line Formats}.
 
 @item --unidirectional-new-file
-When comparing directories, if a file appears only in the second
-directory of the two, treat it as present but empty in the other.
+If a first file is missing, treat it as present but empty.
 @xref{Comparing Directories}.
 
 @item -U @var{lines}
diff --git a/src/diff.c b/src/diff.c
index 972d84d..200112b 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -92,15 +92,11 @@ static bool binary;
 enum { binary = true };
 #endif
 
-/* When comparing directories, if a file appears only in one
-   directory, treat it as present but empty in the other (-N).
-   Then 'patch' would create the file with appropriate contents.  */
+/* If one file is missing, treat it as present but empty (-N).  */
 static bool new_file;
 
-/* When comparing directories, if a file appears only in the second
-   directory of the two, treat it as present but empty in the other
-   (--unidirectional-new-file).
-   Then 'patch' would create the file with appropriate contents.  */
+/* If the first file is missing, treat it as present but empty
+   (--unidirectional-new-file).  */
 static bool unidirectional_new_file;
 
 /* Report files compared that are the same (-s).
@@ -1155,9 +1151,11 @@ compare_files (struct comparison const *parent,
 	    ? (S_ISREG (cmp.file[f].stat.st_mode)
 	       && ! (cmp.file[f].stat.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO))
 	       && cmp.file[f].stat.st_size == 0)
-	    : (cmp.file[f].desc == ERRNO_ENCODE (ENOENT)
+	    : ((cmp.file[f].desc == ERRNO_ENCODE (ENOENT)
+		|| cmp.file[f].desc == ERRNO_ENCODE (EBADF))
 	       && ! parent
-	       && cmp.file[1 - f].desc == UNOPENED)))
+	       && (cmp.file[1 - f].desc == UNOPENED
+		   || cmp.file[1 - f].desc == STDIN_FILENO))))
       cmp.file[f].desc = NONEXISTENT;
 
   for (f = 0; f < 2; f++)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2f6ad53..afc9aad 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,6 +8,7 @@ TESTS = \
   help-version	\
   function-line-vs-leading-space \
   label-vs-func	\
+  new-file \
   no-dereference \
   no-newline-at-eof \
   stdin
diff --git a/tests/new-file b/tests/new-file
new file mode 100755
index 0000000..af7cc4c
--- /dev/null
+++ b/tests/new-file
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Test --new-file (-N) and --unidirectional-new-file.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+fail=0
+
+echo a > a || fail=1
+
+echo '0a1
+> a' > exp || fail=1
+
+diff -N - a <&- > out; test $? = 1 || fail=1
+compare exp out || fail=1
+
+diff --unidirectional-new-file - a <&- > out; test $? = 1 || fail=1
+compare exp out || fail=1
+
+diff -N b - < a > out; test $? = 1 || fail=1
+compare exp out || fail=1
+
+diff --unidirectional-new-file b - < a > out; test $? = 1 || fail=1
+compare exp out || fail=1
+
+echo '1d0
+< a' > exp || fail=1
+
+diff -N a - <&- > out; test $? = 1 || fail=1
+compare exp out || fail=1
+
+diff --unidirectional-new-file a - <&- > out; test $? = 2 || fail=1
+
+diff -N - b < a > out; test $? = 1 || fail=1
+compare exp out || fail=1
+
+diff --unidirectional-new-file - b < a > out; test $? = 2 || fail=1
+
+Exit $fail
-- 
1.7.6.5



From MAILER-DAEMON Tue Feb 07 17:14:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RutIf-0003rv-9V
	for mharc-bug-diffutils@gnu.org; Tue, 07 Feb 2012 17:14:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:47396)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tom@oxix.org>) id 1RutIc-0003ro-Oa
	for bug-diffutils@gnu.org; Tue, 07 Feb 2012 17:14:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tom@oxix.org>) id 1RutIb-0001eZ-JU
	for bug-diffutils@gnu.org; Tue, 07 Feb 2012 17:14:06 -0500
Received: from vsl.vm.bytemark.co.uk ([212.110.185.144]:59150)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <tom@oxix.org>)
	id 1RutIb-0001eG-CR
	for bug-diffutils@gnu.org; Tue, 07 Feb 2012 17:14:05 -0500
Received: by vsl.vm.bytemark.co.uk (Postfix, from userid 1002)
	id 0C9661E08A; Tue,  7 Feb 2012 22:14:03 +0000 (GMT)
Date: Tue, 7 Feb 2012 22:14:03 +0000
From: Tom Jones <tom@oxix.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Message-ID: <20120207221403.GW8981@vsl.vm.bytemark.co.uk>
References: <20120204132019.GT8981@vsl.vm.bytemark.co.uk>
	<4F2E1E79.80207@cs.ucla.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4F2E1E79.80207@cs.ucla.edu>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1)
X-Received-From: 212.110.185.144
Cc: bug-diffutils@gnu.org
Subject: Re: [bug-diffutils] -N option doesn't work with "-" as a
	file	argument
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Feb 2012 22:14:07 -0000

On Sat, Feb 04, 2012 at 10:15:21PM -0800, Paul Eggert wrote:
> Thanks for the bug report; I installed the following patch.

Thanks for this.  Just to confirm, I've tested a diffutils with
your patch included, and it is now working as expected for my 
application wrt the -N option and "-" as a file name argument.

  best wishes, Tom Jones.


From MAILER-DAEMON Fri Feb 10 13:36:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKK-0003uI-LT
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:08 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39521)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvU-0000lA-Te
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvR-0008Mw-B7
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:04 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:53058)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvQ-0008Ma-Uj
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:01 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id D568440009;
	Thu,  9 Feb 2012 20:44:59 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id B5D9240007;
	Thu,  9 Feb 2012 20:44:58 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Thu, 09 Feb 2012 20:45:06 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Thu,  9 Feb 2012 20:44:50 +0100
Message-Id: <1328816692-12332-2-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
In-Reply-To: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
References: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:04 -0500
Subject: [bug-diffutils] [PATCH 1/3] build: use additional modules needed by
	MSVC
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2012 19:45:09 -0000

* bootstrap.conf (gnulib_modules): Add opendir, readdir, closedir,
popen and pclose modules.

Copyright-paperwork-exempt: Yes
---
 bootstrap.conf |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 9b67b74..9c27562 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -21,6 +21,7 @@ gnulib_modules='
 announce-gen
 binary-io
 c-stack
+closedir
 config-h
 diffseq
 dirname
@@ -54,8 +55,12 @@ manywarnings
 mbrtowc
 mkstemp
 mktime
+opendir
+pclose
+popen
 progname
 propername
+readdir
 readme-release
 regex
 sh-quote
-- 
1.7.5.1



From MAILER-DAEMON Fri Feb 10 13:36:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKK-0003un-Rl
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:08 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39627)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvd-0000p4-Fl
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvW-0008RI-VQ
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:13 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:59042)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvW-0008Qm-H9
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:06 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id B241440009;
	Thu,  9 Feb 2012 20:45:05 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 90A6D40007;
	Thu,  9 Feb 2012 20:45:04 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Thu, 09 Feb 2012 20:45:12 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Thu,  9 Feb 2012 20:44:52 +0100
Message-Id: <1328816692-12332-4-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
In-Reply-To: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
References: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:04 -0500
Subject: [bug-diffutils] [PATCH 3/3] portability: use raise(2) instead of
	kill(2)
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2012 19:45:18 -0000

kill(2) is not available with MSVC.

* src/sdiff.c (checksigs): Replace kill (getpid (), ...) with the
equivalent raise(...).
* bootstrap.conf (gnulib_modules): Add the raise module.

Copyright-paperwork-exempt: Yes
---
 bootstrap.conf |    1 +
 src/sdiff.c    |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 9c27562..49bd532 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -60,6 +60,7 @@ pclose
 popen
 progname
 propername
+raise
 readdir
 readme-release
 regex
diff --git a/src/sdiff.c b/src/sdiff.c
index e1bb117..8db3303 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -814,7 +814,7 @@ checksigs (void)
 
       /* Yield an exit status indicating that a signal was received.  */
       untrapsig (s);
-      kill (getpid (), s);
+      raise (s);
 
       /* That didn't work, so exit with error status.  */
       exit (EXIT_TROUBLE);
-- 
1.7.5.1



From MAILER-DAEMON Fri Feb 10 13:36:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKL-0003vH-24
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45376)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5D-0001JD-QJ
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt57-000156-VO
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:23 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:42088)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt57-00014Q-M0
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:17 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id BEFA340009
	for <bug-diffutils@gnu.org>; Fri, 10 Feb 2012 17:12:14 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id A5BD340002
	for <bug-diffutils@gnu.org>; Fri, 10 Feb 2012 17:12:13 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Fri, 10 Feb 2012 17:12:22 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Fri, 10 Feb 2012 17:12:12 +0100
Message-Id: <1328890335-12308-1-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:05 -0500
Subject: [bug-diffutils] Portability fixlets for MSVC
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 16:12:29 -0000

[Resend, last got moderated or lost or something or I'm just impatient.
 Anyway, sorry if you get this twice]

Hi!

For thrills I tried to build diffutils in MSYS with the following
configure line:

.../configure \
CC="cl -nologo" \
CFLAGS=-MD \
AR="/path/to/recent/automake/lib/ar-lib lib" \
STRIP=: \
RANLIB=:

I don't know if you (or anyone) cares about building diffutils with
MSVC, but I found a few trivial things to make that complete w/o
error and is thus sending some patches.

Cheers,
Peter

[PATCH 1/3] build: use additional modules needed by MSVC
[PATCH 2/3] portability: declare variables first in blocks
[PATCH 3/3] portability: use raise(2) instead of kill(2)


From MAILER-DAEMON Fri Feb 10 13:36:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKL-0003vm-AM
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45391)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5K-0001Q7-Jm
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5E-000163-S2
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:30 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:57525)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5E-00015w-Kc
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:24 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 0469F40009;
	Fri, 10 Feb 2012 17:12:24 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id DB7A840002;
	Fri, 10 Feb 2012 17:12:22 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Fri, 10 Feb 2012 17:12:32 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Fri, 10 Feb 2012 17:12:15 +0100
Message-Id: <1328890335-12308-4-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
In-Reply-To: <1328890335-12308-1-git-send-email-peda@lysator.liu.se>
References: <1328890335-12308-1-git-send-email-peda@lysator.liu.se>
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:05 -0500
Subject: [bug-diffutils] [PATCH 3/3] portability: use raise(2) instead of
	kill(2)
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 16:12:34 -0000

kill(2) is not available with MSVC.

* src/sdiff.c (checksigs): Replace kill (getpid (), ...) with the
equivalent raise(...).
* bootstrap.conf (gnulib_modules): Add the raise module.

Copyright-paperwork-exempt: Yes
---
 bootstrap.conf |    1 +
 src/sdiff.c    |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 9c27562..49bd532 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -60,6 +60,7 @@ pclose
 popen
 progname
 propername
+raise
 readdir
 readme-release
 regex
diff --git a/src/sdiff.c b/src/sdiff.c
index e1bb117..8db3303 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -814,7 +814,7 @@ checksigs (void)
 
       /* Yield an exit status indicating that a signal was received.  */
       untrapsig (s);
-      kill (getpid (), s);
+      raise (s);
 
       /* That didn't work, so exit with error status.  */
       exit (EXIT_TROUBLE);
-- 
1.7.5.1



From MAILER-DAEMON Fri Feb 10 13:36:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKK-0003uF-JM
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:08 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39443)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvO-0000ic-8h
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:44:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvM-0008LZ-GQ
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:44:58 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:42234)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvM-0008Kw-BF
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:44:56 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id E828940009
	for <bug-diffutils@gnu.org>; Thu,  9 Feb 2012 20:44:54 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id CF26840007
	for <bug-diffutils@gnu.org>; Thu,  9 Feb 2012 20:44:53 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Thu, 09 Feb 2012 20:45:01 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Thu,  9 Feb 2012 20:44:49 +0100
Message-Id: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:04 -0500
Subject: [bug-diffutils] Portability fixlets for MSVC
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2012 19:44:59 -0000

Hi!

For thrills I tried to build diffutils in MSYS with the following
configure line:

.../configure \
CC="cl -nologo" \
CFLAGS=-MD \
AR="/path/to/recent/automake/lib/ar-lib lib" \
STRIP=: \
RANLIB=:

I don't know if you (or anyone) cares about building diffutils with
MSVC, but I found a few trivial things to make that complete w/o
error and is thus sending some patches.

Cheers,
Peter

[PATCH 1/3] build: use additional modules needed by MSVC
[PATCH 2/3] portability: declare variables first in blocks
[PATCH 3/3] portability: use raise(2) instead of kill(2)


From MAILER-DAEMON Fri Feb 10 13:36:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKK-0003uL-NT
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:08 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39566)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvY-0000mz-NO
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvU-0008OX-1z
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:08 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:35691)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RvZvT-0008Ny-OH
	for bug-diffutils@gnu.org; Thu, 09 Feb 2012 14:45:03 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id D478B40009;
	Thu,  9 Feb 2012 20:45:02 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id B5F1740007;
	Thu,  9 Feb 2012 20:45:01 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Thu, 09 Feb 2012 20:45:09 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Thu,  9 Feb 2012 20:44:51 +0100
Message-Id: <1328816692-12332-3-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
In-Reply-To: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
References: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:04 -0500
Subject: [bug-diffutils] [PATCH 2/3] portability: declare variables first in
	blocks
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2012 19:45:12 -0000

* src/dir.c (diff_dirs): Declare 'v1' at the top of the block.
(find_dir_file_pathname): Likewise for 'p'.
* src/io.c (find_and_hash_each_line): Likewise for 'repetitions'.

Copyright-paperwork-exempt: Yes
---
 src/dir.c |   10 ++++++----
 src/io.c  |    3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/dir.c b/src/dir.c
index 57134c7..2633ed0 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -254,6 +254,7 @@ diff_dirs (struct comparison const *cmp,
 	     pretend the "next name" in that dir is very large.  */
 	  int nameorder = (!*names[0] ? 1 : !*names[1] ? -1
 			   : compare_names (*names[0], *names[1]));
+	  int v1;
 
 	  /* Prefer a file_name_cmp match if available.  This algorithm is
 	     O(N**2), where N is the number of names in a directory
@@ -289,9 +290,9 @@ diff_dirs (struct comparison const *cmp,
 		}
 	    }
 
-	  int v1 = (*handle_file) (cmp,
-				   0 < nameorder ? 0 : *names[0]++,
-				   nameorder < 0 ? 0 : *names[1]++);
+	  v1 = (*handle_file) (cmp,
+			       0 < nameorder ? 0 : *names[0]++,
+			       nameorder < 0 ? 0 : *names[1]++);
 	  if (val < v1)
 	    val = v1;
 	}
@@ -342,7 +343,8 @@ find_dir_file_pathname (char const *dir, char const *file)
 	    match = file; /* longjmp may mess up MATCH.  */
 	  else
 	    {
-	      for (char const **p = dirdata.names; *p; p++)
+	      char const **p;
+	      for (p = dirdata.names; *p; p++)
 		if (compare_names (*p, file) == 0)
 		  {
 		    if (file_name_cmp (*p, file) == 0)
diff --git a/src/io.c b/src/io.c
index 5a631a5..a522f48 100644
--- a/src/io.c
+++ b/src/io.c
@@ -260,6 +260,7 @@ find_and_hash_each_line (struct file_data *current)
 	    size_t column = 0;
 	    while ((c = *p++) != '\n')
 	      {
+	        size_t repetitions;
 		if (ig_white_space & IGNORE_TRAILING_SPACE
 		    && isspace (c))
 		  {
@@ -274,7 +275,7 @@ find_and_hash_each_line (struct file_data *current)
 		    while (isspace (c1));
 		  }
 
-		size_t repetitions = 1;
+		repetitions = 1;
 
 		if (ig_white_space & IGNORE_TAB_EXPANSION)
 		  switch (c)
-- 
1.7.5.1



From MAILER-DAEMON Fri Feb 10 13:36:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKK-0003v1-Ui
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:08 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45369)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5C-0001IK-W0
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt58-00015K-PA
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:22 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:59551)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt58-00015C-K7
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:18 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 17F2140009;
	Fri, 10 Feb 2012 17:12:18 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id F03FD40002;
	Fri, 10 Feb 2012 17:12:16 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Fri, 10 Feb 2012 17:12:26 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Fri, 10 Feb 2012 17:12:13 +0100
Message-Id: <1328890335-12308-2-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
In-Reply-To: <1328890335-12308-1-git-send-email-peda@lysator.liu.se>
References: <1328890335-12308-1-git-send-email-peda@lysator.liu.se>
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:04 -0500
Subject: [bug-diffutils] [PATCH 1/3] build: use additional modules needed by
	MSVC
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 16:12:27 -0000

* bootstrap.conf (gnulib_modules): Add opendir, readdir, closedir,
popen and pclose modules.

Copyright-paperwork-exempt: Yes
---
 bootstrap.conf |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 9b67b74..9c27562 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -21,6 +21,7 @@ gnulib_modules='
 announce-gen
 binary-io
 c-stack
+closedir
 config-h
 diffseq
 dirname
@@ -54,8 +55,12 @@ manywarnings
 mbrtowc
 mkstemp
 mktime
+opendir
+pclose
+popen
 progname
 propername
+readdir
 readme-release
 regex
 sh-quote
-- 
1.7.5.1



From MAILER-DAEMON Fri Feb 10 13:36:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvvKL-0003vU-6O
	for mharc-bug-diffutils@gnu.org; Fri, 10 Feb 2012 13:36:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45387)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5H-0001Np-HP
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5B-00015V-TH
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:27 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:49987)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rvt5B-00015Q-Nn
	for bug-diffutils@gnu.org; Fri, 10 Feb 2012 11:12:21 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 2C74840009;
	Fri, 10 Feb 2012 17:12:21 +0100 (CET)
Received: from peda-pc (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 0B84340002;
	Fri, 10 Feb 2012 17:12:20 +0100 (CET)
Received: by peda-pc (sSMTP sendmail emulation);
	Fri, 10 Feb 2012 17:12:29 +0100
From: Peter Rosin <peda@lysator.liu.se>
To: bug-diffutils@gnu.org
Date: Fri, 10 Feb 2012 17:12:14 +0100
Message-Id: <1328890335-12308-3-git-send-email-peda@lysator.liu.se>
X-Mailer: git-send-email 1.7.5.1
In-Reply-To: <1328890335-12308-1-git-send-email-peda@lysator.liu.se>
References: <1328890335-12308-1-git-send-email-peda@lysator.liu.se>
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
X-Mailman-Approved-At: Fri, 10 Feb 2012 13:36:05 -0500
Subject: [bug-diffutils] [PATCH 2/3] portability: declare variables first in
	blocks
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 16:12:31 -0000

* src/dir.c (diff_dirs): Declare 'v1' at the top of the block.
(find_dir_file_pathname): Likewise for 'p'.
* src/io.c (find_and_hash_each_line): Likewise for 'repetitions'.

Copyright-paperwork-exempt: Yes
---
 src/dir.c |   10 ++++++----
 src/io.c  |    3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/dir.c b/src/dir.c
index 57134c7..2633ed0 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -254,6 +254,7 @@ diff_dirs (struct comparison const *cmp,
 	     pretend the "next name" in that dir is very large.  */
 	  int nameorder = (!*names[0] ? 1 : !*names[1] ? -1
 			   : compare_names (*names[0], *names[1]));
+	  int v1;
 
 	  /* Prefer a file_name_cmp match if available.  This algorithm is
 	     O(N**2), where N is the number of names in a directory
@@ -289,9 +290,9 @@ diff_dirs (struct comparison const *cmp,
 		}
 	    }
 
-	  int v1 = (*handle_file) (cmp,
-				   0 < nameorder ? 0 : *names[0]++,
-				   nameorder < 0 ? 0 : *names[1]++);
+	  v1 = (*handle_file) (cmp,
+			       0 < nameorder ? 0 : *names[0]++,
+			       nameorder < 0 ? 0 : *names[1]++);
 	  if (val < v1)
 	    val = v1;
 	}
@@ -342,7 +343,8 @@ find_dir_file_pathname (char const *dir, char const *file)
 	    match = file; /* longjmp may mess up MATCH.  */
 	  else
 	    {
-	      for (char const **p = dirdata.names; *p; p++)
+	      char const **p;
+	      for (p = dirdata.names; *p; p++)
 		if (compare_names (*p, file) == 0)
 		  {
 		    if (file_name_cmp (*p, file) == 0)
diff --git a/src/io.c b/src/io.c
index 5a631a5..a522f48 100644
--- a/src/io.c
+++ b/src/io.c
@@ -260,6 +260,7 @@ find_and_hash_each_line (struct file_data *current)
 	    size_t column = 0;
 	    while ((c = *p++) != '\n')
 	      {
+	        size_t repetitions;
 		if (ig_white_space & IGNORE_TRAILING_SPACE
 		    && isspace (c))
 		  {
@@ -274,7 +275,7 @@ find_and_hash_each_line (struct file_data *current)
 		    while (isspace (c1));
 		  }
 
-		size_t repetitions = 1;
+		repetitions = 1;
 
 		if (ig_white_space & IGNORE_TAB_EXPANSION)
 		  switch (c)
-- 
1.7.5.1



From MAILER-DAEMON Sun Feb 12 13:13:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RwdvM-0003BJ-NS
	for mharc-bug-diffutils@gnu.org; Sun, 12 Feb 2012 13:13:20 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41715)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RwdvK-0003Ay-Vh
	for bug-diffutils@gnu.org; Sun, 12 Feb 2012 13:13:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RwdvJ-0000wg-QS
	for bug-diffutils@gnu.org; Sun, 12 Feb 2012 13:13:18 -0500
Received: from mx.meyering.net ([88.168.87.75]:49457)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RwdvJ-0000wb-KK
	for bug-diffutils@gnu.org; Sun, 12 Feb 2012 13:13:17 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id AE36560064;
	Sun, 12 Feb 2012 19:13:16 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: Peter Rosin <peda@lysator.liu.se>
In-Reply-To: <1328816692-12332-3-git-send-email-peda@lysator.liu.se> (Peter
	Rosin's message of "Thu, 9 Feb 2012 20:44:51 +0100")
References: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
	<1328816692-12332-3-git-send-email-peda@lysator.liu.se>
Date: Sun, 12 Feb 2012 19:13:16 +0100
Message-ID: <87lio77web.fsf@rho.meyering.net>
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-diffutils@gnu.org
Subject: Re: [bug-diffutils] [PATCH 2/3] portability: declare variables
	first in blocks
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Feb 2012 18:13:19 -0000

Peter Rosin wrote:
> * src/dir.c (diff_dirs): Declare 'v1' at the top of the block.
> (find_dir_file_pathname): Likewise for 'p'.
> * src/io.c (find_and_hash_each_line): Likewise for 'repetitions'.

Hi Peter,

I find that such patches hurt readability and maintainability and are
nearly impossible to justify these days.  If they are indeed required
for MSVC, I would prefer to maintain a separate c99-to-c89.diff patch
file that is applied (even manually) by those who need it.

I did that for coreutils for a long time, but stopped a few years ago
because so few people appeared to be using it.  There, I even had a
"make check" rule that would ensure the .diff file applied cleanly.

Would you be interested in maintaining such changes for MSVC?  If so,
please document the version of the compiler so that we will know if/when
it is likely to be no longer relevant.


From MAILER-DAEMON Sun Feb 12 16:13:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rwgjg-0000ms-OL
	for mharc-bug-diffutils@gnu.org; Sun, 12 Feb 2012 16:13:28 -0500
Received: from eggs.gnu.org ([140.186.70.92]:33061)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rwgje-0000mm-S5
	for bug-diffutils@gnu.org; Sun, 12 Feb 2012 16:13:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rwgjd-0007xn-Tz
	for bug-diffutils@gnu.org; Sun, 12 Feb 2012 16:13:26 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:49098)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rwgjd-0007xQ-Pm
	for bug-diffutils@gnu.org; Sun, 12 Feb 2012 16:13:25 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 4F0C9A60002
	for <bug-diffutils@gnu.org>; Sun, 12 Feb 2012 13:13:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id MpTBYUNXqjZI for <bug-diffutils@gnu.org>;
	Sun, 12 Feb 2012 13:13:18 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EAB7E39E8006
	for <bug-diffutils@gnu.org>; Sun, 12 Feb 2012 13:13:17 -0800 (PST)
Message-ID: <4F382B6A.9070104@cs.ucla.edu>
Date: Sun, 12 Feb 2012 13:13:14 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111229 Thunderbird/9.0
MIME-Version: 1.0
To: bug-diffutils@gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Subject: [bug-diffutils] [PATCH] sdiff: remove dependency on sigprocmask
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Feb 2012 21:13:27 -0000

I pushed this simplification.

* bootstrap.conf (gnulib_modules): Remove sigprocmask.
* src/sdiff.c (temporary_file): No need to invoke sigprocmask
here, since the signal handler merely sets a flag.
---
 bootstrap.conf |    1 -
 src/sdiff.c    |    9 ---------
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 9b67b74..55f0837 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -60,7 +60,6 @@ readme-release
 regex
 sh-quote
 signal
-sigprocmask
 stat
 stat-macros
 stat-time
diff --git a/src/sdiff.c b/src/sdiff.c
index e1bb117..ceda3db 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -1178,18 +1178,9 @@ temporary_file (void)
   char const *dir = tmpdir ? tmpdir : P_tmpdir;
   char *buf = xmalloc (strlen (dir) + 1 + 5 + 6 + 1);
   int fd;
-  int e;
-  sigset_t procmask;
-  sigset_t blocked;
   sprintf (buf, "%s/sdiffXXXXXX", dir);
-  sigemptyset (&blocked);
-  sigaddset (&blocked, SIGINT);
-  sigprocmask (SIG_BLOCK, &blocked, &procmask);
   fd = mkstemp (buf);
-  e = errno;
   if (0 <= fd)
     tmpname = buf;
-  sigprocmask (SIG_SETMASK, &procmask, 0);
-  errno = e;
   return fd;
 }
-- 
1.7.6.5



From MAILER-DAEMON Mon Feb 13 03:08:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rwqy3-0005vE-TM
	for mharc-bug-diffutils@gnu.org; Mon, 13 Feb 2012 03:08:59 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38108)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rwqy0-0005uv-PD
	for bug-diffutils@gnu.org; Mon, 13 Feb 2012 03:08:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rwqxs-0001jL-Nq
	for bug-diffutils@gnu.org; Mon, 13 Feb 2012 03:08:56 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:53147)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1Rwqxs-0001g2-Ic
	for bug-diffutils@gnu.org; Mon, 13 Feb 2012 03:08:48 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 6831F40003;
	Mon, 13 Feb 2012 09:08:45 +0100 (CET)
Received: from [192.168.0.150] (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 2E9EA40002;
	Mon, 13 Feb 2012 09:08:44 +0100 (CET)
Message-ID: <4F38C50C.9090400@lysator.liu.se>
Date: Mon, 13 Feb 2012 09:08:44 +0100
From: Peter Rosin <peda@lysator.liu.se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
References: <1328816692-12332-1-git-send-email-peda@lysator.liu.se>
	<1328816692-12332-3-git-send-email-peda@lysator.liu.se>
	<87lio77web.fsf@rho.meyering.net>
In-Reply-To: <87lio77web.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
Cc: bug-diffutils@gnu.org
Subject: Re: [bug-diffutils] [PATCH 2/3] portability: declare variables
	first in blocks
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Feb 2012 08:08:58 -0000

Jim Meyering skrev 2012-02-12 19:13:
> Peter Rosin wrote:
>> * src/dir.c (diff_dirs): Declare 'v1' at the top of the block.
>> (find_dir_file_pathname): Likewise for 'p'.
>> * src/io.c (find_and_hash_each_line): Likewise for 'repetitions'.
> 
> Hi Peter,
> 
> I find that such patches hurt readability and maintainability and are
> nearly impossible to justify these days.  If they are indeed required
> for MSVC, I would prefer to maintain a separate c99-to-c89.diff patch
> file that is applied (even manually) by those who need it.

To me, it seems easier and more maintainable to just declare these three
variables at the top of respective block, and *my* ability to read the
code is unaffected by such a tiny difference.  In order to maintain and
keep current such a patch, someone would have to identify culprits
anyway and why not just do the tiny change directly instead of moving
it out to some obscure patch file that...

Oh well, I was just passing and am not the one making decisions around
here.  I'm also not the one actually having to read the code, most of
the time anyway :-)

> I did that for coreutils for a long time, but stopped a few years ago
> because so few people appeared to be using it.  There, I even had a
> "make check" rule that would ensure the .diff file applied cleanly.
> 
> Would you be interested in maintaining such changes for MSVC?  If so,
> please document the version of the compiler so that we will know if/when
> it is likely to be no longer relevant.

I'm not really interested, I wouldn't be using the results anyway as
diff is already available in MSYS and Cygwin.  I'm not even sure what
the value is of diff as a "pure" (i.e. non-MSYS, non-Cygwin) Windows
binary is.  That limited value is also made evident by the fact that
the testsuite behaves as badly on MSYS with the MinGW gcc as it does
when compiled with MSVC.

Regarding what version of the compiler this is, it is at the time of
writing relevant to *all* versions of the MSVC compiler.  Annoying
as that is...
http://connect.microsoft.com/VisualStudio/feedback/details/485416/support-c99

Cheers,
Peter


From MAILER-DAEMON Mon Feb 20 16:36:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rzau9-0003fk-Tq
	for mharc-bug-diffutils@gnu.org; Mon, 20 Feb 2012 16:36:17 -0500
Received: from eggs.gnu.org ([140.186.70.92]:52149)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <karl@freefriends.org>) id 1RzFak-0002UK-3z
	for bug-diffutils@gnu.org; Sun, 19 Feb 2012 17:50:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <karl@freefriends.org>) id 1RzFai-0000eL-Rc
	for bug-diffutils@gnu.org; Sun, 19 Feb 2012 17:50:50 -0500
Received: from b0.f7.net ([66.148.120.132]:53776 helo=freefriends.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <karl@freefriends.org>) id 1RzFai-0000eH-Gd
	for bug-diffutils@gnu.org; Sun, 19 Feb 2012 17:50:48 -0500
X-Envelope-From: karl@freefriends.org
X-Envelope-To: <bug-diffutils@gnu.org>
Received: from freefriends.org (sls-af11p1.sea2.superbservers.com [127.0.0.1])
	by freefriends.org (8.14.4/8.14.4) with ESMTP id q1JMoiXF027454
	for <bug-diffutils@gnu.org>; Sun, 19 Feb 2012 14:50:47 -0800
Received: (from nobody@localhost)
	by freefriends.org (8.14.4/8.13.8/Submit) id q1JMoid1027453;
	Sun, 19 Feb 2012 14:50:44 -0800
Date: Sun, 19 Feb 2012 14:50:44 -0800
Message-Id: <201202192250.q1JMoid1027453@freefriends.org>
X-Authentication-Warning: freefriends.org: nobody set sender to
	karl@freefriends.org using -f
From: Andrew Pennebaker <andrew.pennebaker@gmail.com>
To: bug-diffutils@gnu.org
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 66.148.120.132
X-Mailman-Approved-At: Mon, 20 Feb 2012 16:36:14 -0500
Subject: [bug-diffutils] diff Windows installer
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Feb 2012 22:50:51 -0000

[This was sent to info-gnu; I've redirected it to bug-diffutils --karl.]

While SourceForge
<http://gnuwin32.sourceforge.net/packages/diffutils.htm>has a Windows
installer for diff tools, the installer does not add the diff
binaries to PATH. This is silly, diff utils might as well be released as
flat files.

I created an MSI installer for diff utils that automatically adds the
binaries to PATH. Enjoy.

http://www.yellosoft.us/helpers

Cheers,

Andrew Pennebaker
www.yellosoft.us


