summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Graham <julian@countyhell.(none)>2008-08-30 13:49:38 -0400
committerLudovic Courtès <ludo@gnu.org>2008-08-30 21:08:50 +0200
commitd0b6ad349184773a3a7c515612858d84b5fd7f01 (patch)
treec0ac7529a93bec0a75528a3f5f88a4514d281453
parentcc39ff0ea15364175b9b506f897b50f72f9b193c (diff)
downloadguile-d0b6ad349184773a3a7c515612858d84b5fd7f01.tar.gz
Raise error on SRFI-18 load if Guile built without threading support
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--srfi/ChangeLog5
-rw-r--r--srfi/srfi-18.scm3
-rw-r--r--test-suite/tests/srfi-18.test4
3 files changed, 10 insertions, 2 deletions
diff --git a/srfi/ChangeLog b/srfi/ChangeLog
index 5cba7e7b5..d771a8f9f 100644
--- a/srfi/ChangeLog
+++ b/srfi/ChangeLog
@@ -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.
diff --git a/srfi/srfi-18.scm b/srfi/srfi-18.scm
index 0593f4ef8..925ecb304 100644
--- a/srfi/srfi-18.scm
+++ b/srfi/srfi-18.scm
@@ -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)
diff --git a/test-suite/tests/srfi-18.test b/test-suite/tests/srfi-18.test
index 16f7278dd..fa309e6ce 100644
--- a/test-suite/tests/srfi-18.test
+++ b/test-suite/tests/srfi-18.test
@@ -19,10 +19,10 @@
;;;; 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"