Commit 57c897d3 authored by Orvid King's avatar Orvid King Committed by Facebook GitHub Bot

Fix definition of folly::remainder for android

Summary: Non-uclibc android wasn't getting folly::remainder defined, so fall back to the STL in that case.

Reviewed By: yfeldblum

Differential Revision: D26196078

fbshipit-source-id: 149b780350bf4aaf6917ecce5e4718c91815c744
parent 8f284aae
...@@ -73,6 +73,7 @@ inline long double nextafter(long double x, long double y) { ...@@ -73,6 +73,7 @@ inline long double nextafter(long double x, long double y) {
* Implement it using builtin versions * Implement it using builtin versions
*/ */
#ifdef __UCLIBC__ #ifdef __UCLIBC__
constexpr float remainder(float x, float y) { constexpr float remainder(float x, float y) {
return __builtin_remainderf(x, y); return __builtin_remainderf(x, y);
} }
...@@ -84,6 +85,13 @@ constexpr double remainder(double x, double y) { ...@@ -84,6 +85,13 @@ constexpr double remainder(double x, double y) {
constexpr long double remainder(long double x, long double y) { constexpr long double remainder(long double x, long double y) {
return __builtin_remainderl(x, y); return __builtin_remainderl(x, y);
} }
#else
// Fallback to STL if not uclibc.
/* using override */ using std::remainder;
#endif // __UCLIBC__ #endif // __UCLIBC__
#endif // !__ANDROID__ && !__UCLIBC__ #endif // !__ANDROID__ && !__UCLIBC__
......
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