From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: MinGW build fixes Date: Sat, 27 Jun 2009 10:29:54 +0100 Message-ID: <87zlbu3tyl.fsf@arudy.ossau.uklinux.net> References: <87my7uk1kc.fsf@arudy.ossau.uklinux.net> <87my7uh7b7.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1246095020 25907 80.91.229.12 (27 Jun 2009 09:30:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Jun 2009 09:30:20 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jun 27 11:30:13 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MKUEe-0002Sr-KV for guile-devel@m.gmane.org; Sat, 27 Jun 2009 11:30:12 +0200 Original-Received: from localhost ([127.0.0.1]:42295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKUEd-0006rY-Uv for guile-devel@m.gmane.org; Sat, 27 Jun 2009 05:30:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKUEZ-0006qI-R8 for guile-devel@gnu.org; Sat, 27 Jun 2009 05:30:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKUER-0006q3-Vv for guile-devel@gnu.org; Sat, 27 Jun 2009 05:30:06 -0400 Original-Received: from [199.232.76.173] (port=41323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKUER-0006q0-Pv for guile-devel@gnu.org; Sat, 27 Jun 2009 05:29:59 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:47315) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKUEP-0005TZ-Ak; Sat, 27 Jun 2009 05:29:57 -0400 Original-Received: from arudy (host86-152-99-133.range86-152.btcentralplus.com [86.152.99.133]) by mail3.uklinux.net (Postfix) with ESMTP id E44091F716C; Sat, 27 Jun 2009 10:29:54 +0100 (BST) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 4694938021; Sat, 27 Jun 2009 10:29:54 +0100 (BST) In-Reply-To: <87my7uh7b7.fsf@gnu.org> ("Ludovic =?iso-8859-1?Q?Court=E8s?= =?iso-8859-1?Q?=22's?= message of "Sat\, 27 Jun 2009 02\:03\:08 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8781 Archived-At: ludo@gnu.org (Ludovic Court=E8s) writes: >> SCM_API struct scm_t_cell_type_statistics scm_i_master_freelist; >> +SCM_API struct scm_t_cell_type_statistics *scm_i_master_freelist_ptr; >> SCM_API struct scm_t_cell_type_statistics scm_i_master_freelist2; >> +SCM_API struct scm_t_cell_type_statistics *scm_i_master_freelist2_ptr; > > I don't understand why this fixes anything, since the `_ptr' variables > are declared as `SCM_API' just like the non-`_ptr' variables. Indeed. My guess is that it's because the DLL import/export mechanism works for atomic data - i.e. chars, ints, pointers etc - but not for structs. Or at least, not in the same way - it could be that some extra magic incantation is needed somewhere. (For example, there's no problem with scm_cells_allocated, which is also referenced by the inline scm_cell code.) I haven't managed to find a reference for this, though. Also this restriction could be one imposed by MSVC/Windows, or it could be a restriction in MinGW's emulation of that. I guess the thing to do would be to email the MinGW people, so I'll do that. > Also, it adds an indirection, which may impact performance. Yes. So I guess I should make these diffs #ifdef __MINGW32__. > Other than that, I think this is good news! Me too. On the one hand Windows isn't a free platform, so it can't be our prime concern. On the other, I think it's good for us to grow the possible audience for Guile as much as possible. (Guile is already in Cygwin, of course, but it's an older version and AFAIK the build was not straightforward. So these fixes are about making Windows builds work out of the upstream box.) Regards, Neil