2016-03-30 14:42:27 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include_next <cmath>
|
|
|
|
|
2016-05-18 13:49:08 -03:00
|
|
|
#ifndef WAF_BUILD
|
2016-06-22 10:34:25 -03:00
|
|
|
# ifdef __GLIBC__
|
|
|
|
# if __GLIBC_PREREQ(2, 23)
|
|
|
|
# define GLIBC_FIX_NEEDED 1
|
|
|
|
# else
|
|
|
|
# define GLIBC_FIX_NEEDED 0
|
2016-05-18 13:49:08 -03:00
|
|
|
# endif
|
2016-06-22 10:34:25 -03:00
|
|
|
# else
|
|
|
|
# define GLIBC_FIX_NEEDED 0
|
|
|
|
# endif
|
|
|
|
# if GLIBC_FIX_NEEDED || defined (__CYGWIN__)
|
|
|
|
# ifndef HAVE_CMATH_ISFINITE
|
|
|
|
# define HAVE_CMATH_ISFINITE
|
|
|
|
# define NEED_CMATH_ISFINITE_STD_NAMESPACE
|
|
|
|
# endif
|
|
|
|
# ifndef HAVE_CMATH_ISINF
|
|
|
|
# define HAVE_CMATH_ISINF
|
|
|
|
# define NEED_CMATH_ISINF_STD_NAMESPACE
|
|
|
|
# endif
|
|
|
|
# ifndef HAVE_CMATH_ISNAN
|
|
|
|
# define HAVE_CMATH_ISNAN
|
|
|
|
# define NEED_CMATH_ISNAN_STD_NAMESPACE
|
|
|
|
# endif
|
|
|
|
# undef GLIBC_FIX_NEEDED
|
2016-05-18 13:49:08 -03:00
|
|
|
# endif
|
2016-05-17 07:55:57 -03:00
|
|
|
#endif
|
|
|
|
|
2018-03-02 00:29:06 -04:00
|
|
|
|
|
|
|
#ifdef WAF_BUILD
|
|
|
|
#if defined(__CYGWIN__) || defined(__CYGWIN64__) || defined(CYGWIN_BUILD)
|
|
|
|
// cygwin path length issues in configure mean these come out wrong,
|
|
|
|
// so fix them here
|
|
|
|
#ifndef HAVE_CMATH_ISFINITE
|
|
|
|
# define HAVE_CMATH_ISFINITE
|
|
|
|
# define NEED_CMATH_ISFINITE_STD_NAMESPACE
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_CMATH_ISINF
|
|
|
|
# define HAVE_CMATH_ISINF
|
|
|
|
# define NEED_CMATH_ISINF_STD_NAMESPACE
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_CMATH_ISNAN
|
|
|
|
# define HAVE_CMATH_ISNAN
|
|
|
|
# define NEED_CMATH_ISNAN_STD_NAMESPACE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2016-03-30 14:42:27 -03:00
|
|
|
#if defined(HAVE_CMATH_ISFINITE) && defined(NEED_CMATH_ISFINITE_STD_NAMESPACE)
|
|
|
|
using std::isfinite;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAVE_CMATH_ISINF) && defined(NEED_CMATH_ISINF_STD_NAMESPACE)
|
|
|
|
using std::isinf;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAVE_CMATH_ISNAN) && defined(NEED_CMATH_ISNAN_STD_NAMESPACE)
|
|
|
|
using std::isnan;
|
|
|
|
#endif
|