Subject: bug#21862: Acknowledgement (24.5; Commit 35cd5181450 breaks nsterm.m on Mac OS X 10.6)

From: Anders Lindgren <[email-masked]>
Date: Tue, 10 Nov 2015 22:39:25 +0100

Hi,

Unfortunately, when I compile on my 10.6.8 machine I get the following
warnings:

nsterm.m: In function ‘-[EmacsView windowWillEnterFullScreen:]’:
nsterm.m:6875: warning: ‘EmacsView’ may not respond to
‘-windowWillEnterFullScreen’
nsterm.m:6875: warning: (Messages without a matching method signature
nsterm.m:6875: warning: will be assumed to return ‘id’ and accept
nsterm.m:6875: warning: ‘...’ as arguments.)
nsterm.m: In function ‘-[EmacsView windowDidEnterFullScreen]’:
nsterm.m:6887: warning: passing argument 1 of
‘notificationWithName:object:’ from incompatible pointer type
nsterm.m:6887: warning: ‘EmacsView’ may not respond to
‘-windowDidEnterFullScreen:’
nsterm.m: In function ‘-[EmacsView windowWillExitFullScreen:]’:
nsterm.m:6925: warning: ‘EmacsView’ may not respond to
‘-windowWillExitFullScreen’
nsterm.m: In function ‘-[EmacsView windowDidExitFullScreen:]’:
nsterm.m:6942: warning: ‘EmacsView’ may not respond to ‘-windowDid

The attached patch eliminate them. Basically, it's declarations of the new
(and shadowed) functions and the notification name should be a NSString
(i.e. a @ was missing).

    -- Anders

On Tue, Nov 10, 2015 at 10:02 PM, David Reitter <[email-masked]>
wrote:

> Hi David (and Anders),
>
> I have checked in some changes that should allow compilation on 10.6.8.
> I do not have a machine to test, so please reopen this bug in case you
> encounter a problem.
>
> - David
>
>
> > On Nov 10, 2015, at 2:37 PM, David Caldwell <[email-masked]> wrote:
> >
> > Hi David, I'm pulling you in to this bug report since it is about your
> > commit.
> >
> > I tried reverting the commit in question
> > (35cd51814507987b916c4b4e0a7b45e09e454341) and I don't see any warning
> > generated with the latest XCode (Version 7.1.1 (7B1005)). Where were you
> > seeing these warnings?
> >
> > -David
> >
> >
>
>
diff --git a/src/nsterm.h b/src/nsterm.h
index 1b330f0..a2f344e 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -412,6 +412,11 @@ void nstrace_leave(int *);
 - (void)windowDidMove: (id)sender;
 #endif
 - (int)fullscreenState;
+- (void)windowWillEnterFullScreen;
+- (void)windowDidEnterFullScreen;
+- (void)windowDidEnterFullScreen:(NSNotification *)notification;
+- (void)windowWillExitFullScreen;
+- (void)windowDidExitFullScreen;
 @end

diff --git a/src/nsterm.m b/src/nsterm.m
index 5c39d5c..a2b18cc 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6867,7 +6867,7 @@ not_in_argv (NSString *arg)
 #endif
 
 #if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-#define NSWindowDidEnterFullScreenNotification "NSWindowDidEnterFullScreenNotification"
+#define NSWindowDidEnterFullScreenNotification @"NSWindowDidEnterFullScreenNotification"
 #endif
 
 - (void)windowWillEnterFullScreen:(NSNotification *)notification