From: "Charles A. Roelli" <charles@aurox.ch>
To: Alan Third <alan@idiocy.org>, Anders Lindgren <andlind@gmail.com>
Cc: Paul Michael Reilly <pmr@pajato.com>,
Jean-Christophe Helary <jean.christophe.helary@gmail.com>,
Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: NS runtime feature detection
Date: Mon, 24 Jul 2017 21:02:57 +0200 [thread overview]
Message-ID: <508a4930-feab-588b-0ab9-f55a10ea85ec@aurox.ch> (raw)
In-Reply-To: <20170723121701.GA3730@breton.holly.idiocy.org>
Thanks for taking the initiative with this. Maybe it's time to open a bug?
When I try to compile with the patch applied, with this block:
@@ -7349,7 +7365,11 @@ - (void)windowDidEnterFullScreen /* provided for
direct calls */
{
BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO;
#ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_6
+ /* These two values are only defined in 10.7 and above. */
+ int NSApplicationPresentationFullScreen = (1 << 10);
+ int NSApplicationPresentationAutoHideToolbar = (1 << 11);
+#endif
unsigned val = (unsigned)[NSApp presentationOptions];
while building with:
./configure --with-ns --enable-macos-runtime-feature-detection && make
I got these errors:
nsterm.m: In function ‘-[EmacsView windowDidEnterFullScreen]’:
nsterm.m:7395: error: ‘NSApplicationPresentationFullScreen’ undeclared
(first use in this function)
nsterm.m:7395: error: (Each undeclared identifier is reported only once
nsterm.m:7395: error: for each function it appears in.)
nsterm.m:7396: error: ‘NSApplicationPresentationAutoHideToolbar’
undeclared (first use in this function)
(line numbers are off due to an intervening commit)
I'm confused why the macro call you wrote doesn't prevent this. But
when I change it to #if MAC_OS_X_VERSION_MIN_ALLOWED <=
MAC_OS_X_VERSION_10_6, then it compiles. This min/max stuff always
confuses me...
On 23/07/2017 14:17, Alan Third wrote:
> On Sat, Jul 22, 2017 at 12:22:30PM +0100, Alan Third wrote:
>> Or perhaps we provide a flag that enables a universal binary build
>> that doesn’t bother about hiding the warnings?
> Attached is a first attempt at this in nsterm.m. I think I’ve got
> everything, but there may be some new variables and things defined
> that I’ve missed which will throw up errors in older macOS versions.
>
> It seems ‘universal binary’ means something specific, so I went with a
> different name.
>
> Use:
>
> ./configure --with-ns --enable-macos-runtime-feature-detection
>
> It will give a lot of deprecation and unknown method warnings, but
> hopefully that’s all.
>
> If you build normally there should be no (new) warnings or errors.
next prev parent reply other threads:[~2017-07-24 19:02 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 11:29 Mac OS Sierra tab feature breaks C-x 5 2 Paul Michael Reilly
2017-07-06 12:14 ` Jean-Christophe Helary
2017-07-06 12:46 ` Sebastian Christ
2017-07-06 12:53 ` Alan Third
2017-07-06 14:35 ` Alan Third
2017-07-06 15:05 ` Jean-Christophe Helary
2017-07-06 17:42 ` Alan Third
2017-07-06 22:16 ` Alan Third
2017-07-10 19:17 ` Anders Lindgren
2017-07-10 19:52 ` Alan Third
2017-07-10 20:22 ` Anders Lindgren
2017-07-12 18:23 ` Alan Third
2017-07-12 21:20 ` Anders Lindgren
2017-07-13 20:22 ` Alan Third
2017-07-16 18:43 ` Anders Lindgren
2017-07-16 23:01 ` Alan Third
2017-07-17 20:09 ` Charles A. Roelli
2017-07-18 6:06 ` Anders Lindgren
2017-07-18 18:33 ` Charles A. Roelli
2017-07-18 22:16 ` Alan Third
2017-07-19 4:57 ` Charles A. Roelli
2017-07-21 20:31 ` Anders Lindgren
2017-07-22 11:22 ` Alan Third
2017-07-23 12:17 ` NS runtime feature detection (was: Mac OS Sierra tab feature breaks C-x 5 2) Alan Third
2017-07-24 19:02 ` Charles A. Roelli [this message]
2017-07-24 20:44 ` bug#27810: NS runtime feature detection Alan Third
2017-07-24 20:53 ` Glenn Morris
2017-07-25 17:56 ` Alan Third
2017-07-25 18:22 ` Charles A. Roelli
2017-07-25 20:08 ` Anders Lindgren
2017-07-26 21:57 ` Alan Third
2017-07-31 19:05 ` Charles A. Roelli
2017-08-01 15:38 ` Anders Lindgren
2017-08-01 22:03 ` Alan Third
2017-08-06 20:29 ` Charles A. Roelli
2017-08-06 21:29 ` Alan Third
2017-08-07 19:23 ` Charles A. Roelli
2017-08-10 21:04 ` Alan Third
2017-08-12 11:13 ` Charles A. Roelli
2017-08-12 13:02 ` Charles A. Roelli
2017-08-16 20:31 ` Alan Third
2017-08-12 15:51 ` Alan Third
2017-09-12 20:01 ` David Caldwell
2017-09-12 20:06 ` David Reitter
2017-09-12 20:34 ` Alan Third
2017-09-12 20:29 ` Alan Third
2017-09-13 19:03 ` Charles A. Roelli
2017-07-24 20:45 ` Alan Third
2017-07-23 22:35 ` Mac OS Sierra tab feature breaks C-x 5 2 Tim Cross
-- strict thread matches above, loose matches on Subject: below --
2017-07-24 20:22 bug#27810: macOS runtime feature detection Alan Third
2017-07-26 2:59 ` Richard Stallman
2017-07-26 16:06 ` Alan Third
2017-07-27 1:43 ` Richard Stallman
2017-07-27 17:31 ` Eli Zaretskii
2017-07-28 17:14 ` Richard Stallman
2017-07-28 17:36 ` Eli Zaretskii
2017-07-29 19:04 ` Richard Stallman
2017-07-31 0:45 ` Richard Stallman
2017-07-29 19:07 ` Richard Stallman
2017-07-30 12:12 ` Alan Third
2017-07-30 14:15 ` Eli Zaretskii
2017-07-31 0:47 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=508a4930-feab-588b-0ab9-f55a10ea85ec@aurox.ch \
--to=charles@aurox.ch \
--cc=alan@idiocy.org \
--cc=andlind@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jean.christophe.helary@gmail.com \
--cc=pmr@pajato.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.