Subject: How to resolve hiccups by patch program?
From: Markus Elfring <[email-masked]>
To: [email-masked], [email-masked]
Cc: "Christopher R. Gabriel" <[email-masked]>, Paul Eggert <[email-masked]>
Date: Mon, 08 Jan 2007 11:57:33 +0100
List-Id: <cygwin.cygwin.com>

Hello,

I published the file "const4.patch" (http://bugs.digium.com/file_download.php?file_id=12617&type=bug) to fix something for the issue "Improve const-correctness" (http://bugs.digium.com/view.php?id=8160). Unfortunately, some errors were reported for this patch file. There are parts that are acceptable as it can be seen from the log "bug 8160 const4 patch results.txt". So I extracted a conflicting part by the splitdiff command.

I've got this annoying issue with the tool (version 2.5.9):
$ patch -r test8160.rej app_db.c const4.patch.part010
patching file app_db.c
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file test8160.rej

Why are the appropriate places for the intended updates not found in the source code?
Do I overlook anything from the specified rules that results into the unexpected mismatch?
http://opengroup.org/onlinepubs/007908799/xcu/patch.html#tag_001_014_1662_003

I assume that I am not affected by wrong line endings as it was suggested for the topic 'Is "Patch" broken?'.
http://sourceware.org/ml/cygwin/2004-04/msg00334.html

Is the conclusion from the topic "Where is patch?" relevant in my case?
http://sourceware.org/ml/cygwin/2005-12/msg00678.html

Would you like to share your ideas in other discussions?
http://thread.gmane.org/gmane.comp.version-control.subversion.tortoisesvn.user/5180/focus=5180
http://sources.redhat.com/ml/patchutils-list/2007-q1/index.html#00000

Regards,
Markus