summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-08-05 08:25:04 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-08-05 08:25:04 +0000
commitf8f44a0595da3ae8be9458ead1366bcc72cd3390 (patch)
treecfc1d2c11b8c200615b1f766ef49a5005b3c044f
parent1da04e18896748c262d864ce83ca226c06e891b2 (diff)
downloadnumpy-f8f44a0595da3ae8be9458ead1366bcc72cd3390.tar.gz
Fix NPY_INTP_FMT when C99 format available (typo + forgot to include inttypes.h),
-rw-r--r--numpy/core/include/numpy/ndarrayobject.h5
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