bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27810: NS runtime feature detection


From: Alan Third
Subject: bug#27810: NS runtime feature detection
Date: Wed, 26 Jul 2017 22:57:46 +0100
User-agent: Mutt/1.7.2 (2016-11-26)

On Mon, Jul 24, 2017 at 09:44:04PM +0100, Alan Third wrote:
> > 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...
> 
> I’m unclear where we should be using MIN_REQUIRED vs MAX_ALLOWED, but
> I think we’re OK with MAX everywhere for what we’re doing. I’ve just
> used MAX in both my new macros.

I think I finally worked it out by reading macfont.m. I’ve attached
YET ANOTHER version of this which doesn't use any custom macros.

To compile for multiple versions you do something like:

./configure --with-ns CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1070 
-DMAC_OS_X_VERSION_MAX_ALLOWED=101200 -g -O3"

By default max and min are set to the version you’re running on,
afaict. Please be aware that 10.6 isn’t fully compatible with this at
the moment, as there is at least one place (nsmenu.m:535) where
there’s a bug fix for it that I can’t see an immediate way of making
dynamic.

Additionally the native fullscreen stuff is based on a simple check
against MAX. I expect I’ll be able to fix that with a bit of work,
though.

I’d be interested to see if this builds on systems lower than 10.10
with the above configure command. There are probably bits and pieces
I’ve not quite got right.

-- 
Alan Third

Attachment: 0001-Allow-use-of-run-time-OS-version-checks-on-macOS-bug.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]