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