1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix the MinGW build as followup to recent "nofollow" changes

* src/w32.c (fdutimens): Call utimensat instead of utime.
(set_file_times): Function deleted.
(convert_from_timespec): Renamed from convert_from_time_t and
modified to accept 'struct timespec' argument instead of 'time_t'.
(utimensat): Renamed from utime and modified to accept 'struct
timespec [2]' argument and an additional argument FLAG.  Emulate
Posix 'utimensat'.  Call 'convert_from_timespec'.
(w32_copy_file): Call 'utimensat' instead of 'set_file_times'.
* src/fileio.c (Fcopy_file) [WINDOWSNT]: Make the error message be
identical to that on Posix platforms.

* nt/inc/sys/stat.h (utimensat): Provide prototype.
* nt/mingw-cfg.site (ac_cv_func_futimens)
(gl_cv_func_futimens_works, ac_cv_func_utimensat)
(gl_cv_func_utimensat_works): Override Gnulib tests.
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_futimens)
(OMIT_GNULIB_MODULE_utimensat): Disable these Gnulib modules.
This commit is contained in:
Eli Zaretskii 2020-03-08 17:00:10 +02:00
parent 0a3f8da6e1
commit 66bc47d12a
5 changed files with 88 additions and 46 deletions

View file

@ -164,4 +164,9 @@ int __cdecl __MINGW_NOTHROW fstatat (int, char const *,
struct stat *, int);
int __cdecl __MINGW_NOTHROW chmod (const char*, int);
/* Provide prototypes of library functions that are emulated on w32
and whose prototypes are usually found in sys/stat.h on POSIX
platforms. */
extern int utimensat (int, const char *, struct timespec const[2], int);
#endif /* INC_SYS_STAT_H_ */