From c2e6b86786d1e5b031bbb1c6f4579a4f92adbfdd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 20 Aug 2019 11:14:10 +0200 Subject: [PATCH] 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. --- include/wx/osx/private/available.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/wx/osx/private/available.h b/include/wx/osx/private/available.h index dc61cccd38..a4f6ecb290 100644 --- a/include/wx/osx/private/available.h +++ b/include/wx/osx/private/available.h @@ -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