diff --git a/include/cxx/cmath b/include/cxx/cmath index c6711b6aba..589ff40ff9 100644 --- a/include/cxx/cmath +++ b/include/cxx/cmath @@ -30,6 +30,12 @@ #include +#undef signbit +#undef fpclassify +#undef isfinite +#undef isinf +#undef isnan + //*************************************************************************** // Namespace //*************************************************************************** @@ -54,6 +60,7 @@ namespace std using ::frexpf; using ::ldexpf; using ::logf; + using ::log1pf; using ::log10f; using ::log2f; using ::modff; @@ -66,6 +73,29 @@ namespace std using ::tanhf; using ::gamma; using ::lgamma; + + constexpr bool + signbit(float __x) + { return __builtin_signbit(__x); } + + constexpr int + fpclassify(float __x) + { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __x); } + + constexpr bool + isfinite(float __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isinf(float __x) + { return __builtin_isinf(__x); } + + constexpr bool + isnan(float __x) + { return __builtin_isnan(__x); } + + #endif #ifdef CONFIG_HAVE_DOUBLE @@ -83,6 +113,7 @@ namespace std using ::frexp; using ::ldexp; using ::log; + using ::log1p; using ::log10; using ::log2; using ::modf; @@ -93,6 +124,28 @@ namespace std using ::sqrt; using ::tan; using ::tanh; + + constexpr bool + signbit(double __x) + { return __builtin_signbit(__x); } + + constexpr int + fpclassify(double __x) + { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __x); } + + constexpr bool + isfinite(double __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isinf(double __x) + { return __builtin_isinf(__x); } + + constexpr bool + isnan(double __x) + { return __builtin_isnan(__x); } + #endif #ifdef CONFIG_HAVE_LONG_DOUBLE @@ -110,6 +163,7 @@ namespace std using ::frexpl; using ::ldexpl; using ::logl; + using ::log1pl; using ::log10l; using ::log2l; using ::modfl; @@ -120,6 +174,28 @@ namespace std using ::sqrtl; using ::tanl; using ::tanhl; + + constexpr bool + signbit(long double __x) + { return __builtin_signbit(__x); } + + constexpr int + fpclassify(long double __x) + { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __x); } + + constexpr bool + isfinite(long double __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isinf(long double __x) + { return __builtin_isinf(__x); } + + constexpr bool + isnan(long double __x) + { return __builtin_isnan(__x); } + #endif } diff --git a/include/cxx/cstdarg b/include/cxx/cstdarg index 8725369f1a..d8456d3f0f 100644 --- a/include/cxx/cstdarg +++ b/include/cxx/cstdarg @@ -27,8 +27,14 @@ #include + //*************************************************************************** // Namespace //*************************************************************************** +namespace std +{ + using ::va_list; +} + #endif // __INCLUDE_CXX_CSTDARG diff --git a/include/cxx/ctime b/include/cxx/ctime index 3f00c087fd..ae4f14f280 100644 --- a/include/cxx/ctime +++ b/include/cxx/ctime @@ -45,6 +45,8 @@ namespace std using ::clock_gettime; using ::mktime; using ::gmtime_r; + using ::gmtime; + using ::strftime; using ::timer_create; using ::timer_delete; using ::timer_settime;