noop and milliseconds->time are removed (after being deprecated) in
the experimental branch of chicken.  The following patches allow the
sqlite3 egg to compile against the chicken experimental branch. 

I'm least certain about the milliseconds-deprecate patch, as the
sqlite3 egg is declared to use fixnum arithmetic, which probably
degrades the resolution of the timer once this patch is applied.
As well, I'm taking advantage of a chicken-specific extension to
srfi-18 by calling thread-sleep! with a number of seconds rather
than a time object.

-Alan
-- 
.i ko djuno fi le do sevzi
Index: sqlite3.scm
===================================================================
--- sqlite3.scm (revision 22247)
+++ sqlite3.scm (working copy)
@@ -284,7 +284,7 @@
   (let/cc return
     (let ([r #f])
       (dynamic-wind
-        noop
+        void
         (lambda ()
           (handle-exceptions exn
             (print-error "in collation function" exn)
@@ -422,7 +422,7 @@
       (c-pointer ctx) (int n) (c-pointer args)) void
   (let/cc return
     (dynamic-wind
-      noop
+      void
       (lambda ()
         (handle-exceptions exn
           (print-error "in SQL function" exn)
@@ -444,7 +444,7 @@
       (c-pointer ctx) (int n) (c-pointer args)) void
   (let/cc return
     (dynamic-wind
-      noop
+      void
       (lambda ()
         (handle-exceptions exn
           (print-error "in step of SQL function" exn)
@@ -465,7 +465,7 @@
   (let/cc return
     (let ([agc (sqlite3_aggregate_context ctx)])
       (dynamic-wind
-        noop
+        void
         (lambda ()
           (handle-exceptions exn
             (print-error "in final of SQL function" exn)
Index: sqlite3.scm
===================================================================
--- sqlite3.scm (revision 22247)
+++ sqlite3.scm (working copy)
@@ -574,7 +574,7 @@
 (define (make-busy-timeout timeout)
   (define (thread-sleep!/ms ms)
     (thread-sleep!
-      (milliseconds->time (+ ms (current-milliseconds)))))
+      (/ (+ ms (current-milliseconds)) 1000)))
   (let* ([delays '#(1 2 5 10 15 20 25 25 25 50 50 100)]
    [totals '#(0 1 3  8 18 33 53 78 103 128 178 228)]
    [ndelay (vector-length delays)])
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to