Add WX_IS_MACOS_AVAILABLE_FULL availability check macro

We could change WX_IS_MACOS_AVAILABLE itself to be a variadic macro, but
this would be significantly more complex and doesn't seem warranted.
This commit is contained in:
Vadim Zeitlin 2019-08-20 11:14:10 +02:00
parent 1d63c8b11d
commit c2e6b86786

View File

@ -18,6 +18,9 @@
#define WX_IS_MACOS_AVAILABLE(major, minor) \
__builtin_available(macOS major ## . ## minor, *)
#define WX_IS_MACOS_AVAILABLE_FULL(major, minor, micro) \
__builtin_available(macOS major ## . ## minor ## . ## micro, *)
// Note that we can't easily forward to API_AVAILABLE macro here, so go
// directly to its expansion instead.
#define WX_API_AVAILABLE_MACOS(major, minor) \
@ -28,6 +31,9 @@
#define WX_IS_MACOS_AVAILABLE(major, minor) \
wxPlatformInfo::Get().CheckOSVersion(major, minor)
#define WX_IS_MACOS_AVAILABLE_FULL(major, minor, micro) \
wxPlatformInfo::Get().CheckOSVersion(major, minor, micro)
#define WX_API_AVAILABLE_MACOS(major, minor)
#endif