[webkit-dev] Removing BUILDING_ON / TARGETING macros in favor of system availability macros
Mark Mentovai
mark at chromium.org
Wed Jul 11 18:22:59 PDT 2012
Mark Rowe wrote:
> TN2064 appears to have been last modified in 2003, so it predates the
> existence of Availability.h.
>
Well, that’s about as long as I’ve been writing SDK- and
deployment-target-aware code…
Availability.h was introduced with the iOS SDK in order to support
> availability macros that are compatible with both OS X and iOS, where the
> older macros from AvailabilityMacros.h were specific to OS X.
>
Cool. Other than double-underscore paranoia, there’s no real difference or
complaint from me.
I guess the one drawback shared by <Availability.h>,
<AvailabilityMacros.h>, and the outgoing BUILDING_ON_*/TARGETING_* macros
is that if you forget to #include the right header, the preprocessor
silently does something that you’re probably not expecting. Using a
function-like macro like USE(), OS(), and PLATFORM() would help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120711/2f4d56af/attachment.html>
More information about the webkit-dev
mailing list