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

Loading…
Cancel
Save