From d1604ea6b27e6ec7bd50c537b7c9cf5332162c81 Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 13 Jul 2014 18:07:35 +0000 Subject: [PATCH] fix for endian.h --- ...atch-numpy_core_include_numpy_npy_endian_h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 math/py-numpy/patches/patch-numpy_core_include_numpy_npy_endian_h diff --git a/math/py-numpy/patches/patch-numpy_core_include_numpy_npy_endian_h b/math/py-numpy/patches/patch-numpy_core_include_numpy_npy_endian_h new file mode 100644 index 00000000000..832ef358fb6 --- /dev/null +++ b/math/py-numpy/patches/patch-numpy_core_include_numpy_npy_endian_h @@ -0,0 +1,22 @@ +$OpenBSD: patch-numpy_core_include_numpy_npy_endian_h,v 1.3 2014/07/13 18:07:35 espie Exp $ +--- numpy/core/include/numpy/npy_endian.h.orig Sun Jul 13 19:52:50 2014 ++++ numpy/core/include/numpy/npy_endian.h Sun Jul 13 19:54:29 2014 +@@ -10,9 +10,15 @@ + /* Use endian.h if available */ + #include + +- #define NPY_BYTE_ORDER __BYTE_ORDER +- #define NPY_LITTLE_ENDIAN __LITTLE_ENDIAN +- #define NPY_BIG_ENDIAN __BIG_ENDIAN ++# if defined(BYTE_ORDER) ++# define NPY_BYTE_ORDER BYTE_ORDER ++# define NPY_LITTLE_ENDIAN LITTLE_ENDIAN ++# define NPY_BIG_ENDIAN BIG_ENDIAN ++# else ++# define NPY_BYTE_ORDER __BYTE_ORDER ++# define NPY_LITTLE_ENDIAN __LITTLE_ENDIAN ++# define NPY_BIG_ENDIAN __BIG_ENDIAN ++# endif + #else + /* Set endianness info using target CPU */ + #include "npy_cpu.h"