[Patch] hires.h

Pierre A. Humblet pierre@phumblet.no-ip.org
Sun Mar 27 20:04:00 GMT 2005


        * timer.cc (nanosleep): Treat tv_sec < 0 as invalid.

Should be in signal.cc. But then I thought I had covered that case way
back. Turns out the root cause is in hires.h. With this patch, the nanosleep
patch can be reverted.

Pierre


2005-03-27  Pierre Humblet <pierre.humblet@ieee.org>

	* hires.h: Add parentheses to HIRES_DELAY_MAX.

--- hires.h     23 Dec 2003 16:26:30 -0000      1.7
+++ hires.h     27 Mar 2005 19:54:04 -0000
@@ -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
 {



More information about the Cygwin-patches mailing list