emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bignum branch


From: Eli Zaretskii
Subject: Re: bignum branch
Date: Sat, 14 Jul 2018 19:20:29 +0300

> From: Andy Moreton <address@hidden>
> Date: Fri, 13 Jul 2018 20:35:18 +0100
> 
> The mpz_* API from libgmp uses "long" as the widest type for native
> integers, which does not work on 64bit mingw64 on Windows, where "long" is
> 32bit and "long long" (used for EMACS_INT) is 64bit.

Isn't that a problem in how GMP was configured for MinGW64?  I see in
the GMP sources that it does check for "long long", so why didn't that
work during the build?

In the file gmp-h.in (from which gmp.h is generated during the build),
I see this:

  @DEFN_LONG_LONG_LIMB@
  ...
  #ifdef __GMP_SHORT_LIMB
  typedef unsigned int          mp_limb_t;
  typedef int                   mp_limb_signed_t;
  #else
  #ifdef _LONG_LONG_LIMB
  typedef unsigned long long int        mp_limb_t;
  typedef long long int         mp_limb_signed_t;
  #else
  typedef unsigned long int     mp_limb_t;
  typedef long int              mp_limb_signed_t;
  #endif
  #endif

This seems to indicate that if the configure script defines
_LONG_LONG_LIMB, then mp_limb_t will be a 64-bit signed integer type,
which is what you want.  And looking at configure.ac, I seem to
understand that MinGW64 should have caused _LONG_LONG_LIMB to be
defined.  (I cannot test all those because I don't have MinGW64
installed.)  Can you see why all this didn't work for you?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]