Where is patch?

Lennart Borgman lennart.borgman.073@student.lu.se
Wed Dec 14 20:39:00 GMT 2005

René Berber wrote:

>Lennart Borgman wrote:
>>I am having trouble with patch. My Cygwin patch (and my GnuWin32 patch)
>>says it is version 2.5.9. But where is the sources for this? I looked at
>>ftp://ftp.gnu.org/gnu/patch and they only have version 2.5.4. How can
>>that be?
>The latest GNU patch version compiles out of the box and it works better than
>the one distributed with Cygwin.  By "works better" I mean that Cygwin's patch
>sometimes fail when GNU patch works perfect.
That is interesting. However my problem is with line endings. It turned 
out that the file to patch has CR-LF line endings (which is ok) and the 
patch file had LF line endings. This surprised me, I did not notice it 
first. In my opinion it should not have had that. It came from 
Thunderbird on MS Windows and I just pasted into a new file in Emacs. 
Then Emacs made the decision to save the file with LF line endings.

There are two things I would like here:

*** For patch: I would like it to discover that the line ending type of 
the patch file and the file to patch differ. I would then like patch to 
convert the line endings in the patch read from the patch file to that 
kind used in the file to patch. (It should not change the patch file of 
course.) That would be enough to solve my problem. However I would like 
such functionality to go into the main patch distribution if possible. 
That would save work I hope.

*** For Emacs: I would like the default on MS Windows to be CR-LF line 
endings. That would in my opinion be less surpricing for an MS Windows user.

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list