]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* posix-threads.cc (_Jv_CondWait): Fix currentTimeMillis() overflow.
authorBryce McKinlay <bryce@albatross.co.nz>
Mon, 14 Jun 1999 17:20:35 +0000 (17:20 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Mon, 14 Jun 1999 17:20:35 +0000 (18:20 +0100)
From-SVN: r27524

libjava/ChangeLog
libjava/posix-threads.cc

index 5fa114912dfaf49657909d40cde910a7bc0bf7fd..42bec98ff0edb525fcf621f57cbc9b9d72a6d7e2 100644 (file)
@@ -1,8 +1,13 @@
+1999-06-14  Bryce McKinlay  <bryce@albatross.co.nz>
+
+       * posix-threads.cc (_Jv_CondWait): Fix currentTimeMillis() overflow.
+
 1999-06-11  Warren Levy  <warrenl@cygnus.com>
 
        * mauve-libgcj: Activated java.net Mauve tests.
 
 1999-06-10  Bryce McKinlay  <bryce@albatross.co.nz>
+
        * java/net/natInetAddress.cc (aton): Fix typos.
        (lookup): Use a bigger buffer size for gethostbyname_r on all
        versions of glibc. Updated FIXME comment explaining this.
@@ -22,7 +27,7 @@
        * java/text/DecimalFormat.java: Throw IllegalArgumentException
        throughout rather than ParseException.
 
-1999-06-09  Bryce McKinlay <bryce@albatross.co.nz>
+1999-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
 
        * java/lang/Runtime.java (exec): Convert prog name and arguments
        to string array.
index 436588aee320e358252ebe2086e3e1c88b448d2d..825b0206c1906f6ca51364a146c833965cf0c015 100644 (file)
@@ -85,12 +85,11 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu,
     r = pthread_cond_wait (cv, pmu);
   else
     {
-      struct timespec ts;
-      unsigned long m = millis + java::lang::System::currentTimeMillis ();
-
-      ts.tv_sec = m / 1000;
-      ts.tv_nsec = (m % 1000) * 1000 * 1000 + nanos;
-
+      struct timespec ts; 
+      jlong m = millis + java::lang::System::currentTimeMillis (); 
+      ts.tv_sec = m / 1000; 
+      ts.tv_nsec = ((m % 1000) * 1000000) + nanos; 
+             
       r = pthread_cond_timedwait (cv, pmu, &ts);
     }
   return r;