[PATCH 1/3] ntdll: Implement nanosecond precision file time storage (try 2).
Alexandre Julliard
julliard at winehq.org
Tue Oct 23 06:28:01 CDT 2012
"Erich E. Hoover" <ehoover at mymail.mines.edu> writes:
> @@ -2048,17 +2048,26 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
>
> if (info->LastAccessTime.QuadPart || info->LastWriteTime.QuadPart)
> {
> +#ifdef HAVE_FUTIMENS
> + struct timespec tv[2];
> +#else
> struct timeval tv[2];
> +#endif
> + int ret;
>
> if (!info->LastAccessTime.QuadPart || !info->LastWriteTime.QuadPart)
> {
> -
> - tv[0].tv_sec = tv[0].tv_usec = 0;
> - tv[1].tv_sec = tv[1].tv_usec = 0;
> + memset(&tv, 0x0, sizeof(tv));
> if (!fstat( fd, &st ))
> {
> tv[0].tv_sec = st.st_atime;
> tv[1].tv_sec = st.st_mtime;
> +#if defined(HAVE_FUTIMENS) && defined(HAVE_STRUCT_STAT_ST_ATIM)
> + tv[0].tv_nsec = st.st_atim.tv_nsec;
> +#endif
> +#if defined(HAVE_FUTIMENS) && defined(HAVE_STRUCT_STAT_ST_MTIM)
> + tv[1].tv_nsec = st.st_mtim.tv_nsec;
> +#endif
You want UTIME_OMIT. Also please try to cut down on the number of
#ifdefs.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list