From: dumser AT ti DOT com (James Dumser) Subject: Re: patch problem 29 Jan 1997 10:53:32 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199701291739.LAA18445.cygnus.gnu-win32@lesol1.dseg.ti.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=%#%record%#% Original-To: gunther DOT ebert AT ixos-leipzig DOT de (Gunther Ebert) Original-Cc: gnu-win32 AT cygnus DOT com In-Reply-To: <32EF1152.178@ixos-leipzig.de> from "Gunther Ebert" at Jan 29, 97 09:58:58 am X-MIMI-Options: headers none X-Mailer: ELM [version 2.4 PL23] Content-Length: 2773 Original-Sender: owner-gnu-win32 AT cygnus DOT com --%#%record%#% Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1655 On Wed, 29 Jan 1997 09:58:58 +0100, Gunther Ebert wrote: >Ryan M. Hager wrote: >> I am trying apply a .diff file and it is failing. It is the >> X11R6.1-cygwin.diff.gz. When I am in Windows 95 it only tries to apply the >> first 3 changes. WHen I am in Linux ( tried to see what it would do) it >> goes through all the files and tries to do the changes, the changing fails. >> I wish to do the patch in win 95, And I believe the patch program is >> failing, how do I make sure this is the case? > >I can confirm the strange patch behaviour. It doesn't matter if the >files are in UNIX or NT text mode, patch always failed to apply some diffs. In the past I've had problems with patch; however, it works correctly for me now. The problems are 1. The b17.1 rename() in cygwin.dll does not use the correct return codes. Geoffrey has investigated this and posted a patch to correct the problem, but you'll have to wait until the next release or rebuild cygwin.dll yourself. 2. Both the patch and the file need to be the same "mode" (text/binary). (Note: if you generate a diff based on text mode files, the diff will be mixed -- the chunk headers will be binary, but the chunks themselves will have CRs.) Someone recently pointed out you can use -l (or --ignore-whitespace) to have patch work even if the diff is not the same mode as the file; although I have not personally tried this. The way I "fixed" #1 was to recompile patch with the included rename.c; this avoids using the broken rename in cygwin.dll. I've included a patch that you can apply after running configure. --%#%record%#% Content-Type: text/plain Content-Name: patch-2.1.local.diff Content-Length: 718 --- Makefile.generated Mon Dec 16 12:46:45 1996 +++ Makefile Mon Dec 16 12:44:43 1996 @@ -34,7 +34,7 @@ SRCS = backupfile.c getopt.c getopt1.c inp.c patch.c pch.c util.c \ version.c rename.c alloca.c OBJS = backupfile.o getopt.o getopt1.o inp.o patch.o pch.o util.o \ - version.o + version.o rename.o HDRS = EXTERN.h INTERN.h backupfile.h common.h getopt.h \ inp.h patchlevel.h pch.h util.h version.h MISC = COPYING ChangeLog INSTALL Makefile.in README NEWS \ @@ -50,7 +50,7 @@ $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ install: all - $(INSTALL_PROGRAM) patch $(bindir)/patch + $(INSTALL_PROGRAM) patch.exe $(bindir)/patch.exe -$(INSTALL_DATA) $(srcdir)/patch.man $(mandir)/patch.$(manext) uninstall: --%#%record%#% Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 66 -- James Dumser 972-462-5335 dumser AT ti DOT com --%#%record%#%-- - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".