poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / lstat.texi
blob1a1ffb448e04ea1674c7c8d653590aa5ba5096a1
1 @node lstat
2 @section @code{lstat}
3 @findex lstat
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html}
7 Gnulib module: lstat
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 On platforms where @code{off_t} is a 32-bit type, @code{lstat} may not
13 correctly report the size of files or block devices larger than 2 GB.
14 (Cf. @code{AC_SYS_LARGEFILE}.)
15 @item
16 On Linux/x86 and Linux/x86_64, applications compiled in 32-bit mode cannot
17 access files that happen to have a 64-bit inode number.  This can occur with
18 file systems such as XFS (typically on large disks) and NFS.
19 (Cf. @code{AC_SYS_LARGEFILE}.)
20 @item
21 For symlinks, when the argument ends in a slash, some platforms don't
22 dereference the argument:
23 Solaris 9.
24 @item
25 On some platforms, @code{lstat("file/",buf)} succeeds instead of
26 failing with @code{ENOTDIR}.
27 Mac OS X 10.13, Solaris 9.
28 @item
29 On Solaris 11.4, when this function yields a timestamp with a
30 nonpositive @code{tv_sec} value, @code{tv_nsec} might be in the range
31 @minus{}1000000000..@minus{}1, representing a negative nanoseconds
32 offset from @code{tv_sec}.
33 @item
34 On Windows platforms (excluding Cygwin), symlinks are not supported, so
35 @code{lstat} does not exist.
36 @end itemize
38 Portability problems not fixed by Gnulib:
39 @itemize
40 @item
41 @xref{sys/stat.h}, for general portability problems with @code{struct stat}.
42 @end itemize