[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: --without-threads compile broken
From: |
Ludovic Courtès |
Subject: |
Re: --without-threads compile broken |
Date: |
Wed, 27 Aug 2008 23:08:20 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Hi,
Han-Wen Nienhuys <address@hidden> writes:
> i686-linux-gcc -DHAVE_CONFIG_H
> -I/home/lilydev/vc/gub/target/linux-x86/src/guil
> e-1.9.git -I.. -I/home/lilydev/vc/gub/target/linux-x86/src/guile-1.9.git/lib
> -I.
> ./lib -g -O2 -Wall -Wmissing-prototypes -MT libguile_la-scmsigs.lo -MD -MP
> -MF .
> deps/libguile_la-scmsigs.Tpo -c
> /home/lilydev/vc/gub/target/linux-x86/src/guile-
> 1.9.git/libguile/scmsigs.c -fPIC -DPIC -o .libs/libguile_la-scmsigs.o
>
> /home/lilydev/vc/gub/target/linux-x86/src/guile-1.9.git/libguile/scmsigs.c:
> In f
> unction 'scm_i_close_signal_pipe':
> /home/lilydev/vc/gub/target/linux-x86/src/guile-1.9.git/libguile/scmsigs.c:684:
>
> error: 'signal_pipe' undeclared (first use in this function)
I committed the attached fix.
Julian: shouldn't `srfi-18.scm' check for "(provided? 'threads)" and
raise an error when it's false?
Thanks,
Ludo'.
>From 70eca635571bce82123fcb6f72579ee741c50b2c Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ludovic=20Court=C3=A8s?= <address@hidden>
Date: Wed, 27 Aug 2008 23:05:44 +0200
Subject: [PATCH] Fix builds `--without-threads'.
---
libguile/ChangeLog | 9 +++++++++
libguile/scmsigs.c | 4 +++-
libguile/threads.c | 2 +-
test-suite/ChangeLog | 5 +++++
test-suite/tests/srfi-18.test | 6 +++++-
5 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index a3c9767..e8d9362 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-27 Ludovic Courtès <address@hidden>
+
+ Fix builds `--without-threads'. Reported by Han-Wen Nienhuys
+ <address@hidden>.
+
+ * 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 <address@hidden>
* Makefile.am (AM_CFLAGS): New.
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index d05bdac..3a8596a 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 84c7bce..7e55f3b 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 1c2ff80..433431a 100644
--- a/test-suite/ChangeLog
+++ b/test-suite/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-27 Ludovic Courtès <address@hidden>
+
+ * tests/srfi-18.test: Don't run the tests unless
+ "(provided? 'threads)" is true.
+
2008-08-25 Ludovic Courtès <address@hidden>
* 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 d116768..16f7278 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)))
+
+)
--
1.6.0
- --without-threads compile broken, Han-Wen Nienhuys, 2008/08/22
- Re: --without-threads compile broken,
Ludovic Courtès <=
- Re: --without-threads compile broken, Julian Graham, 2008/08/27
- Re: --without-threads compile broken, Ludovic Courtès, 2008/08/27
- Re: --without-threads compile broken, Julian Graham, 2008/08/30
- Re: --without-threads compile broken, Ludovic Courtès, 2008/08/30
- Re: --without-threads compile broken, Julian Graham, 2008/08/30
- Re: --without-threads compile broken, Ludovic Courtès, 2008/08/30