Mail Archives: djgpp/1997/10/30/07:21:45
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 -