From: Julian Graham Date: Sat, 30 Aug 2008 17:49:38 +0000 (-0400) Subject: Raise error on SRFI-18 load if Guile built without threading support X-Git-Url: http://git.hcoop.net/bpt/guile.git/commitdiff_plain/d0b6ad349184773a3a7c515612858d84b5fd7f01 Raise error on SRFI-18 load if Guile built without threading support Signed-off-by: Ludovic Courtès --- 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 + + * 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 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"