summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-06-28 22:21:48 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-06-28 22:21:48 +0000
commit0b24b840446f8a8427052816017e36f75f476810 (patch)
treedf071c087b9d926183f235cc96ded9a66a5119a0 /src
parent3eaec256b7b0c02ac732d71ec4a18929024b56db (diff)
downloadcoreutils-0b24b840446f8a8427052816017e36f75f476810.tar.xz
* src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c2
-rw-r--r--src/pwd.c2
-rw-r--r--src/remove.c8
-rw-r--r--src/system.h7
4 files changed, 6 insertions, 13 deletions
diff --git a/src/ls.c b/src/ls.c
index b2a74c8a1..2e9159430 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -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. */
diff --git a/src/pwd.c b/src/pwd.c
index 3a7ff5aac..235d53a17 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -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