~ chicken-core (chicken-5) c7bca844eba91ce030f65ad490dcdd3c32158e8b


commit c7bca844eba91ce030f65ad490dcdd3c32158e8b
Author:     Jim Ursetto <zbigniewsz@gmail.com>
AuthorDate: Tue Feb 19 01:14:30 2013 -0600
Commit:     Christian Kellermann <ckeen@pestilenz.org>
CommitDate: Sat Mar 16 20:32:42 2013 +0100

    Ensure sleep seconds is a fixnum on Windows; also, don't halve sleep time
    
    Halving sleep time was a regression in be44f5328 when posix stuff
    was consolidated; Windows side needs ##core#inline.
    
    Signed-off-by: Christian Kellermann <ckeen@pestilenz.org>

diff --git a/posixwin.scm b/posixwin.scm
index fecf75ff..d2cc9273 100644
--- a/posixwin.scm
+++ b/posixwin.scm
@@ -577,7 +577,7 @@ process_wait(C_word h, C_word t)
 }
 
 #define C_process_wait(p, t) (process_wait(C_unfix(p), C_truep(t)) ? C_SCHEME_TRUE : C_SCHEME_FALSE)
-#define C_sleep(t) (Sleep(C_unfix(t) * 1000), C_SCHEME_UNDEFINED)
+#define C_sleep(t) (Sleep(C_unfix(t) * 1000), C_fix(0))
 
 static int C_fcall
 get_hostname()
@@ -1650,7 +1650,9 @@ EOF
     (values pid #t _exstatus)
     (values -1 #f #f) ) )
 
-(define sleep (foreign-lambda int "C_sleep" int))
+(define (sleep s)
+  (##sys#check-exact s 'sleep)
+  (##core#inline "C_sleep" s))
 
 (define-foreign-variable _hostname c-string "C_hostname")
 (define-foreign-variable _osver c-string "C_osver")
Trap