From fcb99f403746ba7f21b0180a149992b14d6c81bd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 29 Apr 2017 14:55:22 +0200 Subject: 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. --- modules/fstat | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/fstat') 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]) -- cgit v1.2.1