Apple clang ships libc++, which differs from libstdc++ where the sources
relied on it:
- std::atomic<std::shared_ptr<T>> is not provided. AtomicSharedPtr is that
type where the library has it and a mutex-guarded pointer with the same
member functions elsewhere; the AGC driver uses it.
- std::atomic_ref<const T> is not provided; the page span reads go through
a non-const reference.
- std::filesystem::file_time_type::clock::to_sys is not provided;
std::chrono::file_clock::to_sys is.
- std::max and std::min do not deduce across the integer types of the
guest range arithmetic, which is spelled with an explicit type.
- <string> and <initializer_list> are included where the sources and tests
use them.
The mutex attribute now keeps its protocol and priority ceiling the way
FreeBSD's libthr does: the ceiling can be set and read only under
PTHREAD_PRIO_PROTECT (EINVAL otherwise), and setting a protocol resets it
to the highest SCHED_RR priority. Mutexes still do not apply priority
protection; that is listed as a silent stub.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit d10c024f8f)