lstat
=====

POSIX specification: http://www.opengroup.org/onlinepubs/9699919799/functions/lstat.html

Gnulib module: lstat

Portability problems fixed by Gnulib:

  * For symlinks, when the argument ends in a slash, some platforms don't dereference the argument: Solaris 9.

  * On some platforms, lstat("file/",buf) succeeds instead of failing with ENOTDIR. Solaris 9.

  * On Windows platforms (excluding Cygwin), symlinks are not supported, so lstat does not exist.

Portability problems not fixed by Gnulib:

  * On platforms where off_t is a 32-bit type, lstat may not correctly report the size of files or block devices larger than 2 GB.  The fix is to use the AC_SYS_LARGEFILE macro.

  * On Windows platforms (excluding Cygwin), st_ino is always 0.

  * Because of the definition of struct stat, it is not possible to portably replace stat via an object-like macro.  Therefore, expressions such as (islnk ? lstat : stat) (name, buf) are not portable, and should instead be written islnk ? lstat (name, buf) : stat (name, buf).

  * On some filesystems, st_size contains bogus information for symlinks; use the gnulib module areadlink-with-size for a better way to get symlink contents.