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:
authorChristopher Faylor <me@cgf.cx>2005-12-13 05:02:51 +0300
committerChristopher Faylor <me@cgf.cx>2005-12-13 05:02:51 +0300
commitd090ee8081cd382c495d3ffffda6190d4f3aa5bf (patch)
tree8d0ce5f1449520b7e839f23664fa2277765c1546
parentbecfe4e93e81d6fd9811a16aa2490c15511c2947 (diff)
* times.cc (systime): Correct precision referenced in comment.
* fhandler_tty.cc (fhandler_tty_slave::open): Don't free original windows station since that will cause strange problems displaying fonts. Reset windows station to original station after creating console. * times.cc (hires_ms::usecs): Only reprime when calculated time is less than system time.
-rw-r--r--winsup/cygwin/ChangeLog13
-rw-r--r--winsup/cygwin/fhandler_tty.cc9
-rw-r--r--winsup/cygwin/times.cc4
3 files changed, 20 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a471df098..6111d7f82 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,16 @@
+2005-12-12 Nick Duffek <nick@duffek.com>
+
+ * times.cc (systime): Correct precision referenced in comment.
+
+2005-12-12 Christopher Faylor <cgf@timesys.com>
+
+ * fhandler_tty.cc (fhandler_tty_slave::open): Don't free original
+ windows station since that will cause strange problems displaying
+ fonts. Reset windows station to original station after creating
+ console.
+ * times.cc (hires_ms::usecs): Only reprime when calculated time is less
+ than system time.
+
2005-12-12 Christopher Faylor <cgf@timesys.com>
* pinfo.cc (winpids::add): Don't copy procinfo when there is no cygwin
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 5b7e69ba5..5483249c9 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -580,21 +580,22 @@ fhandler_tty_slave::open (int flags, mode_t)
&& wincap.pty_needs_alloc_console ())
{
BOOL b;
- HWINSTA horig = GetProcessWindowStation ();
+ HWINSTA h, horig;
+ h = horig = GetProcessWindowStation ();
if (myself->ctty == -1)
{
- HWINSTA h = CreateWindowStation (NULL, 0, GENERIC_READ | GENERIC_WRITE, &sec_none_nih);
+ h = CreateWindowStation (NULL, 0, WINSTA_ALL_ACCESS, &sec_none_nih);
termios_printf ("CreateWindowStation %p, %E", h);
if (h)
{
b = SetProcessWindowStation (h);
termios_printf ("SetProcessWindowStation %d, %E", b);
}
- if (horig)
- CloseWindowStation (horig);
}
b = AllocConsole (); // will cause flashing if workstation
// stuff fails
+ if (horig && h != horig)
+ SetProcessWindowStation (horig);
termios_printf ("%d = AllocConsole (), %E", b);
if (b)
init_console_handler (TRUE);
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 09343c742..482045449 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -41,7 +41,7 @@ systime ()
x.HighPart = ft.dwHighDateTime;
x.LowPart = ft.dwLowDateTime;
x.QuadPart -= FACTOR; /* Add conversion factor for UNIX vs. Windows base time */
- x.QuadPart /= 10; /* Convert to milliseconds */
+ x.QuadPart /= 10; /* Convert to microseconds */
return x.QuadPart;
}
@@ -644,7 +644,7 @@ hires_ms::usecs ()
LONGLONG t = systime ();
LONGLONG res = initime_us + (((LONGLONG) timeGetTime ()) * 1000LL);
- if (res <= t)
+ if (res < t)
{
inited = false;
prime ();