diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/ndarrayobject.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/include/numpy/ndarrayobject.h b/numpy/core/include/numpy/ndarrayobject.h index ff22602cc..84e94f470 100644 --- a/numpy/core/include/numpy/ndarrayobject.h +++ b/numpy/core/include/numpy/ndarrayobject.h @@ -973,7 +973,10 @@ typedef Py_uintptr_t npy_uintp; /* We can only use C99 formats for npy_int_p if it is the same as intp_t, hence * the condition on HAVE_UNITPTR_T */ -#if NPY_USE_C99_FORMATS == 1 && HAVE_UINTPRT_T +#if (NPY_USE_C99_FORMATS) == 1 \ + && (defined HAVE_UINTPTR_T) \ + && (defined HAVE_INTTYPES_H) + #include <inttypes.h> #undef NPY_INTP_FMT #define NPY_INTP_FMT PRIdPTR #endif |