Index: include/cmath =================================================================== --- include/cmath +++ include/cmath @@ -331,7 +331,6 @@ using ::abs; #endif -#ifndef __sun__ using ::acos; using ::acosf; using ::asin; @@ -346,54 +345,44 @@ using ::cosf; using ::cosh; using ::coshf; -#endif // __sun__ using ::exp; using ::expf; -#ifndef __sun__ using ::fabs; using ::fabsf; using ::floor; using ::floorf; -#endif //__sun__ using ::fmod; using ::fmodf; -#ifndef __sun__ using ::frexp; using ::frexpf; using ::ldexp; using ::ldexpf; -#endif // __sun__ using ::log; using ::logf; -#ifndef __sun__ using ::log10; using ::log10f; using ::modf; using ::modff; -#endif // __sun__ using ::pow; using ::powf; -#ifndef __sun__ using ::sin; using ::sinf; using ::sinh; using ::sinhf; -#endif // __sun__ using ::sqrt; using ::sqrtf; using ::tan; using ::tanf; -#ifndef __sun__ using ::tanh; using ::tanhf; @@ -449,14 +438,12 @@ using ::lround; using ::lroundf; #endif // _LIBCPP_MSVCRT -#endif // __sun__ #ifndef _LIBCPP_MSVCRT using ::nan; using ::nanf; #endif // _LIBCPP_MSVCRT -#ifndef __sun__ #ifndef _LIBCPP_MSVCRT using ::nearbyint; using ::nearbyintf; @@ -547,11 +534,6 @@ using ::truncl; #endif // !_LIBCPP_MSVCRT -#else -using ::lgamma; -using ::lgammaf; -#endif // __sun__ - #if _LIBCPP_STD_VER > 14 inline _LIBCPP_INLINE_VISIBILITY float hypot( float x, float y, float z ) { return sqrt(x*x + y*y + z*z); } inline _LIBCPP_INLINE_VISIBILITY double hypot( double x, double y, double z ) { return sqrt(x*x + y*y + z*z); } Index: include/math.h =================================================================== --- include/math.h +++ include/math.h @@ -636,11 +636,9 @@ #endif // isunordered -#ifndef __sun__ - // abs -#if !defined(_AIX) +#if !(defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);} @@ -652,11 +650,11 @@ inline _LIBCPP_INLINE_VISIBILITY long double abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);} -#endif // !defined(_AIX) +#endif // !(defined(_AIX) || defined(__sun__)) // acos -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return acosf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);} #endif @@ -668,7 +666,7 @@ // asin -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float asin(float __lcpp_x) _NOEXCEPT {return asinf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return asinl(__lcpp_x);} #endif @@ -680,7 +678,7 @@ // atan -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float atan(float __lcpp_x) _NOEXCEPT {return atanf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return atanl(__lcpp_x);} #endif @@ -692,7 +690,7 @@ // atan2 -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT {return atan2f(__lcpp_y, __lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return atan2l(__lcpp_y, __lcpp_x);} #endif @@ -715,7 +713,7 @@ // ceil -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float ceil(float __lcpp_x) _NOEXCEPT {return ceilf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ceill(__lcpp_x);} #endif @@ -727,7 +725,7 @@ // cos -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float cos(float __lcpp_x) _NOEXCEPT {return cosf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return cosl(__lcpp_x);} #endif @@ -739,7 +737,7 @@ // cosh -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float cosh(float __lcpp_x) _NOEXCEPT {return coshf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return coshl(__lcpp_x);} #endif @@ -751,7 +749,7 @@ // exp -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float exp(float __lcpp_x) _NOEXCEPT {return expf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return expl(__lcpp_x);} #endif @@ -763,7 +761,7 @@ // fabs -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float fabs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);} #endif @@ -775,7 +773,7 @@ // floor -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float floor(float __lcpp_x) _NOEXCEPT {return floorf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return floorl(__lcpp_x);} #endif @@ -787,7 +785,7 @@ // fmod -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fmodf(__lcpp_x, __lcpp_y);} inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmodl(__lcpp_x, __lcpp_y);} #endif @@ -810,7 +808,7 @@ // frexp -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexpf(__lcpp_x, __lcpp_e);} inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexpl(__lcpp_x, __lcpp_e);} #endif @@ -822,7 +820,7 @@ // ldexp -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexpf(__lcpp_x, __lcpp_e);} inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexpl(__lcpp_x, __lcpp_e);} #endif @@ -834,7 +832,7 @@ // log -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return logf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return logl(__lcpp_x);} #endif @@ -846,7 +844,7 @@ // log10 -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float log10(float __lcpp_x) _NOEXCEPT {return log10f(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return log10l(__lcpp_x);} #endif @@ -858,14 +856,14 @@ // modf -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT {return modff(__lcpp_x, __lcpp_y);} inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return modfl(__lcpp_x, __lcpp_y);} #endif // pow -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return powf(__lcpp_x, __lcpp_y);} inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return powl(__lcpp_x, __lcpp_y);} #endif @@ -888,7 +886,7 @@ // sin -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float sin(float __lcpp_x) _NOEXCEPT {return sinf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return sinl(__lcpp_x);} #endif @@ -900,7 +898,7 @@ // sinh -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float sinh(float __lcpp_x) _NOEXCEPT {return sinhf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return sinhl(__lcpp_x);} #endif @@ -912,21 +910,19 @@ // sqrt -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __lcpp_x) _NOEXCEPT {return sqrtf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return sqrtl(__lcpp_x);} #endif -#endif // __sun__ template inline _LIBCPP_INLINE_VISIBILITY typename std::enable_if::value, double>::type sqrt(_A1 __lcpp_x) _NOEXCEPT {return sqrt((double)__lcpp_x);} -#ifndef __sun__ // tan -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float tan(float __lcpp_x) _NOEXCEPT {return tanf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return tanl(__lcpp_x);} #endif @@ -938,7 +934,7 @@ // tanh -#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX)) +#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) inline _LIBCPP_INLINE_VISIBILITY float tanh(float __lcpp_x) _NOEXCEPT {return tanhf(__lcpp_x);} inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return tanhl(__lcpp_x);} #endif @@ -1410,7 +1406,6 @@ trunc(_A1 __lcpp_x) _NOEXCEPT {return trunc((double)__lcpp_x);} #endif // !_LIBCPP_MSVCRT -#endif // __sun__ } // extern "C++"