1.3.15-1: Patch 2.5 converts DOS newlines to Unix newlines

Steve Chapel stevechapel@earthlink.net
Fri Nov 8 06:42:00 GMT 2002


I've run into a problem with patch converting DOS newlines into Unix
newlines.

To reproduce the problem:

Use setup.exe to set the Default Text File Type to Unix.
Save the attached files orig and new into a directory.
Type the following commands:
    diff -u orig new > diff
    patch -R < diff
Now the files orig and new should be identical, but diff shows that
every line in the files is different. The difference is that the file
new now has Unix style newlines instead of DOS style newlines.

It looks like changing the Default Text File Type to DOS will fix this
particular problem, but that causes different problems that are even
worse for me. It's okay if patch under cygwin will just work like this.
I've created a workaround for this symptom, but I'd like to fix the
underlying problem rather than just deal with the symptom if possible.

I'm using cygwin 1.3.15-1 on Windows 98 SE. The version of patch is 2.5.
Attached is the output of cygcheck -s -v -r.

-- Steve

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: orig
URL: <http://cygwin.com/pipermail/cygwin/attachments/20021108/40c56fd8/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: new
URL: <http://cygwin.com/pipermail/cygwin/attachments/20021108/40c56fd8/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20021108/40c56fd8/attachment-0002.ksh>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list