* src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jun 2006 22:21:48 +0000 (22:21 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jun 2006 22:21:48 +0000 (22:21 +0000)
ChangeLog
src/ls.c
src/pwd.c
src/remove.c
src/system.h

index 7d46e2c..1443ff7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index b2a74c8..2e91594 100644 (file)
--- 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.  */
index 3a7ff5a..235d53a 100644 (file)
--- 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.  */
index 4ee59ce..a219955 100644 (file)
@@ -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 (".")));
index ab48266..7ddbd7d 100644 (file)
@@ -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