fstatat
=======

POSIX specification:
 https://pubs.opengroup.org/onlinepubs/9699919799/functions/fstatat.html

Gnulib module: fstatat

Portability problems fixed by Gnulib:

  * This function is missing on some platforms: glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin 1.5.x, mingw, MSVC 14. But the replacement function is not safe to be used in libraries and is not multithread-safe.

  * On platforms where off_t is a 32-bit type, fstatat may not correctly report the size of files or block devices larger than 2 GB.  See Large File Support.

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

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

  * On macOS 12.6, when this function yields a timestamp with a nonpositive tv_sec value, tv_nsec might be in the range -999999999..-1, representing a negative nanoseconds offset from tv_sec.  Solaris 11.4 is similar, except that tv_sec might also be -1000000000.

Portability problems not fixed by Gnulib:

  * This function does not fail when the second argument is an empty string on some platforms, even when AT_EMPTY_PATH is not used: glibc 2.7, Linux 2.6.38.

  * See sys/stat.h, for general portability problems with struct stat.