diff options
author | Bruno Haible <bruno@clisp.org> | 2017-04-29 15:05:15 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-04-29 22:52:04 +0200 |
commit | bd48174329ce207aaf37d37c91b68b215216ab2e (patch) | |
tree | 979ab3d9a4dd9e7ab47aa5701b81a348e5e06a20 /doc | |
parent | fcb99f403746ba7f21b0180a149992b14d6c81bd (diff) | |
download | gnulib-bd48174329ce207aaf37d37c91b68b215216ab2e.tar.gz |
stat: Fix time_t values and other problems on native Windows platforms.
* doc/posix-functions/stat.texi: Mention the problem with the Microsoft
implementations of stat().
* lib/stat.c: Include filename.h instead of dosname.h. Include
malloca.h, stat-w32.h.
(is_unc_root): New function.
(rpl_stat): New implementation for native Windows. Remove
REPLACE_FUNC_STAT_DIR code.
* m4/stat.m4 (gl_FUNC_STAT): On native Windows, set REPLACE_STAT always.
Don't define REPLACE_FUNC_STAT_DIR.
(gl_PREREQ_STAT): Require gl_HEADER_SYS_STAT_H.
* modules/stat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
(Depends-on): Remove dosname. Add filename, malloca.
(configure.ac): Also compile lib/stat-w32.c.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/posix-functions/stat.texi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/posix-functions/stat.texi b/doc/posix-functions/stat.texi index 33af95d5ba..c30e7e18f8 100644 --- a/doc/posix-functions/stat.texi +++ b/doc/posix-functions/stat.texi @@ -13,6 +13,15 @@ On platforms where @code{off_t} is a 32-bit type, @code{stat} may not correctly report the size of files or block devices larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.) @item +The @code{st_atime}, @code{st_ctime}, @code{st_mtime} field are affected by +the current time zone and by the DST flag of the current time zone on some +platforms: +mingw, MSVC 14 (when the environment variable @code{TZ} is set). +@item +On MSVC 14, this function fails with error @code{ENOENT} +on files such as @samp{C:\pagefile.sys} and +on directories such as @samp{C:\System Volume Information}. +@item On some platforms, @code{stat("link-to-file/",buf)} succeeds instead of failing with @code{ENOTDIR}. FreeBSD 7.2, AIX 7.1, Solaris 9, mingw64. |