PR #2067: Simplify the condition for ABSL_HAVE_PTHREAD_CPU_NUMBER_NP

Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/2067

The conditions are always satisfied based on the macOS [lower bound](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md) that has long moved past the versions being considered here.
Merge 49ed819784 into e3555a1274

Merging this change closes #2067

COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/2067 from h-vetinari:var_rm2 49ed819784
PiperOrigin-RevId: 926184137
Change-Id: I29d9f328d3bc971a22c4dec7c038d30d09c02e36
This commit is contained in:
h-vetinari
2026-06-03 12:09:45 -07:00
committed by Copybara-Service
parent 259108c6b8
commit bbca5fe5b0

View File

@@ -71,15 +71,7 @@
// Checks whether pthread_cpu_number_np is available.
#ifdef ABSL_HAVE_PTHREAD_CPU_NUMBER_NP
#error ABSL_HAVE_PTHREAD_CPU_NUMBER_NP cannot be directly set
#elif defined(__APPLE__) && defined(__has_include) && \
((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 110000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140200) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 70100) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 140200))
#elif defined(__APPLE__)
#define ABSL_HAVE_PTHREAD_CPU_NUMBER_NP 1
#endif