summaryrefslogtreecommitdiff
path: root/doc/posix-functions/utimensat.texi
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-10-20 16:47:36 -0600
committerEric Blake <ebb9@byu.net>2009-10-20 21:21:52 -0600
commit8c871c07bc6a6bd7f4112053863833020569b272 (patch)
tree203e1334be1d12b52b68c1706f40e310423f850d /doc/posix-functions/utimensat.texi
parent06b8c126a964a60ad353cc4f7b296060ae5c9df4 (diff)
downloadgnulib-8c871c07bc6a6bd7f4112053863833020569b272.tar.gz
utimensat: work around Solaris 9 bug
utimes("file/",times) mistakenly succeeds. This commit doesn't fix utimes, but does make utimensat be careful before calling utimes. The test is now enhanced to test trailing slashes and directories. Meanwhile, cygwin 1.5 stat() on a directory changes atime (it does a readdir under the hood to populate st_nlink), so only mtime of a directory is reliable enough for testing. Cygwin 1.7 no longer has this problem, because it no longer wastes time on st_nlink. * lib/utimens.c (fdutimens, lutimens): Force a stat if platform has trailing slash bugs. * tests/test-lutimens.h (test_lutimens): Enhance test. * tests/test-utimens.h (test_utimens): Likewise. * doc/posix-functions/utime.texi (utime): Document the bug. * doc/posix-functions/utimes.texi (utimes): Likewise. * doc/posix-functions/utimensat.texi (utimensat): Likewise. * doc/glibc-functions/futimesat.texi (futimesat): Likewise. * doc/glibc-functions/lutimes.texi (lutimes): Mention utimens. * doc/posix-functions/futimens.texi (futimens): Mention limitation. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'doc/posix-functions/utimensat.texi')
-rw-r--r--doc/posix-functions/utimensat.texi11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/posix-functions/utimensat.texi b/doc/posix-functions/utimensat.texi
index 7164965d66..67f50785ac 100644
--- a/doc/posix-functions/utimensat.texi
+++ b/doc/posix-functions/utimensat.texi
@@ -13,6 +13,10 @@ This function is missing on some platforms:
glibc 2.3.6, MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX
5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw,
Interix 3.5, BeOS.
+However, the replacement function may end up truncating timestamps to
+less resolution than supported by the file system. Furthermore, the
+replacement function is not safe to be used in libraries and is not
+multithread-safe.
@item
This function returns a bogus value instead of failing with
@code{ENOSYS} on some platforms:
@@ -35,6 +39,11 @@ The mere act of using @code{lstat} modifies the access time of
symlinks on some platforms, so @code{utimensat} with
@code{AT_SYMLINK_NOFOLLOW} can only effectively change modification time:
Cygwin.
+@item
+The mere act of using @code{stat} modifies the access time of
+directories on some platforms, so @code{utimensat} can only
+effectively change directory modification time:
+Cygwin 1.5.x.
@end itemize
-The gnulib module utimens provides a similar interface.
+The gnulib module fdutimensat provides a similar interface.