724c6cbb2681f48fe797878f3b4e8bbb38df38f9
[gnulib.git] / doc / posix-functions / futimens.texi
1 @node futimens
2 @section @code{futimens}
3 @findex futimens
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/futimens.html}
6
7 Gnulib module: futimens
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function is missing on some platforms:
13 glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX
14 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw,
15 Interix 3.5, BeOS.
16 However, the replacement function may end up truncating timestamps to
17 less resolution than supported by the file system.
18 @item
19 This function returns a bogus value instead of failing with
20 @code{ENOSYS} on some platforms:
21 Linux kernel 2.6.21.
22 @item
23 When using @code{UTIME_OMIT} or @code{UTIME_NOW}, some systems require
24 the @code{tv_sec} argument to be 0, and don't necessarily handle all
25 file permissions in the manner required by POSIX:
26 Linux kernel 2.6.25.
27 @item
28 When using @code{UTIME_OMIT} for the modification time, but specifying
29 an access time, some systems fail to update the change time:
30 Linux kernel 2.6.32.
31 @item
32 Passing @code{AT_FDCWD} as the fd argument does not properly fail with
33 @code{EBADF} on some systems:
34 glibc 2.11, Solaris 11.
35 @end itemize
36
37 Portability problems not fixed by Gnulib:
38 @itemize
39 @item
40 Some platforms lack the ability to change the timestamps of a file
41 descriptor, so the replacement can fail with @code{ENOSYS}; the gnulib
42 module @samp{utimens} provides a more reliable interface @code{fdutimens}.
43 @item
44 The mere act of using @code{stat} modifies the access time of
45 directories on some platforms, so @code{utimensat} can only
46 effectively change directory modification time:
47 Cygwin 1.5.x.
48 @end itemize