avoid some overlong lines from posix urls, etc.
[gnulib.git] / doc / posix-functions / lstat.texi
1 @node lstat
2 @section @code{lstat}
3 @findex lstat
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/lstat.html}
6
7 Gnulib module: lstat
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 For symlinks, when the argument ends in a slash, some platforms don't
13 dereference the argument:
14 Solaris 9.
15 @item
16 On some platforms, @code{lstat("file/",buf)} succeeds instead of
17 failing with @code{ENOTDIR}.
18 Solaris 9.
19 @item
20 On Windows platforms (excluding Cygwin), symlinks are not supported, so
21 @code{lstat} does not exist.
22 @end itemize
23
24 Portability problems not fixed by Gnulib:
25 @itemize
26 @item
27 On platforms where @code{off_t} is a 32-bit type, @code{lstat} may not
28 correctly report the size of files or block devices larger than 2 GB.  The fix
29 is to use the @code{AC_SYS_LARGEFILE} macro.
30 @item
31 On Windows platforms (excluding Cygwin), @code{st_ino} is always 0.
32 @item
33 Because of the definition of @code{struct stat}, it is not possible to
34 portably replace @code{stat} via an object-like macro.  Therefore,
35 expressions such as @code{(islnk ? lstat : stat) (name, buf)} are not
36 portable, and should instead be written @code{islnk ? lstat (name,
37 buf) : stat (name, buf)}.
38 @item
39 On some file systems, @code{st_size} contains bogus information for
40 symlinks; use the gnulib module areadlink-with-size for a better way
41 to get symlink contents.
42 @end itemize