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: Tue, 1 Aug 2017 23:03:39 +0100
User-agent: Mutt/1.7.2 (2016-11-26)

On Tue, Aug 01, 2017 at 05:38:03PM +0200, Anders Lindgren wrote:
> It's always a good idea to enable warnings when undefined preprocessor
> symbols are used. In gcc this is -Wundef and I gess it's the same in clang.

Unfortunately this produces an absolute ton of spurious warnings which
scroll off my terminal buffer. I think I’ve caught all the important
ones now, though.

I’ve attached my latest go with this. I’ve removed the
MAC_OS_X_VERSION_10_XX macros with their numbers, as we can use the
existence of the macros to tell what platform we’re compiling on. Eg.

    #if !defined (MAC_OS_X_VERSION_10_7) \
      && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070

I’ve also used the NSAppKitVersionNumber macros in a few places to do
runtime version detection. I’m not sure this is reliable. There are
two methods of finding the OS version definitively, which we can use
if we need to.

I’ve got rid of the HAS_NATIVE_FS macro and tried to replace it with
other checks where required. It compiles on 10.12, but I’m not at all
convinced it will compile on 10.6.

New 10.7 variables that need to be available on 10.6 when we’re
compiling for 10.7+ have been added near the bottom of nsterm.h.

Overall it looks quite different in places, but the functionality
hasn’t really changed.
-- 
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]