* bug#19019: Guile improperly assumes 'long' is the same size as pointers
@ 2014-11-11 16:26 ` Mark H Weaver
2016-06-22 11:34 ` bug#19019: Status: " Andy Wingo
2020-11-25 19:09 ` bug#19019: guile assumes long " Mike Gran via Bug reports for GUILE, GNU's Ubiquitous Extension Language
0 siblings, 2 replies; 3+ messages in thread
From: Mark H Weaver @ 2014-11-11 16:26 UTC (permalink / raw)
To: 19019
Forwarded from guile-user:
> Date: Mon, 10 Nov 2014 12:44:55 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Subject: Re: Unable to compile Guile
> To: jeremy chen <yngccc@gmail.com>
> Cc: guile-user@gnu.org
>
>> Date: Sun, 9 Nov 2014 23:30:07 -0500
>> From: jeremy chen <yngccc@gmail.com>
>>
>> Hi, I am trying to compile guile on windows with Mingw-w64.
>> The file libguile/numbers.c signal an error in this function:
>>
>> static SCM
>> scm_i_inum2big (scm_t_inum x)
>> {
>> /* Return a newly created bignum initialized to X. */
>> SCM z = make_bignum ();
>> #if SIZEOF_VOID_P == SIZEOF_LONG
>> mpz_init_set_si (SCM_I_BIG_MPZ (z), x);
>> #else
>> /* Note that in this case, you'll also have to check all mpz_*_ui and
>> mpz_*_si invocations in Guile. */
>> #error creation of mpz not implemented for this inum size
>> #endif
>> return z;
>> }
>>
>> sizeof(void*) is 8 and sizeof(long) is 4 on my machine.
>> Anyway to get around this? Thanks.
>
> This is a bug in Guile: it assumes the LP64 data model, where both
> 'long' and a pointer are 64-bit wide. But 64-bit Windows uses the
> LLP64 model, where 'long' is a 32-bit data type, and the 64-bit
> integer data type is 'long long' or '__int64'.
>
> You need to fix Guile to support the LLP64 model, at least in this
> module, and probably elsewhere as well.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#19019: Status: Guile improperly assumes 'long' is the same size as pointers
2014-11-11 16:26 ` bug#19019: Guile improperly assumes 'long' is the same size as pointers Mark H Weaver
@ 2016-06-22 11:34 ` Andy Wingo
2020-11-25 19:09 ` bug#19019: guile assumes long " Mike Gran via Bug reports for GUILE, GNU's Ubiquitous Extension Language
1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2016-06-22 11:34 UTC (permalink / raw)
To: bug#19019
merge 19019 22406
thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#19019: guile assumes long is the same size as pointers
2014-11-11 16:26 ` bug#19019: Guile improperly assumes 'long' is the same size as pointers Mark H Weaver
2016-06-22 11:34 ` bug#19019: Status: " Andy Wingo
@ 2020-11-25 19:09 ` Mike Gran via Bug reports for GUILE, GNU's Ubiquitous Extension Language
1 sibling, 0 replies; 3+ messages in thread
From: Mike Gran via Bug reports for GUILE, GNU's Ubiquitous Extension Language @ 2020-11-25 19:09 UTC (permalink / raw)
To: 19019
There appears to be a patch to fix this on guile 2.2 at
https://gitlab.com/janneke/guile/-/commit/f0fade08173b97e2b4a68b79b654ad3d30a59286
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-25 19:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20201125190905.GA2317.ref@spikycactus.com>
2014-11-11 16:26 ` bug#19019: Guile improperly assumes 'long' is the same size as pointers Mark H Weaver
2016-06-22 11:34 ` bug#19019: Status: " Andy Wingo
2020-11-25 19:09 ` bug#19019: guile assumes long " Mike Gran via Bug reports for GUILE, GNU's Ubiquitous Extension Language
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).