From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Thu, 15 Feb 2018 20:35:25 +0000 Message-ID: <20180215203525.GA12965@breton.holly.idiocy.org> References: <20180215193047.GA5448@breton.holly.idiocy.org> <62b22b44-2c40-4cca-a25a-d588353cd1fa@email.android.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1518726862 9261 195.159.176.226 (15 Feb 2018 20:34:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Feb 2018 20:34:22 +0000 (UTC) User-Agent: Mutt/1.9.3 (2018-01-21) Cc: Eli Zaretskii , Angelo Graziosi , emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 15 21:34:17 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 1emQE7-0000iw-EG for ged-emacs-devel@m.gmane.org; Thu, 15 Feb 2018 21:33:55 +0100 Original-Received: from localhost ([::1]:57567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emQG9-0003A0-93 for ged-emacs-devel@m.gmane.org; Thu, 15 Feb 2018 15:36:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emQFg-0002vm-Gb for emacs-devel@gnu.org; Thu, 15 Feb 2018 15:35:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emQFf-0007ax-NL for emacs-devel@gnu.org; Thu, 15 Feb 2018 15:35:32 -0500 Original-Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:41886) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emQFd-0007aH-Sa; Thu, 15 Feb 2018 15:35:30 -0500 Original-Received: by mail-wr0-x22b.google.com with SMTP id f8so946678wrh.8; Thu, 15 Feb 2018 12:35:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=BsNPuws/U8qQGLNi6Kh4I3rkCTMzwikKzj9PuG4uAKw=; b=Ueqet+u4Z7g6Oq3rEw2zSLRB8ptV82WaXUIM3j+6Da3NapWJp0opWwPEl3LQAvhqVz OfWADsR8+u+hu+thhN6hqPt+43J9oK3EtV/p7vq1cxxTRnfF2GUQHHHN/zyYDEejm99m LqC5CHG8q8JrvCvsDrTFNhXZRlepMmugEvl0QsWwHBuMnvMQZUeDsJYm3mVrkBGz1Hdl B1mLIwXmQRhpSb/VUaspEGO5mt4z+kuBW1ksDW2Jd7qAYxJUCVv/o/hfVUsF26+YZS8c V7qiTWXyMl7G3jZzvahwe9lc1QUfKzvRq+GOZ7zMyiFc2k+LR2pWhV5AGSExxerYFd15 Ywng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=BsNPuws/U8qQGLNi6Kh4I3rkCTMzwikKzj9PuG4uAKw=; b=DjPmzqfuW1shQU1Ae9GJ+3SaD4H/Nvh4UWyYpluhdDtor7gqqyAkBvQXqlKBWoU513 g/IQR94s1UYIdQiTNaRWT13n87/ve1Jcm37maa/vNBYR/jrkXuMCKaN6lpbGjn/e7aKn nsyJ+LS0HyiOKy9PoUpPBweDxWqzVHVXkbn6kB/2M2bwu88vYHbkP6tY3BbHIPr6rXVG PrqNoWSmE+R0EmqE1PNSjq22NIoXUgHa7yeqSSetmFJThzqx4nySu3pAsOzruBABZrBx gzmn+DSJ4vWeKCJtFsAbyKreqjdWPbCTuV8PbxwQ+z7cFq4vR2fuibJiumyAQLH/OxvQ JCDg== X-Gm-Message-State: APf1xPB8UAeJM9fXnbu2FRyBay2uGmbJVYXY0dxeTjTJfdgRFxYamMZ7 LZQ1a66jBZgYBWI1alKLXLdhFUL/a5s= X-Google-Smtp-Source: AH8x2272Cbou0kQzR5Ev3pjqEFierGxOmdsDF/IZLasQwzLNjK4SQttvAXRgXABBTFfh8JBrpo9WXQ== X-Received: by 10.223.139.11 with SMTP id n11mr3723510wra.91.1518726928462; Thu, 15 Feb 2018 12:35:28 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-3550-f824-d1b1-bdf6.holly.idiocy.org. [2001:8b0:3f8:8129:3550:f824:d1b1:bdf6]) by smtp.gmail.com with ESMTPSA id 56sm25403976wrt.23.2018.02.15.12.35.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 12:35:27 -0800 (PST) Content-Disposition: inline In-Reply-To: <62b22b44-2c40-4cca-a25a-d588353cd1fa@email.android.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b 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:222772 Archived-At: On Thu, Feb 15, 2018 at 11:49:30AM -0800, Daniel Colascione wrote: > Thanks for checking. If you disable Wconversion at the top of the > file, you should be able to unblock yourself. The warning helps make > the code robust, but it's annoying to account for compiler > differences. Thanks, I’ve got it to build and it seems to work fine. Here are the changes I had to make: 3 files changed, 15 insertions(+), 15 deletions(-) src/dispnew.c | 2 +- src/macfont.m | 26 +++++++++++++------------- src/pdumper.c | 2 +- modified src/dispnew.c @@ -6066,7 +6066,7 @@ init_display (void) #endif /* HAVE_NTGUI */ #ifdef HAVE_NS - if (!inhibit_window_system && !will_dump) + if (!inhibit_window_system && !will_dump_p ()) { Vinitial_window_system = Qns; Vwindow_system_version = make_number (10); modified src/macfont.m @@ -1646,7 +1646,7 @@ static int macfont_variation_glyphs (struct font *, int c, unsigned variations[256]); static void macfont_filter_properties (Lisp_Object, Lisp_Object); -static struct font_driver const macfont_driver = +static struct font_driver macfont_driver = { .type = LISPSYM_INITIALLY (Qmac_ct), .get_cache = macfont_get_cache, @@ -4034,6 +4034,18 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no +static void +syms_of_macfont_for_pdumper (void) +{ + // if (RESTORING_FROM_DUMP) + // macfont_family_cache = Qnil; + // else + // eassert (NILP (macfont_family_cache)); + + macfont_driver.type = Qmac_ct; + register_font_driver (&macfont_driver, NULL); +} + void syms_of_macfont (void) { @@ -4056,15 +4068,3 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no pdumper_do_now_and_after_load (syms_of_macfont_for_pdumper); } - -static void -syms_of_macfont_for_pdumper (void) -{ - if (RESTORING_FROM_DUMP) - macfont_family_cache = Qnil; - else - eassert (NILP (macfont_family_cache)); - - macfont_driver.type = Qmac_ct; - register_font_driver (&macfont_driver, NULL); -} modified src/pdumper.c @@ -55,7 +55,7 @@ #ifdef HAVE_PDUMPER #ifdef __GNUC__ -# pragma GCC diagnostic error "-Wconversion" +/* # pragma GCC diagnostic error "-Wconversion" */ # pragma GCC diagnostic error "-Wshadow" # define ALLOW_IMPLICIT_CONVERSION \ _Pragma ("GCC diagnostic push") \ Presumably RESTORING_FROM_DUMP is a left‐over from previous code? I couldn’t see at a glance what to replace it with. Oddly whenever I had a problem with macfont.m I had to do ‘make clean’ before make would work again. I’m not sure what was going on or if it’s specific to this branch. -- Alan Third