> On Feb 2, 2024, at 19:04, Joshua Root <[email protected]> wrote:
> 
> __MAC_OS_X_VERSION_MAX_ALLOWED is from AvailabilityInternal.h, which as its 
> name suggests is only intended to be used internally (by Availability.h).

I’m not sure that’s the intention of the file AvailabilityInternal.h. I 
certainly suggests a private API, but I wonder if it’s more intended to hide 
the implementation of Availability.h macros behind a secondary layer of 
abstraction. Availability.h defines the various OS version integers, then 
includes AvailabilityInternal.h, and then checks if 
__<OS_VARIANT>_VERSION_MAX_ALLOWED is defined. I think the 
__MAC_OS_X_VERSION_MAX_ALLOWED macro is allowed to be used publicly.

That being said, including AvailabilityMacros.h and using 
MAC_OS_X_VERSION_MAX_ALLOWED accomplishes the exact same goal, so I don’t know 
which approach is better. I’ll fix the compile time error, and leave it to the 
upstream authors to decide whether to use Availability.h or 
AvailabilityMacros.h.

Thanks for everyone’s help figuring this out!

Link

Reply via email to