coreutils
[Top][All Lists]
Advanced

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

[coreutils] [PATCH] maint: update to latest gnulib


From: Eric Blake
Subject: [coreutils] [PATCH] maint: update to latest gnulib
Date: Thu, 16 Sep 2010 17:43:11 -0600

* gnulib: Update to latest.
* bootstrap.conf (gnulib_modules): Add fdutimensat.
* src/touch.c (touch): Use fdutimensat instead of gl_futimens.
---

In light of Paul's desire to use fdutimensat in tar, this is
the matching change to get coreutils to use it.  Okay to apply?

 bootstrap.conf |    1 +
 gnulib         |    2 +-
 src/touch.c    |    5 +++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index a0004ac..77a209b 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -86,6 +86,7 @@ gnulib_modules="
   fcntl
   fcntl-safer
   fdl
+  fdutimensat
   file-type
   fileblocks
   filemode
diff --git a/gnulib b/gnulib
index 583c47d..9ea0943 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 583c47de09e3fb912baa00ddd405ab66fdad433c
+Subproject commit 9ea0943bfd68afa3412a139fa1a29d9b6c046916
diff --git a/src/touch.c b/src/touch.c
index e5224a4..290f743 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -163,8 +163,9 @@ touch (const char *file)
       t = NULL;
     }

-  ok = ((no_dereference && fd == -1) ? lutimens (file, t)
-        : gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t)) == 0;
+  ok = (fdutimensat (AT_FDCWD, (fd == STDOUT_FILENO ? NULL : file), fd, t,
+                     (no_dereference && fd == -1) ? AT_SYMLINK_NOFOLLOW : 0)
+        == 0);

   if (fd == STDIN_FILENO)
     {
-- 
1.7.2.3




reply via email to

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