problem with 'patch' version 2.7.1-1 in Apache OpenOffice build under Windows

Andrey Repin
Mon Jul 29 18:21:00 GMT 2013

Greetings, Oliver-Rainer Wittmann!

> I am Oliver-Rainer Wittmann, a software developer working on Apache
> OpenOffice.
> I am not subscribed to this mailing cygwin at cygwin dot com. Thus, 
> please include my mail address in your replies - Thx in advance.

When you're posting to a mailing list, you're expected to read the reply from
a list. Please, don't make a problem for other people out of your personal
Yes, I can set up my mailer to send a copy of my reply to a list, but other
people may not have such luxury, and will be forced to do manual work to
manage message destination, if their mail client allow such fiddling at all.

> I just want to inform you that version 2.7.1-1 of 'patch' breaks the
> current Apache OpenOffice build under Windows.
> It is caused by the fact that a non-CRLF patch could not be applied to a 
> CRLF file.

It was a deliberate change to prevent potential damage that could be caused by
such patching.
If you sure want to patch such a file, you can always run d2u on both files to
convert them to consistent line endings. And your source files SHOULD be all
with the same line endings, unless there's a special requirements for it.
(I.e. windows batch files do not work well with LF endings, but then, a patch
file WILL have same endings. Else it just won't work at all.)

> I have seen that this has been already reported on this list - see 
> thread [Bug with Cygwin's 'quilt' is actually in 'patch']

> As Apache OpenOffice is built on different platforms (Windows, MacOS, 
> Linux, ...) and developers are working on different platforms it can 
> happen that patches and files got different line endings. Thus, Apache 
> OpenOffice is hit by the change in new cygwin 'patch'.

Patch file may have any line endings. As long as they are consistent, this is
not an issue.
But this should not be a case for source files, which all SHOULD
have consistent line endings. 

> Question:
> Is it still possible to change the line ending of a certain line in a 
> file from CRLF to non-CRLF with 'patch' version 2.7.1-1?

d2u filename
will strip CR's from a file. Even erratic ones.

Andrey Repin ( 29.07.2013, <18:59>

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list