[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MAC_OS_X_VERSION macros
From: |
David Chisnall |
Subject: |
Re: MAC_OS_X_VERSION macros |
Date: |
Mon, 1 Jul 2013 09:23:08 +0100 |
On 1 Jul 2013, at 09:16, Richard Frith-Macdonald <address@hidden> wrote:
> If we have a macro to alter the version at the point of use (rather than
> redefining the macro), we can use the Apple variants directly on an OSX
> system ... which means if someone includes Apple headers later on in the
> code, those headers will see the Apple version numbers and won't be broken by
> strange GNUstep versions. At the same time, and existing GNUstep code will
> continue to work without alteration on all other operating systems, because
> there we will still have the support for the 6 digit version numbers working.
Note that Apple doesn't actually use these macros for much anymore. They have
a clang flag that specifies the target OS X / iOS version and this is used in
all of the header checks. This allows a single precompiled header to work for
all deployment targets (which is nice) and also allows the compiler to provide
more helpful error messages.
I'd like to generalise this to be a -fframework-version={framework
name}-{version} so that you can use something like
__attribute__((framework_available(gnustep,1.7, 1.9)) to specify something that
is only available when compiled for GNUstep 1.7 to 1.9 (for example).
David
-- Sent from my PDP-11