unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: MinGW build fixes
Date: Sat, 27 Jun 2009 10:29:54 +0100	[thread overview]
Message-ID: <87zlbu3tyl.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <87my7uh7b7.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sat\, 27 Jun 2009 02\:03\:08 +0200")

ludo@gnu.org (Ludovic Courtès) 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




  reply	other threads:[~2009-06-27  9:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 23:38 MinGW build fixes Neil Jerram
2009-06-27  0:03 ` Ludovic Courtès
2009-06-27  9:29   ` Neil Jerram [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-06-27 10:22 carlo.bramix
2009-06-27 17:21 ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zlbu3tyl.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).