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