diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-08 01:24:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-08 01:24:58 +0000 |
commit | 9cde3cf3b51759d98dea14d7b5ed0a0b303d72a6 (patch) | |
tree | d32f1d2f715b9771ca2f416c14f8c59762750a19 | |
parent | 0953fe640f177b565578ed7ecc77169ec1a914fa (diff) | |
download | newlib-9cde3cf3b51759d98dea14d7b5ed0a0b303d72a6.zip newlib-9cde3cf3b51759d98dea14d7b5ed0a0b303d72a6.tar.gz newlib-9cde3cf3b51759d98dea14d7b5ed0a0b303d72a6.tar.bz2 |
* fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket is
unix-domain socket.
* times.cc (hires_ms::prime): Set init flag.
* times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to 1970.
-rw-r--r-- | winsup/cygwin/ChangeLog | 14 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 7 | ||||
-rw-r--r-- | winsup/cygwin/times.cc | 6 |
3 files changed, 23 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2457677..25db5f7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,17 @@ +2002-06-07 Christopher Faylor <cgf@redhat.com> + + * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket + is unix-domain socket. + +2002-06-07 Christopher Faylor <cgf@redhat.com> + + * times.cc (hires_ms::prime): Set init flag. + +2002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com> + + * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to + 1970. + 2002-06-06 Christopher Faylor <cgf@redhat.com> * autoload.cc (timeGetDevCaps): Define new autoload function. diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index bed274b..3207aaf 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -256,9 +256,10 @@ fhandler_socket::dup (fhandler_base *child) int __stdcall fhandler_socket::fstat (struct __stat64 *buf, path_conv *pc) { - fhandler_disk_file fh; - fh.set_name (cstrdup (get_name ()), get_win32_name ()); - return fh.fstat (buf, pc); + int res = fhandler_base::fstat (buf, pc); + if (!res) + buf->st_ino = get_handle (); + return res; } int diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index a64ee3d..7a9a3eb 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -646,14 +646,18 @@ hires_ms::prime () minperiod = 0; else { - minperiod = min (max(tc.wPeriodMin, 1), tc.wPeriodMax); + minperiod = min (max (tc.wPeriodMin, 1), tc.wPeriodMax); timeBeginPeriod (minperiod); } + initime_ms = timeGetTime (); GetSystemTimeAsFileTime (&f); SetThreadPriority (GetCurrentThread (), priority); + + inited = 1; initime_us.HighPart = f.dwHighDateTime; initime_us.LowPart = f.dwLowDateTime; + initime_us.QuadPart -= FACTOR; initime_us.QuadPart /= 10; } |