diff options
author | Bruno Haible <bruno@clisp.org> | 2017-04-29 14:55:22 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-04-29 22:51:56 +0200 |
commit | fcb99f403746ba7f21b0180a149992b14d6c81bd (patch) | |
tree | b8e2b912e3d924c62ffb3a0aacf0dd29917591bf /modules/fstat | |
parent | f3f95f863f63eec80bfe4228719fb0afada5fa05 (diff) | |
download | gnulib-fcb99f403746ba7f21b0180a149992b14d6c81bd.tar.gz |
fstat: Fix time_t values on native Windows platforms.
* doc/posix-functions/fstat.texi: Mention the problem with st_*time.
* lib/stat-w32.h: New file.
* lib/stat-w32.c: New file.
* lib/fstat.c: Don't include msvc-inval.h. Include msvc-nothrow.h,
stat-w32.h instead.
(fstat_nothrow): Remove function.
(rpl_fstat): Implement by means of _gl_fstat_by_handle.
* m4/fstat.m4 (gl_FUNC_FSTAT): On native Windows, set REPLACE_FSTAT
always.
(gl_PREREQ_FSTAT): Require gl_HEADER_SYS_STAT_H.
* modules/fstat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
(Depends-on): Remove msvc-inval. Add pathmax, msvc-nothrow.
(configure.ac): Also compile lib/stat-w32.c.
Diffstat (limited to 'modules/fstat')
-rw-r--r-- | modules/fstat | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/fstat b/modules/fstat index 2db555ab96..3f2357b99e 100644 --- a/modules/fstat +++ b/modules/fstat @@ -3,18 +3,22 @@ fstat() function: return information about an open file. Files: lib/fstat.c +lib/stat-w32.h +lib/stat-w32.c m4/fstat.m4 Depends-on: sys_stat largefile +pathmax [test $REPLACE_STAT = 1] unistd [test $REPLACE_STAT = 1] -msvc-inval [test $REPLACE_STAT = 1] +msvc-nothrow [test $REPLACE_STAT = 1] configure.ac: gl_FUNC_FSTAT if test $REPLACE_FSTAT = 1; then AC_LIBOBJ([fstat]) + AC_LIBOBJ([stat-w32]) gl_PREREQ_FSTAT fi gl_SYS_STAT_MODULE_INDICATOR([fstat]) |