summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-08-27 23:05:44 +0200
committerLudovic Courtès <ludo@gnu.org>2008-08-27 23:05:44 +0200
commit70eca635571bce82123fcb6f72579ee741c50b2c (patch)
tree7893cea9fdcd7d42a11d9eded49c80cdf15034e4
parentf85ea2a85fcdd051f432964806f044c0301d0945 (diff)
downloadguile-70eca635571bce82123fcb6f72579ee741c50b2c.tar.gz
Fix builds `--without-threads'.
-rw-r--r--libguile/ChangeLog9
-rw-r--r--libguile/scmsigs.c4
-rw-r--r--libguile/threads.c2
-rw-r--r--test-suite/ChangeLog5
-rw-r--r--test-suite/tests/srfi-18.test6
5 files changed, 23 insertions, 3 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index a3c9767f9..e8d93628b 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-27 Ludovic Courtès <ludo@gnu.org>
+
+ Fix builds `--without-threads'. Reported by Han-Wen Nienhuys
+ <hanwen@xs4all.nl>.
+
+ * scmsigs.c (scm_i_close_signal_pipe): Don't refer to
+ `signal_pipe' unless `SCM_USE_PTHREAD_THREADS' is true.
+ * threads.c (scm_leave_guile_cleanup): Mark as `SCM_UNUSED'.
+
2008-08-25 Ludovic Courtès <ludo@gnu.org>
* Makefile.am (AM_CFLAGS): New.
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index d05bdac67..3a8596a6d 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -680,8 +680,10 @@ scm_i_close_signal_pipe()
been launched at this point, it never will be before shutdown. */
scm_i_pthread_mutex_lock (&signal_delivery_thread_mutex);
+#if SCM_USE_PTHREAD_THREADS
if (scm_i_signal_delivery_thread != NULL)
close (signal_pipe[1]);
+#endif
scm_i_pthread_mutex_unlock (&signal_delivery_thread_mutex);
}
diff --git a/libguile/threads.c b/libguile/threads.c
index 84c7bce7f..7e55f3b25 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -784,7 +784,7 @@ scm_with_guile (void *(*func)(void *), void *data)
scm_i_default_dynamic_state);
}
-static void
+SCM_UNUSED static void
scm_leave_guile_cleanup (void *x)
{
scm_leave_guile ();
diff --git a/test-suite/ChangeLog b/test-suite/ChangeLog
index 1c2ff80f2..433431a77 100644
--- a/test-suite/ChangeLog
+++ b/test-suite/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-27 Ludovic Courtès <ludo@gnu.org>
+
+ * tests/srfi-18.test: Don't run the tests unless
+ "(provided? 'threads)" is true.
+
2008-08-25 Ludovic Courtès <ludo@gnu.org>
* standalone/Makefile.am (test_cflags): Add `$(GCC_CFLAGS)'.
diff --git a/test-suite/tests/srfi-18.test b/test-suite/tests/srfi-18.test
index d116768e0..16f7278dd 100644
--- a/test-suite/tests/srfi-18.test
+++ b/test-suite/tests/srfi-18.test
@@ -1,7 +1,7 @@
;;;; srfi-18.test --- Test suite for Guile's SRFI-18 functions. -*- scheme -*-
;;;; Julian Graham, 2007-10-26
;;;;
-;;;; Copyright (C) 2007 Free Software Foundation, Inc.
+;;;; Copyright (C) 2007, 2008 Free Software Foundation, Inc.
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
@@ -22,6 +22,8 @@
#:use-module (test-suite lib)
#:use-module (srfi srfi-18))
+(and (provided? 'threads)
+
(with-test-prefix "current-thread"
(pass-if "current-thread eq current-thread"
@@ -475,3 +477,5 @@
(set! success #t)))
(lambda () (thread-join! t)))
success)))
+
+)