commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-243-g895a7


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-243-g895a737
Date: Fri, 25 Jan 2013 16:15:08 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  895a737b75e0e43d0cfe64533b5884855f965d5d (commit)
      from  4fec11f030399252802112f1b983cc5596e406d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=895a737b75e0e43d0cfe64533b5884855f965d5d


commit 895a737b75e0e43d0cfe64533b5884855f965d5d
Author: Mats Erik Andersson <address@hidden>
Date:   Fri Jan 25 15:06:51 2013 +0100

    libls: Use __opendir2 if present.

diff --git a/ChangeLog b/ChangeLog
index 2dca504..6fbfe0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-01-25  Mats Erik Andersson  <address@hidden>
+
+       libls: Use __opendir2() if present.
+
+       * configure.ac: Check for __opendir2, not opendir2.
+
+       * libls/fts.c (fts_build) [HAVE___OPENDIR2]:
+       Change conditional test for declaration of OFLAG.
+       Initialise OFLAG only with DTF_NODUP, and add
+       DTF_REWIND and DTF_HIDEW conditionally.
+       Remove macro opendir2.  Assign DIRP from either
+       __opendir2() or opendir().  Then test DIRP.
+
 2013-01-22  Mats Erik Andersson  <address@hidden>
 
        traceroute: Loose source routing.
diff --git a/configure.ac b/configure.ac
index 28b733b..176bc93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -743,7 +743,7 @@ AC_CHECK_FUNCS(cfsetspeed cgetent dirfd fchdir flock \
                setsid setregid setreuid setresgid setresuid setutent_r \
                sigaction sigvec strchr setproctitle tcgetattr tzset utimes \
                utime uname \
-               updwtmp updwtmpx vhangup wait3 wait4 opendir2 \
+               updwtmp updwtmpx vhangup wait3 wait4 __opendir2 \
               __rcmd_errstr __check_rhosts_file )
 
 # Variant functions for user accounting.
diff --git a/libls/fts.c b/libls/fts.c
index 35d0de4..97447fd 100644
--- a/libls/fts.c
+++ b/libls/fts.c
@@ -619,7 +619,7 @@ fts_build (register FTS *sp, int type)
   void *adjaddr;
   int cderrno, descend, len, level, maxlen, nlinks, saved_errno;
   char *cp = NULL;
-#ifdef DTF_HIDEW
+#ifdef HAVE___OPENDIR2
   int oflag;
 #endif
 
@@ -630,15 +630,24 @@ fts_build (register FTS *sp, int type)
    * Open the directory for reading.  If this fails, we're done.
    * If being called from fts_read, set the fts_info field.
    */
-#if defined HAVE_OPENDIR2 && defined DTF_HIDEW
-  if (ISSET (FTS_WHITEOUT))
-    oflag = DTF_NODUP | DTF_REWIND;
-  else
-    oflag = DTF_HIDEW | DTF_NODUP | DTF_REWIND;
-#else
-# define opendir2(path, flag) opendir(path)
-#endif
-  if ((dirp = opendir2 (cur->fts_accpath, oflag)) == NULL)
+#if defined HAVE___OPENDIR2
+  oflag = DTF_NODUP;
+
+# ifdef DTF_REWIND
+  oflag |= DTF_REWIND;
+# endif
+
+# ifdef DTF_HIDEW
+  if (!ISSET (FTS_WHITEOUT))
+    oflag |= DTF_HIDEW;
+# endif /* DTF_HIDEW */
+
+  dirp = __opendir2 (cur->fts_accpath, oflag);
+#else /* !HAVE___OPENDIR2 */
+  dirp = opendir (cur->fts_accpath);
+#endif /* !HAVE___OPENDIR2 */
+
+  if (dirp == NULL)
     {
       if (type == BREAD)
        {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |   13 +++++++++++++
 configure.ac |    2 +-
 libls/fts.c  |   29 +++++++++++++++++++----------
 3 files changed, 33 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]