Browse Source

AP_Common: change check from GCC version to glibc version (and Cygwin)

master
Francisco Ferreira 9 years ago committed by Andrew Tridgell
parent
commit
ac90527da5
  1. 38
      libraries/AP_Common/missing/cmath

38
libraries/AP_Common/missing/cmath

@ -3,23 +3,29 @@
#include_next <cmath> #include_next <cmath>
#ifndef WAF_BUILD #ifndef WAF_BUILD
# ifdef __GNUG__ # ifdef __GLIBC__
# define _GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if __GLIBC_PREREQ(2, 23)
# if _GCC_VERSION >= 50300 # define GLIBC_FIX_NEEDED 1
# ifndef HAVE_CMATH_ISFINITE # else
# define HAVE_CMATH_ISFINITE # define GLIBC_FIX_NEEDED 0
# 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
# undef _GCC_VERSION # 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
# endif # endif
#endif #endif

Loading…
Cancel
Save