1 // Copyright 2012 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_MAC_MAC_UTIL_H_ 6 #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_MAC_MAC_UTIL_H_ 7 8 #include <AvailabilityMacros.h> 9 #include <CoreGraphics/CoreGraphics.h> 10 11 #include "partition_alloc/partition_alloc_base/component_export.h" 12 13 namespace partition_alloc::internal::base::mac { 14 15 // MacOSMajorVersion() returns the major version number (e.g. macOS 12.6.5 16 // returns 12) of the macOS currently running. Use for runtime OS version 17 // checking. Prefer to use @available in Objective-C files. Note that this does 18 // not include any Rapid Security Response (RSR) suffixes (the "(a)" at the end 19 // of version numbers.) 20 PA_COMPONENT_EXPORT(PARTITION_ALLOC_BASE) 21 __attribute__((const)) int MacOSMajorVersion(); 22 23 } // namespace partition_alloc::internal::base::mac 24 25 #endif // PARTITION_ALLOC_PARTITION_ALLOC_BASE_MAC_MAC_UTIL_H_ 26