From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat' Date: Tue, 19 Apr 2022 12:24:17 +0800 Message-ID: <87v8v5g0pa.fsf@yahoo.com> References: <87zgkhg5qd.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22550"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Keith David Bershatsky , emacs-devel@gnu.org, Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Paul Eggert To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 19 06:26:05 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngfRE-0005cP-7r for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Apr 2022 06:26:04 +0200 Original-Received: from localhost ([::1]:55138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngfRC-0008B8-PI for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Apr 2022 00:26:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngfPm-0007I9-1J for emacs-devel@gnu.org; Tue, 19 Apr 2022 00:24:34 -0400 Original-Received: from sonic310-25.consmr.mail.ne1.yahoo.com ([66.163.186.206]:42317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngfPj-0008SQ-S7 for emacs-devel@gnu.org; Tue, 19 Apr 2022 00:24:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650342268; bh=CHTU7POKTUic8t6uvRr0bOlP/JPDboh5DztfdQi1uEg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=cb5CHCHQL5j3SeXbXQ0BEPj327I6uCu72PMl3KGqjyudx8eSbhHt84M69UmoL1T2w63ZILzC1V6lYyw2/zsPC7KkPEwADv3YlY3y8cYAf0ITpTcv7bvpKmRSnFGmx1WIPp+nUFmeIip/p8/JJjCkW5Mxeaz+2txt4J/Hd8fjyShu3IMcMLHkV6CuVuL6QE3sElWyNL0gHxqXVTxq2MGWEPvaVDp5IGuPXk61jE64u7t7JS+4qiFyNCOoPq1vfgb7rSGjwyrgpLJmrJn1XKCmaJp/tZHwm3uXVDMu1qqEKnSsBmeU69GvzKq8gh/M57xlGSr2UGrfY+11SuGJxhjndg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650342268; bh=BLxH+03BW4fgYzYW+7a4D31fwVQDZrXhOkHYCPFfv3r=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=QvJ1xyOVyk6vaK1d0LhKGzeubFzBx2PiCHkkqbLs5R0WbY0YhRB4boWXdbbUXUW/KfFvAB6kV9l/9f6OD+sxbmHFCcDzmO20M1QKx24ucG1mEbTrGXlptgus0EVotuBDGTzRg/iepdILGQQKVhGHKISKU/NI+zBjmEo/xqBCtJ9ov2xSovb9F4IoAaBVd0Qe+j+BW6aSggMUwucuX0dhKB0Sc7DJf8UX2XZoX7r1QlXjpcrsBPjI2j6z5ZPJd7XOMg/TbsFuoH7IkJDeLozXXttU5H5UFnCQVpccz3sEq0BMXNByeoQPN2gs0lllk4oF/xGO2pmuNAye2b3Oj9a81A== X-YMail-OSG: NI2K7k0VM1lxAcESfPqDertoAhKKBRNPHKDwhE7RVRS9L00SJsP.v3lhPDNO0.m XLvv9Sc.rYQN4j9UrFNWTCTKdWaATrk54RCWxFaf_dNCiUNxbqCmARqEoYtcpMBRcslXvw.FgiLh jllPKTJG194tnMDwAojM1fzg1felKfreShGilM8Ec6Nd2DC6YZZBc9WqrF5uTqZG6IVna1m.oGdA 0cu85ouBL1TPaGgCEQcFxmzIzBf5NdmVTst1FpaBmDZUTj.dnX3IQ5uO4Cymj094RObcxYjM1.pT joeIxLekdMQ_KJketdZUSIPOBwDIeuma35EYfH.h8hGXOmuSgcpcM7rkE5FattHh9DCC.A4IpFIw H4Jl.pLmOBPqESmf3uVnUlck3ofQnwLeUupXCsIAuPE87It_4cFJKLF_kwUwKeEqp31CmqiAZW4j jsqlOyqSKjajrtPJXAlOIIyY0GAmY1kG3uFLvGhr0FRWUCNl528gK0Ie2nqh_xY3dtCuyMAh0.9E oqiFAdBIoME8nZ.eOts_rYP0RQ_zy4uzjg2asJqfM4vgc7Eo6U4joeYwlxBKjF4D28OuJqimg_Mq GCORW4uJSlYPie7jNG5VnipME_7gRq921XKXb3WNQJLQ60d48krmUGD6gbCIIuwEAVz_58AYgH.g gp2lU2MX6IgW44lPoT1y_g3hQxpwFpUR0TjoW_p9b6pK.aSuFLiZh1eBJtQqt1vbXDks4QnFNVN9 XWHze_XdhvtVAzK4hi6F1j7Jct4WL6sqNzsLoBZFjIcn3IInCACjuEzGdDf_0pc4rHDjbb1dF2_0 UftTrPS9_Dirs_pBxnkQITGbSuHMLWGB_Rzado1Jn. X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Tue, 19 Apr 2022 04:24:28 +0000 Original-Received: by hermes--canary-production-sg3-cfddc4f9d-jdsff (VZM Hermes SMTP Server) with ESMTPA ID ed2160b34978948625f1aac374ad3b4e; Tue, 19 Apr 2022 04:24:22 +0000 (UTC) In-Reply-To: (Alan Third's message of "Tue, 19 Apr 2022 05:19:10 +0100") X-Mailer: WebService/1.1.20048 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.206; envelope-from=luangruo@yahoo.com; helo=sonic310-25.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288647 Archived-At: Alan Third writes: > Welcome to the wonderful world of Objective C under GCC. > > The attached should fix this particular error. > > These problems will need to be fixed in the emacs-28 branch, assuming > we're going to continue supporting macOS 10.6. > > FWIW, I've moved away from trying to hide warnings generated on older > versions of macOS to try and avoid the difficult to understand #if > constructions we've previously used throughout the code. Thanks for clarifying, I think I understand what those constructs mean now. > Alan Third > > From f11340a5a5d234b57022908483979dfa0a9ccb99 Mon Sep 17 00:00:00 2001 > From: Alan Third > Date: Tue, 19 Apr 2022 05:05:17 +0100 > Subject: [PATCH] Fix nsmenu compilation under macOS 10.6 > > * src/nsmenu.m ([EmacsMenu fillWithWidgetValue:]): Replace modern > shorthand dictionary and array definitions. > --- > src/nsmenu.m | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/src/nsmenu.m b/src/nsmenu.m > index 81d7cd2da1..0f7d1fb98f 100644 > --- a/src/nsmenu.m > +++ b/src/nsmenu.m > @@ -649,7 +649,8 @@ - (void)fillWithWidgetValue: (void *)wvptr > work around it by using tabs to split the title into two > columns. */ > NSFont *menuFont = [NSFont menuFontOfSize:0]; > - NSDictionary *font_attribs = @{NSFontAttributeName: menuFont}; > + NSDictionary *font_attribs = [NSDictionary dictionaryWithObjectsAndKeys: > + menuFont, NSFontAttributeName, nil]; > CGFloat maxNameWidth = 0; > CGFloat maxKeyWidth = 0; > > @@ -677,11 +678,12 @@ - (void)fillWithWidgetValue: (void *)wvptr > NSTextTab *tab = > [[[NSTextTab alloc] initWithTextAlignment: NSTextAlignmentRight > location: maxWidth > - options: @{}] autorelease]; > + options: [NSDictionary dictionary]] autorelease]; > NSMutableParagraphStyle *pstyle = [[[NSMutableParagraphStyle alloc] init] > autorelease]; > - [pstyle setTabStops: @[tab]]; > - attributes = @{NSParagraphStyleAttributeName: pstyle}; > + [pstyle setTabStops: [NSArray arrayWithObject:tab]]; > + attributes = [NSDictionary dictionaryWithObjectsAndKeys: > + pstyle, NSParagraphStyleAttributeName, nil]; > #endif > > /* clear existing contents */