From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.bugs Subject: Re: [Patch] --with-threads on MinGW Date: Mon, 04 Dec 2006 11:31:16 +1100 Message-ID: <87veks33jf.fsf@zip.com.au> References: <457316BF.6090003@web.de> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165192287 28186 80.91.229.10 (4 Dec 2006 00:31:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2006 00:31:27 +0000 (UTC) Cc: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Dec 04 01:31:26 2006 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gr1jy-0006n6-Kd for guile-bugs@m.gmane.org; Mon, 04 Dec 2006 01:31:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gr1jy-0007Bx-FF for guile-bugs@m.gmane.org; Sun, 03 Dec 2006 19:31:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gr1ju-00078E-Cb for bug-guile@gnu.org; Sun, 03 Dec 2006 19:31:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gr1jt-000782-1c for bug-guile@gnu.org; Sun, 03 Dec 2006 19:31:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gr1js-00077z-QE for bug-guile@gnu.org; Sun, 03 Dec 2006 19:31:20 -0500 Original-Received: from [61.8.2.215] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gr1js-0004KL-FU for bug-guile@gnu.org; Sun, 03 Dec 2006 19:31:20 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 0E2285A1DA0; Mon, 4 Dec 2006 11:31:19 +1100 (EST) Original-Received: from localhost (ppp2894.dyn.pacific.net.au [61.8.40.148]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 78AAF8C34; Mon, 4 Dec 2006 11:31:18 +1100 (EST) Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1Gr1jo-0000Ly-Qw; Mon, 04 Dec 2006 11:31:16 +1100 Original-To: Nils Durner In-Reply-To: <457316BF.6090003@web.de> (Nils Durner's message of "Sun, 03 Dec 2006 19:26:07 +0100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3410 Archived-At: Nils Durner writes: > > the attached patch fixes building on MinGW with "--with-threads=pthreads" Looks good in principle, but some bits ought to be in a more autoconfy style. > -#ifdef HAVE_STRUCT_TIMESPEC > +#if HAVE_STRUCT_TIMESPEC || SCM_I_GSC_USE_PTHREAD_THREADS > pf ("typedef struct timespec scm_t_timespec;\n"); Does the detection of struct timespec go wrong somehow? > +#ifndef __MINGW32__ > + sigset_t all_sigs; > + > sigfillset (&all_sigs); > scm_i_pthread_sigmask (SIG_SETMASK, &all_sigs, NULL); > +#endif I think I'd rather either conditionalize on the existance of pthread_sigmask, or perhaps make some dummy sigset stuff if it doesn't exist. > +#ifndef __MINGW32__ > + t->pthread, > +#else > + t->pthread.p, > +#endif What does that do? > #if SCM_USE_PTHREAD_THREADS > /* pthread_getattr_np not available on MacOS X and Solaris 10. */ > -#if HAVE_PTHREAD_ATTR_GETSTACK && HAVE_PTHREAD_GETATTR_NP > +#if (HAVE_PTHREAD_ATTR_GETSTACK && HAVE_PTHREAD_GETATTR_NP) || __MINGW32__ Remind us what's wrong with the getstack detection ... _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile