diff options
| author | Eric Fiselier <eric@efcs.ca> | 2015-03-18 15:24:18 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2015-03-18 15:24:18 +0000 |
| commit | b2c276e4480d9a26b679a59321bdd8fd449e97db (patch) | |
| tree | 5b976614a35e7fcdfd7ca7cd9b10f75d6efb4897 /libcxx/include/cmath | |
| parent | 2001d1040f14d1dd2107ce47cb7ee5b13ea653b9 (diff) | |
| download | bcm5719-llvm-b2c276e4480d9a26b679a59321bdd8fd449e97db.tar.gz bcm5719-llvm-b2c276e4480d9a26b679a59321bdd8fd449e97db.zip | |
Provide std::abs(<floating-point>) in <cmath> on Solaris.
1) <cstdlib> header should define std::abs([int|long|long long])
functions. They use "using ::abs" to import these functions (which are
declared in <stdlib.h>) into std namespace.
2) <cmath> header should define std::abs([float|double|long double])
function. If we try define new functions in std namespace, then it
will cause compile error in <cstdlib> because "using ::abs" will try
import not only [int|long|long long] functions, but also
[float|double|long double] which are defined in <math.h> header on
solaris.
Patch by C Bergstrom.
llvm-svn: 232641
Diffstat (limited to 'libcxx/include/cmath')
| -rw-r--r-- | libcxx/include/cmath | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/cmath b/libcxx/include/cmath index b340b4d50f0..5f9aaedd5af 100644 --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -654,6 +654,10 @@ using ::double_t; // abs +#if defined(__sun__) +using ::abs; +#endif + #if !defined(_AIX) && !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float |

