(resending, this time omitting the large patch with the .po file changes) I noticed today I had not done this. Sorry!
I needed to add an extra few patches to: - update the version of gnulib and fix a dependency problem - fix the declaration of run_in_dir - temporarily move a pre-existing local change to make the patch easier to apply I have attached the additional changes I made. They're all pushed to the git repository already. Thanks again! James.
From a1ea1e50ff39895b40dd266347cec5641589558e Mon Sep 17 00:00:00 2001 From: James Youngman <[email protected]> Date: Sat, 2 Apr 2011 13:58:51 +0100 Subject: [PATCH 01/10] Temporarily omit ChangeLog entry for easier backport patch application To: [email protected] --- ChangeLog | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f043c20..3c9f62e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,3 @@ -2011-04-02 James Youngman <[email protected]> - - * lib/dircallback.c: Include dircallback.h instead of the - nonexistent lstat.h. - 2010-04-06 James Youngman <[email protected]> * po/nl.po: Updated Dutch translation. -- 1.7.2.5
From 3be27f15803aac22d3ca20b05df89f4ee804ee33 Mon Sep 17 00:00:00 2001 From: James Youngman <[email protected]> Date: Sat, 2 Apr 2011 14:05:14 +0100 Subject: [PATCH 04/10] Fix declaration of run_in_dir To: [email protected] --- lib/dircallback.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/dircallback.h b/lib/dircallback.h index 3234113..50eaf7a 100644 --- a/lib/dircallback.h +++ b/lib/dircallback.h @@ -22,6 +22,7 @@ struct saved_cwd; int run_in_dirfd (int fd, int (*callback)(void*), void *usercontext); -int run_in_dir (struct saved_cwd*, int (*callback)(void*), void *usercontext); +int run_in_dir (const struct saved_cwd*, int (*callback)(void*), + void *usercontext); #endif -- 1.7.2.5
From db0b6d3c80bbedfa656f0565304fbb0a360c759a Mon Sep 17 00:00:00 2001 From: James Youngman <[email protected]> Date: Sat, 2 Apr 2011 14:10:12 +0100 Subject: [PATCH 07/10] Remove duplicate definition of mdir_name() To: [email protected] --- find/pred.c | 33 --------------------------------- 1 files changed, 0 insertions(+), 33 deletions(-) diff --git a/find/pred.c b/find/pred.c index d98c4dc..2f61499 100644 --- a/find/pred.c +++ b/find/pred.c @@ -501,39 +501,6 @@ pred_empty (const char *pathname, struct stat *stat_buf, struct predicate *pred_ } -/* In general, we can't use the builtin `dirname' function if available, - since it has different meanings in different environments. - In some environments the builtin `dirname' modifies its argument. - - Return the leading directories part of FILE, allocated with malloc. - Works properly even if there are trailing slashes (by effectively - ignoring them). Return NULL on failure. - - If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); - lstat (base_name (FILE)); } will access the same file. Likewise, - if the sequence { chdir (dir_name (FILE)); - rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE - to "foo" in the same directory FILE was in. */ - -static char * -mdir_name (char const *file) -{ - size_t length = dir_len (file); - bool append_dot = (length == 0 - || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE - && length == FILE_SYSTEM_PREFIX_LEN (file) - && file[2] != '\0' && ! ISSLASH (file[2]))); - char *dir = malloc (length + append_dot + 1); - if (!dir) - return NULL; - memcpy (dir, file, length); - if (append_dot) - dir[length++] = '.'; - dir[length] = '\0'; - return dir; -} - - /* Initialise exec->wd_for_exec. We save in exec->wd_for_exec the directory whose path relative to -- 1.7.2.5
From 7af0e9d1cf688949c3aab8512307e9aece9a706d Mon Sep 17 00:00:00 2001 From: James Youngman <[email protected]> Date: Sat, 2 Apr 2011 14:14:25 +0100 Subject: [PATCH 09/10] Reinstate temporarily-removed ChangeLog entry. To: [email protected] --- ChangeLog | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0143974..437f103 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-04-02 James Youngman <[email protected]> + + * lib/dircallback.c: Include dircallback.h instead of the + nonexistent lstat.h. + 2010-04-11 James Youngman <[email protected]> Add a test case for Savannah bug 27563 (-L breaks -execdir). -- 1.7.2.5
