From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 2/2] Add module functions to convert from and to big integers. Date: Wed, 24 Apr 2019 19:03:23 +0300 Message-ID: <837ebj2xx0.fsf@gnu.org> References: <329aec43-8272-f39a-e7ef-e77804103a50@cs.ucla.edu> <20190423213218.35618-1-phst@google.com> <20190423213218.35618-2-phst@google.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="250715"; mail-complaints-to="usenet@blaine.gmane.org" Cc: phst@google.com, eggert@cs.ucla.edu, emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 24 18:05:49 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJKP7-00135X-Je for ged-emacs-devel@m.gmane.org; Wed, 24 Apr 2019 18:05:49 +0200 Original-Received: from localhost ([127.0.0.1]:43931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJKP6-0000Ut-Lr for ged-emacs-devel@m.gmane.org; Wed, 24 Apr 2019 12:05:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJKMr-0007p1-61 for emacs-devel@gnu.org; Wed, 24 Apr 2019 12:03:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJKMq-0002Vy-GZ; Wed, 24 Apr 2019 12:03:28 -0400 Original-Received: from [176.228.60.248] (port=4690 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hJKMp-0002aH-Lo; Wed, 24 Apr 2019 12:03:28 -0400 In-reply-to: <20190423213218.35618-2-phst@google.com> (message from Philipp Stephani on Tue, 23 Apr 2019 23:32:18 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:235864 Archived-At: > From: Philipp Stephani > Cc: Philipp Stephani > Date: Tue, 23 Apr 2019 23:32:18 +0200 > > * src/module-env-27.h: Add new module functions to convert big > integers. > > * src/emacs-module.h.in (emacs_mpz): Define if GMP is available. > > * src/emacs-module.c (module_extract_big_integer) > (module_make_big_integer): New functions. > (initialize_environment): Use them. > > * test/data/emacs-module/mod-test.c (Fmod_test_double): New test > function. > (emacs_module_init): Define it. > > * test/src/emacs-module-tests.el (mod-test-double): New unit test. > > * doc/lispref/internals.texi (Module Values): Document new functions. These changes break the Emacs build on platforms where GMP is not available and Emacs uses mini-gmp.c. In particular, lisp.h amd emacs-module.c unconditionally define EMACS_MODULE_GMP, which then causes emacs-module.h include gmp.h, whose defionitions conflict with mini-gmp.h. It is also not clear whether the new emacs-module facilities are compatible with mini-gmp, i.e. whether mini-gmp can support the above interfaces in emacs-module. because if they can, we have a problem: emacs-module.h cannot include mini-gmp.h, AFAIU, where the relevant structures and macros are defined instead of system-wide gmp.h.