Raise error on SRFI-18 load if Guile built without threading support
authorJulian Graham <julian@countyhell.(none)>
Sat, 30 Aug 2008 17:49:38 +0000 (13:49 -0400)
committerLudovic Courtès <ludo@gnu.org>
Sat, 30 Aug 2008 19:08:50 +0000 (21:08 +0200)
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
srfi/ChangeLog
srfi/srfi-18.scm
test-suite/tests/srfi-18.test

index 5cba7e7..d771a8f 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-30  Julian Graham <joolean@gmail.com>
+
+       * srfi-18.scm: Raise error if Guile not built with threading
+       support.
+
 2008-08-25  Ludovic Courtès  <ludo@gnu.org>
 
        * Makefile.am (AM_CFLAGS): New.
index 0593f4e..925ecb3 100644 (file)
@@ -89,6 +89,9 @@
            make-condition-variable
            raise))
 
+(if (not (provided? 'threads))
+    (error "SRFI-18 requires Guile with threads support"))
+
 (cond-expand-provide (current-module) '(srfi-18))
 
 (define (check-arg-type pred arg caller)
index 16f7278..fa309e6 100644 (file)
 ;;;; Boston, MA 02110-1301 USA
 
 (define-module (test-suite test-srfi-18)
-  #:use-module (test-suite lib)
-  #:use-module (srfi srfi-18))
+  #:use-module (test-suite lib))
 
 (and (provided? 'threads)
+     (use-modules (srfi srfi-18))
 
 (with-test-prefix "current-thread"