delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/30/07:21:45

Date: Thu, 30 Oct 1997 14:20:44 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Allegro WIP diffs don't work
In-Reply-To: <YRYVgRACMkV0EwCY@talula.demon.co.uk>
Message-ID: <Pine.SUN.3.91.971030141308.2104A-100000@is>
MIME-Version: 1.0

On Tue, 28 Oct 1997, Shawn Hargreaves wrote:

> Indeed they are not: the diff command I used seems to have just skipped
> these binary files. I'm no expert on using diff: is there any easy way
> to make it work with these?

I don't really understand the problem, and I haven't patched Allegro 
myself, so the following might be not exactly to the point.  In that 
case, please explain more.

To patch binary files, you need to produce the patch with the -a and
--binary switches to GNU Diff, and apply the patch using the --binary
switch to GNU `patch'.  Only 2.4 and later versions of `patch' support
--binary (I actually tested this by patching binary executables, and it
worked), so you will need the latest DJGPP ports of `patch' (`patch' 2.1 
will NOT work). 

For example:

		diff -c -a --binary foo.old foo.dat > foo.dif
		patch -p0 --backup --binary < foo.dif

- Raw text -


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