Gnulib module: sys_stat
Portability problems fixed by Gnulib:
mode_tis not defined on some platforms: MSVC 9.
S_IFIFO, are missing on some platforms.
S_ISSOCKare broken on some platforms.
S_ISDOOR, that are not defined on other platforms.
mkdirare not declared on some platforms: mingw, MSVC 9.
UTIME_OMITare missing on some platforms.
struct statdoes not include
st_ctimmembers. Use the gnulib module ‘stat-time’ for accessors to portably get at subsecond resolution.
Portability problems not fixed by Gnulib:
S_IFBLKis missing on some platforms: MSVC 9.
st_inois always 0.
st_inois an array of three
ino_tvalues, not a single value.
st_inoand use the Gnulib
same-inodemodule to compare nonzero values. For example,
SAME_INODE (a, b)is true if the
bare known to represent the same file,
(a.st_ino && !SAME_INODE (a, b))is true if they are known to represent different files, and
!a.st_inois true if it is not known whether they represent different files.
st_inovalues, even when
st_devexceeds 255, or if a local
One partial workaround is to compare other file metadata such as
st_mtime to detect this bug, but this
approach does not work on files whose metadata are being changed by
st_sizecontains bogus information for symlinks; use the Gnulib module
areadlink-with-sizefor a better way to get symlink contents.