A contributor to Ubuntu supplied a patch to fix this problem. I have
tested the patch and it appears to work, and I have also reviewed the
patch and satisfied myself that it doesn't make any difference if
--ignore-file-name-case is _not_ used, so that it doesn't make the
program fail when it previously worked. I'm therefore applying this
patch to ubuntu's version of diffutils, which is now 2.8.1-11ubuntu1.
I haven't reviewed the patch in any more detail.
I see that Debian's pool contains 2.8.7 which the discussion appears
to say fixed the problem; I haven't tested that either. But, in any
case, I thought I should bring my Ubuntu diffutils activities to your
attention.
Regards,
Ian.
diff -u diffutils-2.8.1/debian/changelog diffutils-2.8.1/debian/changelog
--- diffutils-2.8.1/debian/changelog
+++ diffutils-2.8.1/debian/changelog
@@ -1,3 +1,10 @@
+diffutils (2.8.1-11ubuntu1) breezy; urgency=low
+
+ * Applied patch to make --ignore-file-name-case work.
+ (Ubuntu 7291, Debian #300258.)
+
+ -- Ian Jackson <[EMAIL PROTECTED]> Tue, 20 Sep 2005 16:39:41 +0100
+
diffutils (2.8.1-11) unstable; urgency=low
* Changed default value of _POSIX2_VERSION in lib/posixver.c to
only in patch2:
unchanged:
--- diffutils-2.8.1.orig/src/system.h
+++ diffutils-2.8.1/src/system.h
@@ -237,6 +237,13 @@
void *memchr ();
# endif
#endif
+#if ! HAVE_STRCASECOLL
+# if HAVE_STRICOLL || defined stricoll
+# define strcasecoll(a, b) stricoll (a, b)
+# else
+# define strcasecoll(a, b) strcasecmp (a, b) /* best we can do */
+# endif
+#endif
#if HAVE_LOCALE_H
# include <locale.h>
only in patch2:
unchanged:
--- diffutils-2.8.1.orig/src/dir.c
+++ diffutils-2.8.1/src/dir.c
@@ -1,7 +1,7 @@
/* Read, sort and compare two directories. Used for GNU DIFF.
- Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1998, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1998, 2001, 2002,
+ 2004 Free Software Foundation, Inc.
This file is part of GNU DIFF.
@@ -145,29 +145,26 @@
static int
compare_names (char const *name1, char const *name2)
{
- if (ignore_file_name_case)
- {
- int r = strcasecmp (name1, name2);
- if (r)
- return r;
- }
-
if (locale_specific_sorting)
{
int r;
errno = 0;
- r = strcoll (name1, name2);
+ if (ignore_file_name_case)
+ r = strcasecoll (name1, name2);
+ else
+ r = strcoll (name1, name2);
if (errno)
{
error (0, errno, _("cannot compare file names `%s' and `%s'"),
name1, name2);
longjmp (failed_strcoll, 1);
}
- if (r)
- return r;
+ return r;
}
- return file_name_cmp (name1, name2);
+ return (ignore_file_name_case
+ ? strcasecmp (name1, name2)
+ : file_name_cmp (name1, name2));
}
/* A wrapper for compare_names suitable as an argument for qsort. */
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]