* 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:
Corinna Vinschen 2005-03-02 08:28:54 +00:00
parent 4aa1f3158f
commit e04c777cc6
3 changed files with 10 additions and 9 deletions

View File

@ -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>
* include/cygwin/version.h: Bump DLL minor number to 14.

View File

@ -388,11 +388,9 @@ fhandler_disk_file::fstat (struct __stat64 *buf)
void
fhandler_disk_file::touch_ctime (void)
{
SYSTEMTIME st;
FILETIME ft;
GetSystemTime (&st);
SystemTimeToFileTime (&st, &ft);
GetSystemTimeAsFileTime (&ft);
if (!SetFileTime (get_io_handle (), &ft, NULL, NULL))
debug_printf ("SetFileTime (%s) failed, %E", get_win32_name ());
else

View File

@ -255,11 +255,9 @@ to_timestruc_t (FILETIME *ptr, timestruc_t *out)
void __stdcall
time_as_timestruc_t (timestruc_t * out)
{
SYSTEMTIME systemtime;
FILETIME filetime;
GetSystemTime (&systemtime);
SystemTimeToFileTime (&systemtime, &filetime);
GetSystemTimeAsFileTime (&filetime);
to_timestruc_t (&filetime, out);
}
@ -269,11 +267,9 @@ extern "C" time_t
time (time_t * ptr)
{
time_t res;
SYSTEMTIME systemtime;
FILETIME filetime;
GetSystemTime (&systemtime);
SystemTimeToFileTime (&systemtime, &filetime);
GetSystemTimeAsFileTime (&filetime);
res = to_time_t (&filetime);
if (ptr)
*ptr = res;