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: Mon, 18 Apr 2022 09:39:41 +0800 Message-ID: <871qxvmaoy.fsf@yahoo.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8711"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Paul Eggert , Alan Third , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , emacs-devel@gnu.org To: Keith David Bershatsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 18 03:41:32 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 1ngGOR-00027Q-Ir for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Apr 2022 03:41:31 +0200 Original-Received: from localhost ([::1]:46834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngGOP-00054n-Vn for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Apr 2022 21:41:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngGMy-00049g-4I for emacs-devel@gnu.org; Sun, 17 Apr 2022 21:40:00 -0400 Original-Received: from sonic314-21.consmr.mail.ne1.yahoo.com ([66.163.189.147]:42466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngGMw-0004ij-38 for emacs-devel@gnu.org; Sun, 17 Apr 2022 21:39:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650245994; bh=hyttyOTzlodus29aB0WoeMkxm4yeU8B/rVfVf4+YA8s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=jG1jlh5VMpXYZb1Unbq4KXnPWn36R3n4+Y3x9YduGKGdLiHBrES1OCuQJcZEpWumsvVOoFKbcesmWGrTzJOufbMeRkUVGuGuUsAd0s9uGMnUuWbwaI57NWzQUcQ+xbh76WgbE9KhGIjFW5auNFTIEOFdp2F2R+QxyHlG1rcetI/4AIftmkRC/n08yZ23J92jdwrnA0YV1OPZ3tedX1lcgm69TY+aih7DVNGt42CBaDyU4X2y9jt8GMz3+dX8DmHfTAePc6R5eJuuGjzPMGEk3td9krO1vgCnvoplZE2Y96nRwAmBzu1/4AhWEEYTX3cSPZHklT/5hyHT4UaZiZoNKQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650245994; bh=E8O5LRP87Rz9W4GmBUt+9O3T16l01Xr41TkrFgm9ei6=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ihG9rZgZRlRjI8M/cV9Zjxt60rGPwrGGupv3Q5dEAq4sSs3FfMJHsoOnJ7HuNBeSDEseYwliBpWQiiWE3MWn3HnuYd0RF0ENaFGgwBZxqhzg/lhiNMC+vJK1qCFlytZvJLRD86m5b/grj+TcwSsytnfqRTPokcn5FXcsEgd0tFh6G5DnDUeJ98w7m82J4bDLsrxMseO0FI/9ZKRLota9wFR4B5Ed4SiJ5YnSMtnypu4NaRAlFQYTnytyOerDmD6EiU+hyLamwHOc7tWZ7v8lQiVjdsXb4Su1bxhW6Z/i/qldxNSTCoVTQP2zrZ0HfKEGRA/Sb/npo08RBwTHqkExXg== X-YMail-OSG: xL0c87AVM1mwgnz7FdjhndD0zbuYOiR3iw4nv_vD9BTMljZVkMGJn74197zMfXW Oqi7fElr_5KYTGKb59CxtoSzFZzDwlt6nn3.w5aFOVK53BSse4HrWn5SIe3PVzw6oABuwqcfMBAJ cAqZ2XEKdycdBi4JMRKL_W_vCpZQVFb00wi2hvV14tGRqjNRn3o1H0LAqqhrYK0SGEao0apT40Ru 3mEPaS3qG7D_NkAvjukqqFAd6UZyXPxFGY4yHEsyIWyA_gRIbWw8QkuRvAxoiict.0z4cCxc7UCv h92Ygm7FDnoN8GeJXw2kaHs6HsD2a1lnxZAyeFy338eO.DoKbCpET.MHgEBgoeUbMnWr4P7aP2ph AjKnBjSkLKq5lLgD4JW.BI0RDA7YQygXMQ3.qS_6jG0y0gpR_R97GhXA1O8Qbg2fUvgBlu7nvJpA l5aXbLtck9ZNIjdGrkN3mrtjm2BOx.yY3X7VfZe7laFQGuhsWzkFX3Ayj3Bhe218EKFckBpSzgIg JCjZjatppzEk5TBIKd32M7.MspWGXkaXSr4l9RkFWRpdn.OuIc3EE3trm3CAuPJ3loJ2eWInokwP rQumTDvmWvSg1Ho1VC5dHgQyMsPwz7woEZ0o1YYvt_413xhqgloCZ85O3Ulnh622DReZfCgr4Mtr SPUL45QvUV7h5LwwYgc8WrskoV4xD4vFNxFCG7XUt95aGH532GeeQ6AEAqfsqjrZv9rMMSRBQAyG thEFsL2ezDJNUm5WhQZCwtGZkLQ0nA9pbg8.oMr3RRI6baqLEUhTt5LFcai9EC7IN6vaMS5bRqHy D8Et0KVaXdaJZ1wqAFmKHkP_hyno2a1GF4umCDe4Lp X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Mon, 18 Apr 2022 01:39:54 +0000 Original-Received: by hermes--canary-production-sg3-cfddc4f9d-gmm6m (VZM Hermes SMTP Server) with ESMTPA ID eafacd0143cee37686968c4a9a5b4bb3; Mon, 18 Apr 2022 01:39:46 +0000 (UTC) In-Reply-To: (Keith David Bershatsky's message of "Sun, 17 Apr 2022 17:38:54 -0700") 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.189.147; envelope-from=luangruo@yahoo.com; helo=sonic314-21.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:288584 Archived-At: Keith David Bershatsky writes: > Yes, sqlite.diff permitted the build on the master branch to advance forward to nsterm.m, where it stopped: > > CC nsterm.o > In file included from nsterm.m:46: > lisp.h:2156: warning: declaration does not declare anything > nsterm.m: In function 'ns_parent_window_rect': > nsterm.m:754: warning: 'NSWindow' may not respond to '-convertRectToScreen:' > nsterm.m:754: warning: (Messages without a matching method signature > nsterm.m:754: warning: will be assumed to return 'id' and accept > nsterm.m:754: warning: '...' as arguments.) > nsterm.m:754: error: incompatible types in assignment > nsterm.m: In function 'ns_frame_scale_factor': > nsterm.m:792: warning: 'NSWindow' may not respond to '-backingScaleFactor' > nsterm.m:792: error: incompatible types in return > nsterm.m: In function '-[EmacsView magnifyWithEvent:]': > nsterm.m:6887: warning: 'NSEvent' may not respond to '-phase' > nsterm.m:6887: error: 'NSEventPhaseBegan' undeclared (first use in this function) > nsterm.m:6887: error: (Each undeclared identifier is reported only once > nsterm.m:6887: error: for each function it appears in.) > nsterm.m: In function '-[EmacsWindow initWithEmacsFrame:fullscreen:screen:]': > nsterm.m:8386: warning: 'EmacsWindow' may not respond to '-setTabbingMode:' > nsterm.m: In function '-[EmacsWindow setParentChildRelationships]': > nsterm.m:8455: error: 'child' undeclared (first use in this function) > nsterm.m:8459: warning: 'EmacsWindow' may not respond to '-setAccessibilitySubrole:' > nsterm.m:8461: warning: 'EmacsWindow' may not respond to '-setAccessibilitySubrole:' > nsterm.m:8491: error: expected ')' before '{' token > nsterm.m:8504: error: expected expression before '}' token > nsterm.m:8515: error: expected ')' before 'if' > nsterm.m:8521: error: expected expression before '}' token > make[1]: *** [nsterm.o] Error 1 > make: *** [src] Error 2 > ~/Desktop/emacs $ Please try the following patch, and test it on a newer Mac OS X as well. I only know it builds on GNUstep. diff --git a/src/nsterm.m b/src/nsterm.m index 550f29212e..e34c7cd45f 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -751,7 +751,19 @@ Free a pool and temporary objects it refers to (callable from C) EmacsView *parentView = FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)); parentRect = [parentView convertRect:[parentView frame] toView:nil]; - parentRect = [[parentView window] convertRectToScreen:parentRect]; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 + if ([[parentView window] respondsToSelector: @selector(convertRectToScreen:)]) +#endif + parentRect = [[parentView window] convertRectToScreen: parentRect]; +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 + else +#endif +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 */ +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 \ + || defined (NS_IMPL_GNUSTEP) + parentRect.origin = [[parentView window] convertBaseToScreen: parentRect.origin]; +#endif } else parentRect = [[[NSScreen screens] objectAtIndex:0] frame]; @@ -789,7 +801,14 @@ Free a pool and temporary objects it refers to (callable from C) ns_frame_scale_factor (struct frame *f) { #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > 1060 - return [[FRAME_NS_VIEW (f) window] backingScaleFactor]; +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 + if ([[FRAME_NS_VIEW (f) window] respondsToSelector: @selector(convertRectToScreen:)]) +#endif + return [[FRAME_NS_VIEW (f) window] backingScaleFactor]; +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 + else + return [[FRAME_NS_VIEW (f) window] userSpaceScaleFactor]; +#endif #else return [[FRAME_NS_VIEW (f) window] userSpaceScaleFactor]; #endif @@ -6869,7 +6888,7 @@ - (void)otherMouseDragged: (NSEvent *)e [self mouseMoved: e]; } -#ifdef NS_IMPL_COCOA +#if defined NS_IMPL_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 - (void) magnifyWithEvent: (NSEvent *) event { NSPoint pt = [self convertPoint: [event locationInWindow] fromView: nil]; @@ -8452,7 +8471,7 @@ - (void)setParentChildRelationships expected later. */ #if MAC_OS_X_VERSION_MIN_REQUIRED < 101000 - if ([child respondsToSelector:@selector(setAccessibilitySubrole:)]) + if ([self respondsToSelector:@selector(setAccessibilitySubrole:)]) #endif /* Set the accessibility subroles. */ if (parentFrame) @@ -8484,7 +8503,7 @@ - (void)setParentChildRelationships #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - if ([ourView respondsToSelector:@selector (toggleFullScreen)] + if ([ourView respondsToSelector:@selector (toggleFullScreen)]) #endif /* If we are the descendent of a fullscreen window and we have no new parent, go fullscreen. */ @@ -8509,11 +8528,11 @@ - (void)setParentChildRelationships #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - if ([ourView respondsToSelector:@selector (toggleFullScreen)] + if ([ourView respondsToSelector:@selector (toggleFullScreen)]) #endif - /* Child frames must not be fullscreen. */ - if ([ourView fsIsNative] && [ourView isFullscreen]) - [ourView toggleFullScreen:self]; + /* Child frames must not be fullscreen. */ + if ([ourView fsIsNative] && [ourView isFullscreen]) + [ourView toggleFullScreen:self]; #endif [parentWindow addChildWindow:self