poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / openat.texi
blob96b99f3e9511ce19f60ccb9badc9195cb69b1162
1 @node openat
2 @section @code{openat}
3 @findex openat
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/openat.html}
7 Gnulib module: openat
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function is missing on some platforms:
13 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
14 AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin 1.5.x, mingw, MSVC 14.
15 But the replacement function is not safe to be used in libraries and is not multithread-safe.
16 @item
17 Some platforms do not support @code{O_CLOEXEC}:
18 AIX 7.1, Solaris 10.
19 @item
20 On platforms where @code{off_t} is a 32-bit type, @code{open} may not work
21 correctly with files larger than 2 GB@.  (Cf. @code{AC_SYS_LARGEFILE}.)
22 @item
23 This function does not fail when the file name argument ends in a slash
24 and (without the slash) names a nonexistent file or a file that is not a
25 directory, on some platforms:
26 Solaris 9.
27 @end itemize
29 Portability problems not fixed by Gnulib:
30 @itemize
31 @item
32 The Gnulib replacement for @code{O_CLOEXEC} is not atomic, and so is
33 not safe in the presence of multiple threads or signal handlers.
34 @item
35 @code{openat (fd, "symlink", O_NOFOLLOW ...)} fails with @code{errno}
36 set to @code{EMLINK} instead of the POSIX-required @code{ELOOP} on
37 some platforms:
38 FreeBSD 10.1.
39 @item
40 @code{openat (fd, "symlink", O_NOFOLLOW ...)} fails with @code{errno}
41 set to @code{EFTYPE} instead of the POSIX-required @code{ELOOP} on
42 some platforms:
43 NetBSD 6.1.
44 @end itemize