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
path: root/winsup
diff options
context:
space:
mode:
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/cygtls.h2
-rw-r--r--winsup/cygwin/hires.h2
-rw-r--r--winsup/cygwin/signal.cc1
-rw-r--r--winsup/cygwin/times.cc2
5 files changed, 8 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0f420dbd2..b43766025 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-27 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * times.cc (hires_ms::usecs): Compare the difference.
+ * hires.h: Add parentheses to HIRES_DELAY_MAX.
+
2005-03-26 Christopher Faylor <cgf@timesys.com>
* timer.cc (nanosleep): Treat tv_sec < 0 as invalid.
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
index 38fe531e3..9148e2cf8 100644
--- a/winsup/cygwin/cygtls.h
+++ b/winsup/cygwin/cygtls.h
@@ -1,6 +1,6 @@
/* cygtls.h
- Copyright 2003, 2004 Red Hat, Inc.
+ Copyright 2003, 2004, 2005 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h
index 2c9f09c81..a3e15aad0 100644
--- a/winsup/cygwin/hires.h
+++ b/winsup/cygwin/hires.h
@@ -19,7 +19,7 @@ details. */
The tv_sec argument in timeval structures cannot exceed
HIRES_DELAY_MAX / 1000 - 1, so that adding fractional part
and rounding won't exceed HIRES_DELAY_MAX */
-#define HIRES_DELAY_MAX (((UINT_MAX - 10000) / 1000) * 1000) + 10
+#define HIRES_DELAY_MAX ((((UINT_MAX - 10000) / 1000) * 1000) + 10)
class hires_base
{
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 41b48313f..1808b2428 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -77,7 +77,6 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
pthread_testcancel ();
if ((unsigned int) rqtp->tv_sec > (HIRES_DELAY_MAX / 1000 - 1)
- || rqtp->tv_sec < 0
|| (unsigned int) rqtp->tv_nsec > 999999999)
{
set_errno (EINVAL);
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 4c0909eb5..2ac2ee609 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -597,7 +597,7 @@ hires_ms::usecs (bool justdelta)
if (!minperiod) /* NO_COPY variable */
prime ();
DWORD now = timeGetTime ();
- if (now < initime_ms)
+ if ((now - initime_ms) < 0)
{
inited = 0;
prime ();