From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat' Date: Wed, 20 Apr 2022 09:07:56 +0100 Message-ID: References: <87zgkhg5qd.fsf@yahoo.com> <871qxseeet.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lUpuP97l22EUC3Kp" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34037"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , Keith David Bershatsky , Paul Eggert , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 20 10:12:46 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 1nh5S9-0008eQ-PL for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Apr 2022 10:12:46 +0200 Original-Received: from localhost ([::1]:55130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh5S5-0003Yy-2Y for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Apr 2022 04:12:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh5Ni-0001P0-GD for emacs-devel@gnu.org; Wed, 20 Apr 2022 04:08:11 -0400 Original-Received: from outbound.soverin.net ([2a01:4f8:fff0:65::8:228]:33475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh5Nd-0001B6-Ov for emacs-devel@gnu.org; Wed, 20 Apr 2022 04:08:09 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 573A038; Wed, 20 Apr 2022 08:08:00 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1650442079; bh=g4LLojlcs7tf3USY/5LUgOgl+HiBnTlPbxr34r6JR0Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZCd82WLbEDDeJaJWuHLksFSdP4fmYT+h4k/xCkgK1xyzFoUHzauK+R9BH1UNZTMF3 yOA3/QGTSVVtVvn02sSynHJi/i/lqCsI9ciSX1U8QLBM9pb8sHJNESdbsxVWf087ZD 95ajTpYaiudX9nX3lbBQBmZMRqnd3gj+nxETCDblitE5VZS+GRmk8SCmPLxpF37FLE snFs4hiGmneygW8nrIukryTmywDh5vPrmfbKxac7LR1w26aO0+lToY0hoGTDetrPaT NQtFV2z2DVXfMlG00Mlv9TqDHvMJsjSpukQ6kccW8L1mT0ydKy/yyILkNo4Tq7cxU2 T4T+FdNpAyUjw== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95) (envelope-from ) id 1nh5NU-000c8L-4a; Wed, 20 Apr 2022 09:07:56 +0100 Mail-Followup-To: Alan Third , Po Lu , Keith David Bershatsky , emacs-devel@gnu.org, Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , Paul Eggert Content-Disposition: inline In-Reply-To: <871qxseeet.fsf@yahoo.com> Received-SPF: pass client-ip=2a01:4f8:fff0:65::8:228; envelope-from=alan@idiocy.org; helo=outbound.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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:288701 Archived-At: --lUpuP97l22EUC3Kp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 20, 2022 at 09:23:22AM +0800, Po Lu wrote: > Alan Third writes: > > > The attached should fix this particular error. > > What about this one? > > >> nsmenu.m:678: error: 'NSTextAlignmentRight' undeclared (first use in > >> this function) > > I think we used to insert spaces to align the keys on the right, judging > by an old copy of the code, but I'm not sure. There's no need to go back to code that didn't work just because Apple incorrectly documents their enums. -- Alan Third --lUpuP97l22EUC3Kp Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v3-0001-Fix-nsmenu-compilation-under-macOS-10.6.patch" >From aba5cce5fa846094f6cbb78658d69ea0e3af7a96 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Tue, 19 Apr 2022 05:05:17 +0100 Subject: [PATCH v3] Fix nsmenu compilation under macOS 10.6 * src/nsmenu.m ([EmacsMenu fillWithWidgetValue:]): Replace modern shorthand dictionary and array definitions. * src/nsterm.h (NSTextAlignmentRight): Redefine if necessary. --- src/nsmenu.m | 10 ++++++---- src/nsterm.h | 2 +- 2 files changed, 7 insertions(+), 5 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 */ diff --git a/src/nsterm.h b/src/nsterm.h index 4cba5c0be8..4cb7475235 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1290,8 +1290,8 @@ #define NSWindowStyleMaskUtilityWindow NSUtilityWindowMask #define NSAlertStyleCritical NSCriticalAlertStyle #define NSControlSizeRegular NSRegularControlSize #define NSCompositingOperationCopy NSCompositeCopy +#define NSTextAlignmentRight NSRightTextAlignment -/* And adds NSWindowStyleMask. */ #ifdef __OBJC__ typedef NSUInteger NSWindowStyleMask; #endif -- 2.35.1 --lUpuP97l22EUC3Kp--