[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration o
From: |
Po Lu |
Subject: |
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat' |
Date: |
Mon, 18 Apr 2022 09:39:41 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
Keith David Bershatsky <esq@lawlist.com> 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
- Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', (continued)
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', Keith David Bershatsky, 2022/04/17
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', Keith David Bershatsky, 2022/04/17
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', Keith David Bershatsky, 2022/04/17
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', Keith David Bershatsky, 2022/04/17
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', Keith David Bershatsky, 2022/04/18
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', Keith David Bershatsky, 2022/04/18
Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat', Keith David Bershatsky, 2022/04/18