From 3583c1333977345964cbf4829f983cf7e2ff4a84 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 5 Sep 2005 13:30:38 +0000 Subject: [PATCH] Vivian Meazza: After much trial and tribulation, Harald came up with a fix for the bug which has been plaguing Cygwin for a couple of weeks now. It's only a couple of lines. I've tested it exhaustively, and it seems to cure the problem of Cygwin failing to start. --- simgear/timing/timestamp.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/timing/timestamp.cxx b/simgear/timing/timestamp.cxx index 41c541be..cdafa0a2 100644 --- a/simgear/timing/timestamp.cxx +++ b/simgear/timing/timestamp.cxx @@ -105,7 +105,7 @@ void SGTimeStamp::stamp() { // increment the time stamp by the number of microseconds (usec) SGTimeStamp operator + (const SGTimeStamp& t, const long& m) { -#if defined( WIN32 ) +#if defined( WIN32 ) && !defined(__CYGWIN__) return SGTimeStamp( 0, t.usec + m ); #else return SGTimeStamp( t.seconds + ( t.usec + m ) / 1000000, @@ -116,7 +116,7 @@ SGTimeStamp operator + (const SGTimeStamp& t, const long& m) { // difference between time stamps in microseconds (usec) long operator - (const SGTimeStamp& a, const SGTimeStamp& b) { -#if defined( WIN32 ) +#if defined( WIN32 ) && !defined(__CYGWIN__) return a.usec - b.usec; #else return 1000000 * (a.seconds - b.seconds) + (a.usec - b.usec); -- 2.39.5