diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-06-28 22:21:48 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-06-28 22:21:48 +0000 |
commit | 0b24b840446f8a8427052816017e36f75f476810 (patch) | |
tree | df071c087b9d926183f235cc96ded9a66a5119a0 | |
parent | 3eaec256b7b0c02ac732d71ec4a18929024b56db (diff) | |
download | coreutils-0b24b840446f8a8427052816017e36f75f476810.tar.xz |
* src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/ls.c | 2 | ||||
-rw-r--r-- | src/pwd.c | 2 | ||||
-rw-r--r-- | src/remove.c | 8 | ||||
-rw-r--r-- | src/system.h | 7 |
5 files changed, 11 insertions, 13 deletions
@@ -1,3 +1,8 @@ +2006-06-28 Paul Eggert <eggert@cs.ucla.edu> + + * src/system.h (CLOSEDIR): Remove. All uses changed to closedir. + Autoconf 2.60 says this stuff was obsolete. + 2006-06-28 Jim Meyering <jim@meyering.net> * src/c99-to-c89.diff: Regenerate, to remove fuzz. @@ -2377,7 +2377,7 @@ print_dir (char const *name, char const *realname, bool command_line_arg) break; } - if (CLOSEDIR (dirp) != 0) + if (closedir (dirp) != 0) { file_failure (command_line_arg, _("closing directory %s"), name); /* Don't return; print whatever we got. */ @@ -216,7 +216,7 @@ find_dir_entry (struct stat *dot_sb, struct file_name *file_name, } } - if (dirp == NULL || CLOSEDIR (dirp) != 0) + if (dirp == NULL || closedir (dirp) != 0) { /* Note that this diagnostic serves for both readdir and closedir failures. */ diff --git a/src/remove.c b/src/remove.c index 4ee59cec3..a219955bc 100644 --- a/src/remove.c +++ b/src/remove.c @@ -423,7 +423,7 @@ AD_pop_and_chdir (DIR **dirp, Dirstack_state *ds, char **prev_dir) { struct stat sb; int fd = openat (dirfd (*dirp), "..", O_RDONLY); - if (CLOSEDIR (*dirp) != 0) + if (closedir (*dirp) != 0) { error (0, errno, _("FATAL: failed to close directory %s"), quote (full_filename (*prev_dir))); @@ -474,7 +474,7 @@ AD_pop_and_chdir (DIR **dirp, Dirstack_state *ds, char **prev_dir) } else { - if (CLOSEDIR (*dirp) != 0) + if (closedir (*dirp) != 0) { error (0, errno, _("FATAL: failed to close directory %s"), quote (full_filename (*prev_dir))); @@ -1162,7 +1162,7 @@ The following directory is part of the cycle:\n %s\n"), } *subdir = xstrdup (f); - if (CLOSEDIR (*dirp) != 0) + if (closedir (*dirp) != 0) { error (0, 0, _("failed to close directory %s"), quote (full_filename ("."))); @@ -1337,7 +1337,7 @@ remove_dir (int fd_cwd, Dirstack_state *ds, char const *dir, AD_stack_pop (ds); closedir_and_return:; - if (dirp != NULL && CLOSEDIR (dirp) != 0) + if (dirp != NULL && closedir (dirp) != 0) { error (0, 0, _("failed to close directory %s"), quote (full_filename ("."))); diff --git a/src/system.h b/src/system.h index ab4826682..7ddbd7dbe 100644 --- a/src/system.h +++ b/src/system.h @@ -241,13 +241,6 @@ initialize_exit_failure (int status) # endif /* HAVE_NDIR_H */ #endif /* HAVE_DIRENT_H */ -#if CLOSEDIR_VOID -/* Fake a return value. */ -# define CLOSEDIR(d) (closedir (d), 0) -#else -# define CLOSEDIR(d) closedir (d) -#endif - enum { NOT_AN_INODE_NUMBER = 0 |