From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bignum branch Date: Sat, 14 Jul 2018 19:20:29 +0300 Message-ID: <83wotxaiwi.fsf@gnu.org> References: <87o9fbbw1t.fsf@tromey.com> <86in5jdj49.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1531585140 17374 195.159.176.226 (14 Jul 2018 16:19:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Jul 2018 16:19:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 14 18:18:56 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feNG4-0004Po-6v for ged-emacs-devel@m.gmane.org; Sat, 14 Jul 2018 18:18:56 +0200 Original-Received: from localhost ([::1]:41928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feNIA-0004rL-QN for ged-emacs-devel@m.gmane.org; Sat, 14 Jul 2018 12:21:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feNHZ-0004pq-Cj for emacs-devel@gnu.org; Sat, 14 Jul 2018 12:20:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feNHW-0002Kl-7D for emacs-devel@gnu.org; Sat, 14 Jul 2018 12:20:29 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feNHV-0002KZ-Uo; Sat, 14 Jul 2018 12:20:26 -0400 Original-Received: from [176.228.60.248] (port=1227 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1feNHV-0005zI-Cs; Sat, 14 Jul 2018 12:20:25 -0400 In-reply-to: <86in5jdj49.fsf@gmail.com> (message from Andy Moreton on Fri, 13 Jul 2018 20:35:18 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227407 Archived-At: > From: Andy Moreton > 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?