delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/05/12/20:06:43

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX1+EM6MNaE6Ej4oKx7q0TOOj/k+zGQo4fm5cTTH/7Z
BoDXPJ5bNMJeEQ
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
To: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: ANNOUNCE: release 2 of the DJGPP port of GNU Diffutils 3.2 uploaded.
Date: Sun, 13 May 2012 02:06:26 +0200
User-Agent: KMail/1.9.10
Cc: djgpp AT delorie DOT com
References: <201205091655 DOT q49GtEVE018228 AT delorie DOT com> <83ehqpxusw DOT fsf AT gnu DOT org>
In-Reply-To: <83ehqpxusw.fsf@gnu.org>
MIME-Version: 1.0
Message-Id: <201205130206.27461.juan.guerrero@gmx.de>
X-Y-GMX-Trusted: 0

Am Samstag, 12. Mai 2012 schrieb Eli Zaretskii:
> > From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
> > Date: Wed, 9 May 2012 18:41:36 +0200
> > 
> > This is release 2 of the port of GNU Diffutils version 3.2 to MSDOS/DJGPP.
> > 
> >   Diffutils are a collection of programs for finding differences
> >   between files:
> > 
> >     * diff  -- displays differences between 2 files line by line;
> > 
> >     * diff3 -- displays differences between 3 files (usually, 2 files
> >                and their common ancestor);
> > 
> >     * sdiff -- displays differences between 2 files side by side, and
> >                allows to merge between them interactively;
> > 
> >     * cmp   -- displays differences between 2 binary files byte by byte.
> > 
> >   The documentation of the package includes, in addition to the four
> >   programs mentioned above, also the manual for the Patch utility.
> 
> I think I found another problem in the ported Diff program.  The
> upstream maintainer removed the portions of the code in io.c that
> switched file I/O from text to binary mode and back.  See the 2 FIXME
> comments there.  The result is that files are read in text mode
> (unless Diff is invoked with the --binary switch), which stops at the
> first ^Z character.  So if the first null byte in the file is beyond
> ^Z, Diff will not know that the file is binary, and produce incorrect
> results (e.g. tell that the files are identical when they really
> aren't).  I see nothing in djgpp/diffs that would countermand this
> problem.

Really disappointing that they remove code required by other targets.  Anyway
I have reverted the current code state to the previous one using the patch you
submitted in:
  <http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00187.html>
I have followed the thread; no matter what they gnulib maintainers decide,
I think the patch is OK and I will use it to fix this version of diffutils.
It does the right think.


> The easiest fix is to restore the code that was removed (modulo some
> trivial changes due to use of SET_BINARY instead of set_binary_mode).

I have tested with gdb that files containing "binary" data like 0, 1, 2, etc.
beyond a ^Z but not before a ^Z really are identified and read as binary files
when the --binary switch has been omitted.
Sorry but I have found no reference to set_binary_mode, am I missing something
here?  Could you please clarify?
Anyway I will upload a new release tomorrow fixing this issue and I will follow
this thread at bug-gnulib.  Thanks for calling my attention to the issue.

Regards,
Juan M. Guerrero

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019