X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=include%2Fc99_math.h;h=e906c26aa543bc1adfd1bc341aba47886442466b;hb=a96d92a689a3e6112b5e2b4cc1b99b1152d7961a;hp=250e08d44cff9b0225704ac261da6d2c23bdef5c;hpb=0d4898ae8068d3984242775a6fcc87f280c0ac5a;p=mesa.git diff --git a/include/c99_math.h b/include/c99_math.h index 250e08d44cf..e906c26aa54 100644 --- a/include/c99_math.h +++ b/include/c99_math.h @@ -185,4 +185,27 @@ fpclassify(double x) #endif +/* Since C++11, the following functions are part of the std namespace. Their C + * counteparts should still exist in the global namespace, however cmath + * undefines those functions, which in glibc 2.23, are defined as macros rather + * than functions as in glibc 2.22. + */ +#if __cplusplus >= 201103L && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23)) +#include + +using std::fpclassify; +using std::isfinite; +using std::isinf; +using std::isnan; +using std::isnormal; +using std::signbit; +using std::isgreater; +using std::isgreaterequal; +using std::isless; +using std::islessequal; +using std::islessgreater; +using std::isunordered; +#endif + + #endif /* #define _C99_MATH_H_ */