From 7bdd1fb4ad31db9cb46eadc87f84262ee81b5550 Mon Sep 17 00:00:00 2001 From: Julian Graham Date: Sat, 30 Aug 2008 13:49:38 -0400 Subject: [PATCH] Raise error on SRFI-18 load if Guile built without threading support --- srfi/ChangeLog | 5 +++++ srfi/srfi-18.scm | 3 +++ test-suite/tests/srfi-18.test | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index 5cba7e7..d771a8f 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,8 @@ +2008-08-30 Julian Graham + + * srfi-18.scm: Raise error if Guile not built with threading + support. + 2008-08-25 Ludovic Courtès * Makefile.am (AM_CFLAGS): New. diff --git a/srfi/srfi-18.scm b/srfi/srfi-18.scm index 0593f4e..925ecb3 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 16f7278..fa309e6 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" -- 1.5.4.3