On IRIX (and, indeed, any platform without strnlen() or strndup()), patch-2.6.1 fails with: cc-1196 cc: WARNING File = gl/lib/strndup.c, Line = 33 The indicated function is declared implicitly. size_t len = strnlen (s, n); ^ cc-1196 cc: WARNING File = gl/lib/xstrndup.c, Line = 36 The indicated function is declared implicitly. char *s = strndup (string, n); ^ cc-1140 cc: ERROR File = gl/lib/xstrndup.c, Line = 36 A value of type "int" cannot be used to initialize an entity of type "char *". char *s = strndup (string, n); ^ 1 error detected in the compilation of "gl/lib/xstrndup.c". make: *** [gl/lib/xstrndup.o] Error 2 ... because config.h says that HAVE_DECL_STRNDUP and HAVE_DECL_STRNLEN should be set to '0' or '1' depending on whether the function is available, but then the code checks to see whether HAVE_DECL_STRNDUP and HAVE_DECL_STRNLEN are defined - which will always be the case. patch-2.6.1 als runs into the infamous MIPSpro error: cc-1999 cc: ERROR File = src/bestmatch.h, Line = 135 "jumping out of a block containing VLAs" is not currently implemented 1 error detected in the compilation of "src/merge.c". ... but the code (in a header file?) which does this appears to be entirely superfluous: a for block containing only a 'continue' instruction. Removing this allows patch to compile and also pass all of its test-suite.
Created attachment 216514 [details, diff] Fix logical errors in patch-2.6.1
After reporting, upstream state both problems fixed in this source: ftp://alpha.gnu.org/gnu/patch/patch-2.6.1-9-gf376c5d.tar.gz
do you have a bug reference for me?
Not as-such, I'm afraid - it was solved via mailing-list. Here's the link: http://lists.gnu.org/archive/html/bug-patch/2010-01/msg00009.html
Not sure why this why assigned to alt@
http://git.savannah.gnu.org/gitweb/?p=patch.git;a=summary Most of the time/blocker here is to fetch the patches, and make them apply to the sources. Anyway, committed now.