Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-03-02 11:28:54 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-03-02 11:28:54 +0300
commite04c777cc6721bf37f4747814b98baca9d269fc4 (patch)
tree749939fe718e3e47d2cbd5b17d2921b49fef0a48
parent4aa1f3158feca01e294d7db2f5fafef5a2fa0b3d (diff)
* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Replace
GetSystemTime/SystemTimeToFileTime with GetSystemTimeAsFileTime. * times.cc (time_as_timestruc_t): Ditto. (time): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc4
-rw-r--r--winsup/cygwin/times.cc8
3 files changed, 10 insertions, 9 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3a81828b5..e62d17d4e 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 6171f0b69..64b205a55 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -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
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 5e4496308..4c0909eb5 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -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;