delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/20/13:49:58

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200106201707.TAA22797@father.ludd.luth.se>
Subject: Re: More signed/unsigned issues
In-Reply-To: <3028-Wed20Jun2001102214+0300-eliz@is.elta.co.il> from Eli Zaretskii at "Jun 20, 2001 10:22:15 am"
To: djgpp-workers AT delorie DOT com
Date: Wed, 20 Jun 2001 19:07:47 +0200 (MET DST)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Unsure here. I did what should work no matter what.


Right,

						MartinS

Index: src/libc/posix/unistd/sleep.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/unistd/sleep.c,v
retrieving revision 1.1
diff -p -u -r1.1 sleep.c
--- src/libc/posix/unistd/sleep.c       1995/03/12 21:28:52     1.1
+++ src/libc/posix/unistd/sleep.c       2001/06/20 16:57:21
@@ -7,7 +7,7 @@ unsigned int
 sleep(unsigned int _seconds)
 {
   clock_t start_time = clock();
-  while (clock()-start_time < _seconds * CLOCKS_PER_SEC)
+  while (clock()-start_time < (signed long long)_seconds * CLOCKS_PER_SEC)
     __dpmi_yield();
   return 0;
 }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019