Commit e265e1ef authored by Amol Bhave's avatar Amol Bhave Committed by Facebook Github Bot

Add builtin folly::nextafter when using uclibc

Summary:
When building using uclibc, std::nextafter doesn't exist. This is
similar case as for android, where std::nextafter doesn't exist.
Add additional condition to choose folly supplied versions of this function.

Reviewed By: yfeldblum

Differential Revision: D15291534

fbshipit-source-id: f6c9e213248f4e2a6e88e20578aeade46dc85d6b
parent b8d837fc
......@@ -20,7 +20,7 @@
namespace folly {
#ifndef __ANDROID__
#if !defined(__ANDROID__) && !defined(__UCLIBC__)
/**
* Most platforms hopefully provide std::nextafter.
......@@ -28,13 +28,13 @@ namespace folly {
/* using override */ using std::nextafter;
#else // !__ANDROID__
#else // !__ANDROID__ && !__UCLIBC__
/**
* On Android, std::nextafter isn't implemented. However, the C functions and
* compiler builtins are still provided. Using the GCC builtin is actually
* slightly faster, as they're constexpr and the use cases within folly are in
* constexpr context.
* On Android and uclibc, std::nextafter isn't implemented. However, the C
* functions and compiler builtins are still provided. Using the GCC builtin is
* actually slightly faster, as they're constexpr and the use cases within folly
* are in constexpr context.
*/
#if defined(__GNUC__) && !defined(__clang__)
......@@ -67,5 +67,5 @@ inline long double nextafter(long double x, long double y) {
#endif // __GNUC__
#endif // __ANDROID__
#endif // !__ANDROID__ && !__UCLIBC__
} // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment