OSDN Git Service

Define _LIBCPP_HAS_TIMESPEC_GET for FreeBSD when appropriate
authorDimitry Andric <dimitry@andric.com>
Thu, 30 Jan 2020 07:00:28 +0000 (08:00 +0100)
committerDimitry Andric <dimitry@andric.com>
Thu, 30 Jan 2020 07:00:56 +0000 (08:00 +0100)
commit5e416ba943b7c737deb8eca62756f7b4fa925845
treea970851947b7458a030260579c4afba15071cf68
parent007a6a155c7ecaebb26fec9e18303b7419c7bffe
Define _LIBCPP_HAS_TIMESPEC_GET for FreeBSD when appropriate

Summary:
FreeBSD got `timespec_get` support somewhere in the 12.x timeframe, but
the C++ version check in its system headers was written incorrectly.
This has now been fixed for both FreeBSD 13 and 12.

Add checks for the corresponding `__FreeBSD_version` values, to define
`_LIBCPP_HAS_TIMESPEC_GET` when the function is supported.

Reviewers: emaste, EricWF, ldionne, mclow.lists

Reviewed By: ldionne

Subscribers: arichardson, krytarowski, christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D71522
libcxx/include/__config