diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/SConscript | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/SConscript b/numpy/core/SConscript index 71cee7023..986963846 100644 --- a/numpy/core/SConscript +++ b/numpy/core/SConscript @@ -174,6 +174,18 @@ for prec in ['l', 'f']: fns = [f + prec for f in c99_funcs] check_funcs(fns) +# Normally, isnan and isinf are macro (C99), but some platforms only have +# func, or both func and macro version. Check for macro only, and define +# replacement ones if not found. +# Note: including Python.h is necessary because it modifies some math.h +# definitions +for f in ["isnan", "isinf", "signbit", "isfinite"]: + includes = """\ +#include <Python.h> +#include <math.h> +""" + config.CheckDeclaration(f, includes=includes) + def check_func(f): """Check that f is available in mlib, and add the symbol appropriately. """ st = config.CheckDeclaration(f, language = 'C', includes = "#include <math.h>") |