From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#23753: 25.0.95; configuration of X client fails to include graphics libraries on Mac OS X 10.6.8 Date: Sun, 10 Dec 2017 10:20:35 +0000 Message-ID: <20171210102035.GA45904@breton.holly.idiocy.org> References: <574ADB58-D702-4292-AD3D-50E72726C36E@freenet.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zYM0uCDKw75PZbzx" Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1512901275 3228 195.159.176.226 (10 Dec 2017 10:21:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 10 Dec 2017 10:21:15 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) Cc: Peter Dyballa , 23753@debbugs.gnu.org, "Charles A. Roelli" To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 10 11:21:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1eNyjN-0000bB-N4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Dec 2017 11:21:09 +0100 Original-Received: from localhost ([::1]:44071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNyjQ-0000XH-9g for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Dec 2017 05:21:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNyjJ-0000Wz-W7 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 05:21:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNyjG-0006b8-Qx for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 05:21:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNyjG-0006av-Mh for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 05:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eNyjG-0005QM-Dl for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 05:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Dec 2017 10:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23753 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23753-submit@debbugs.gnu.org id=B23753.151290124120803 (code B ref 23753); Sun, 10 Dec 2017 10:21:02 +0000 Original-Received: (at 23753) by debbugs.gnu.org; 10 Dec 2017 10:20:41 +0000 Original-Received: from localhost ([127.0.0.1]:54508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNyiv-0005PS-Jo for submit@debbugs.gnu.org; Sun, 10 Dec 2017 05:20:41 -0500 Original-Received: from mail-wm0-f66.google.com ([74.125.82.66]:39230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNyiu-0005PG-SW for 23753@debbugs.gnu.org; Sun, 10 Dec 2017 05:20:41 -0500 Original-Received: by mail-wm0-f66.google.com with SMTP id i11so9329697wmf.4 for <23753@debbugs.gnu.org>; Sun, 10 Dec 2017 02:20:40 -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=wsPRn2CLrmrUl343wZYQEpp9x5Xue2jHnZa3Jg07Zl0=; b=f8oylDWgWQLG1dMB5RpQzjAPuEy8D7veU4gHNSeLoeql9u76gteoupCL80CtHnFSFR aFwWQAYXXjoMTgW4N3ZXAJRjLdAUEabDdbqkO+MH0qxMl9rOuWboAQ0g/tQ6lzcDjPO4 NzYhdJdW3CwONzecLkdmVR3hY561bREtQA7YSx05Q/AC8WjwWa7VYd+hxBXgcQUoOqYm 3SAzFHxIyn2QMXafz2Xs6stgnf9OmXjcT8UIWJRQgxzrkbCwhhE9qQJ9qKBrhncaRHfz JBxovDtCSwqBFhrIQjTZnU5g4Xc2xpxFgrjwX2uUIPHtauFk7EhKDvPwN7RfcM1zTzKs m3OQ== 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=wsPRn2CLrmrUl343wZYQEpp9x5Xue2jHnZa3Jg07Zl0=; b=mstqi7tOEXN6Hvniy4E50fpZqRBh9Q9LFbm2SdO7Rg4h527l7HF3sDxfYZ2M7Kk/bR S9hiGSwA4Omw8hTVB0Ubvs/kfJP9cO/tdyDt4MgJ/u5YtbkV4TglOD/w2TxHojlKVydW X/5nY3oIo7tOf4Haht/3xT+uRDvnk+jIJuPc/wi60oEO2uqOigUfyx3vzxNlccGDNCuL Qbyjx7RzEWeHIDmbI30O7e7ONoM9BBOmh2Qih4L8iL9zJohPvUIPdEIj0aYt922RmQKa L4htPmg0ap2Iq2yarnx5btYngNpV4epXhtyvj1cDEZs/DzQG4dyHLR4gIP/qwtIVmr/7 9/Mw== X-Gm-Message-State: AKGB3mLZcHgP1jM0RZDf6NlnmJexXXhN1RnbmBlSMtU/8+kvXnMsjmBH JIMqvMawEKpEjJCOoe79O38= X-Google-Smtp-Source: AGs4zMb6CZ/SpwWDVRXCu+lXJMN/TDUJwiL8sqiYDi7m04UPMiYCcsvzxxvJK4wEII5a8tmdbzvq7A== X-Received: by 10.28.43.7 with SMTP id r7mr7722762wmr.111.1512901233964; Sun, 10 Dec 2017 02:20:33 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-09c7-7705-5027-72ca.holly.idiocy.org. [2001:8b0:3f8:8129:9c7:7705:5027:72ca]) by smtp.gmail.com with ESMTPSA id d71sm6256640wma.7.2017.12.10.02.20.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Dec 2017 02:20:32 -0800 (PST) Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140886 Archived-At: --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, Dec 09, 2017 at 03:49:08PM -0500, Glenn Morris wrote: > Charles A. Roelli wrote: > > > The FSF GCC does not support Objective-C "blocks" (that is, the > > statements inside "^{...}" [1]). On an old macOS, you need to use the > > compiler that Apple used to ship (an extended version of FSF GCC that > > does support blocks), or, if you're brave, try to compile "clang" and > > use that. > > > > Maybe it would be possible to remove the blocks from macfont.m and to > > use an equivalent. > > Interesting. > > https://en.wikipedia.org/wiki/Blocks_(C_language_extension) > > Blocks are a non-standard extension added by Apple Inc. to Clang's > implementations of the C, C++, and Objective-C programming languages > > I would think removing this feature from the Emacs sources so that > they compile with standard gcc would be a high priority for Emacs. > It's surpising this has not come up before. I suspect that very few people on macOS have bothered trying to build with GCC. It looks as though the blocks are there to improve performance. I’ve tried removing them and don’t immediately see any problems, but maybe I’m not looking in the right places. -- Alan Third --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Remove-ObjC-blocks-Bug-23753.patch" >From 1f86de840ce0c808f2ee4bf6ce3703c54f8009da Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 10 Dec 2017 10:16:25 +0000 Subject: [PATCH] Remove ObjC blocks (Bug#23753) --- src/macfont.m | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/macfont.m b/src/macfont.m index 97879506ba..936e17052b 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -1479,10 +1479,7 @@ static CGGlyph macfont_get_glyph_for_cid (struct font *font, return glyph; } - queue = - dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - group = dispatch_group_create (); - dispatch_group_async (group, queue, ^{ + { int nkeys; uintptr_t key; nkeys = nkeys_or_perm; @@ -1495,7 +1492,7 @@ static CGGlyph macfont_get_glyph_for_cid (struct font *font, if (--nkeys == 0) break; } - }); + } } len = 0; @@ -1535,12 +1532,6 @@ static CGGlyph macfont_get_glyph_for_cid (struct font *font, sizeof (CGGlyph *) * nrows); cache->glyph.matrix[nrows - 1] = glyphs; cache->glyph.nrows = nrows; - - if (group) - { - dispatch_group_wait (group, DISPATCH_TIME_FOREVER); - dispatch_release (group); - } } return cache->glyph.matrix[nkeys_or_perm - ROW_PERM_OFFSET][c % 256]; @@ -3267,9 +3258,6 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no struct variation_selector_record *records = uvs->variation_selector_records; CFIndex i; UInt32 ir, nrecords; - dispatch_queue_t queue = - dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_group_t group = dispatch_group_create (); nrecords = BUINT32_VALUE (uvs->num_var_selector_records); i = 0; @@ -3293,7 +3281,7 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no default_uvs_offset = BUINT32_VALUE (records[ir].default_uvs_offset); non_default_uvs_offset = BUINT32_VALUE (records[ir].non_default_uvs_offset); - dispatch_group_async (group, queue, ^{ + { glyphs[i] = kCGFontIndexInvalid; if (default_uvs_offset) @@ -3345,14 +3333,12 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no BUINT24_VALUE (mappings[hi - 1].unicode_value) == c) glyphs[i] = BUINT16_VALUE (mappings[hi - 1].glyph_id); } - }); + } i++; ir++; } while (i < count) glyphs[i++] = kCGFontIndexInvalid; - dispatch_group_wait (group, DISPATCH_TIME_FOREVER); - dispatch_release (group); } static int -- 2.14.3 --zYM0uCDKw75PZbzx--