[Python] Fix isfinite() check to work with GCC6

Fixes https://github.com/swig/swig/issues/615 reported by jplesnik.
This commit is contained in:
Olly Betts 2016-03-01 15:26:33 +13:00
commit 5733cc1d2a
2 changed files with 6 additions and 1 deletions

View file

@ -168,7 +168,8 @@
%fragment("SWIG_isfinite","header",fragment="<math.h>,<float.h>") %{
/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
#ifndef SWIG_isfinite
# if defined(isfinite)
/* isfinite() is a macro for C99, but a function for C++11. */
# if defined(isfinite) || (defined __cplusplus && __cplusplus >= 201103L)
# define SWIG_isfinite(X) (isfinite(X))
# elif defined(_MSC_VER)
# define SWIG_isfinite(X) (_finite(X))