Fix COPYING.EXCEPTION license notices
[gnulib.git] / doc / posix-functions / lstat.texi
blob987ecfcc294962710e77dd318b7c7820f24fe3b2
1 @node lstat
2 @subsection @code{lstat}
3 @findex lstat
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/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 2 GiB and larger.
14 @xref{Large File Support}.
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 @xref{Large File Support}.
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 macOS 14, Solaris 9.
28 @item
29 On macOS 12.6, when this function yields a timestamp with a
30 nonpositive @code{tv_sec} value, @code{tv_nsec} might be in the range
31 @minus{}999999999..@minus{}1, representing a negative nanoseconds
32 offset from @code{tv_sec}.  Solaris 11.4 is similar, except that
33 @code{tv_sec} might also be @minus{}1000000000.
34 @item
35 On Windows platforms (excluding Cygwin), symlinks are not supported, so
36 @code{lstat} does not exist.
37 @end itemize
39 Portability problems not fixed by Gnulib:
40 @itemize
41 @item
42 @xref{sys/stat.h}, for general portability problems with @code{struct stat}.
43 @end itemize