Provide std::abs(<floating-point>) in <cmath> on Solaris.
authorEric Fiselier <eric@efcs.ca>
Wed, 18 Mar 2015 15:24:18 +0000 (15:24 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 18 Mar 2015 15:24:18 +0000 (15:24 +0000)
commitb2c276e4480d9a26b679a59321bdd8fd449e97db
tree5b976614a35e7fcdfd7ca7cd9b10f75d6efb4897
parent2001d1040f14d1dd2107ce47cb7ee5b13ea653b9
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
libcxx/include/cmath