* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Replace
GetSystemTime/SystemTimeToFileTime with GetSystemTimeAsFileTime. * times.cc (time_as_timestruc_t): Ditto. (time): Ditto.
This commit is contained in:
parent
4aa1f3158f
commit
e04c777cc6
@ -1,3 +1,10 @@
|
|||||||
|
2005-03-01 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Replace
|
||||||
|
GetSystemTime/SystemTimeToFileTime with GetSystemTimeAsFileTime.
|
||||||
|
* times.cc (time_as_timestruc_t): Ditto.
|
||||||
|
(time): Ditto.
|
||||||
|
|
||||||
2005-03-01 Christopher Faylor <cgf@timesys.com>
|
2005-03-01 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* include/cygwin/version.h: Bump DLL minor number to 14.
|
* include/cygwin/version.h: Bump DLL minor number to 14.
|
||||||
|
@ -388,11 +388,9 @@ fhandler_disk_file::fstat (struct __stat64 *buf)
|
|||||||
void
|
void
|
||||||
fhandler_disk_file::touch_ctime (void)
|
fhandler_disk_file::touch_ctime (void)
|
||||||
{
|
{
|
||||||
SYSTEMTIME st;
|
|
||||||
FILETIME ft;
|
FILETIME ft;
|
||||||
|
|
||||||
GetSystemTime (&st);
|
GetSystemTimeAsFileTime (&ft);
|
||||||
SystemTimeToFileTime (&st, &ft);
|
|
||||||
if (!SetFileTime (get_io_handle (), &ft, NULL, NULL))
|
if (!SetFileTime (get_io_handle (), &ft, NULL, NULL))
|
||||||
debug_printf ("SetFileTime (%s) failed, %E", get_win32_name ());
|
debug_printf ("SetFileTime (%s) failed, %E", get_win32_name ());
|
||||||
else
|
else
|
||||||
|
@ -255,11 +255,9 @@ to_timestruc_t (FILETIME *ptr, timestruc_t *out)
|
|||||||
void __stdcall
|
void __stdcall
|
||||||
time_as_timestruc_t (timestruc_t * out)
|
time_as_timestruc_t (timestruc_t * out)
|
||||||
{
|
{
|
||||||
SYSTEMTIME systemtime;
|
|
||||||
FILETIME filetime;
|
FILETIME filetime;
|
||||||
|
|
||||||
GetSystemTime (&systemtime);
|
GetSystemTimeAsFileTime (&filetime);
|
||||||
SystemTimeToFileTime (&systemtime, &filetime);
|
|
||||||
to_timestruc_t (&filetime, out);
|
to_timestruc_t (&filetime, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,11 +267,9 @@ extern "C" time_t
|
|||||||
time (time_t * ptr)
|
time (time_t * ptr)
|
||||||
{
|
{
|
||||||
time_t res;
|
time_t res;
|
||||||
SYSTEMTIME systemtime;
|
|
||||||
FILETIME filetime;
|
FILETIME filetime;
|
||||||
|
|
||||||
GetSystemTime (&systemtime);
|
GetSystemTimeAsFileTime (&filetime);
|
||||||
SystemTimeToFileTime (&systemtime, &filetime);
|
|
||||||
res = to_time_t (&filetime);
|
res = to_time_t (&filetime);
|
||||||
if (ptr)
|
if (ptr)
|
||||||
*ptr = res;
|
*ptr = res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user