05-fix-win-build.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- contrib/python/numpy/py3/numpy/core/src/npymath/npy_math_private.h (index)
  2. +++ contrib/python/numpy/py3/numpy/core/src/npymath/npy_math_private.h (working tree)
  3. @@ -34,6 +34,10 @@
  4. #include "numpy/npy_endian.h"
  5. #include "numpy/npy_common.h"
  6. +#ifdef _MSC_VER // windows in ucrt\math.h makes #define complex _complex
  7. +#undef complex
  8. +#endif
  9. +
  10. /*
  11. * The original fdlibm code used statements like:
  12. * n0 = ((*(int*)&one)>>29)^1; * index of high word *
  13. --- contrib/python/numpy/py3/numpy/distutils/include/npy_cpu_dispatch_config.x86_64.h (index)
  14. +++ contrib/python/numpy/py3/numpy/distutils/include/npy_cpu_dispatch_config.x86_64.h (working tree)
  15. @@ -53,7 +53,11 @@
  16. #ifdef NPY__CPU_TARGET_POPCNT
  17. /** POPCNT **/
  18. #define NPY_HAVE_POPCNT 1
  19. +#ifdef _MSC_VER
  20. + #include <nmmintrin.h>
  21. +#else
  22. #include <popcntintrin.h>
  23. +#endif
  24. #endif /*NPY__CPU_TARGET_POPCNT*/
  25. #ifdef NPY__CPU_TARGET_SSE42
  26. /** SSE42 **/
  27. --- contrib/python/numpy/py3/numpy/core/src/common/numpyos.c (index)
  28. +++ contrib/python/numpy/py3/numpy/core/src/common/numpyos.c (working tree)
  29. @@ -783,7 +783,7 @@ NumPyOS_strtoull(const char *str, char **endptr, int base)
  30. #include <stdlib.h>
  31. -#if _MSC_VER >= 1900
  32. +#if _MSC_VER >= 1900 && 0
  33. /* npy3k_compat.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
  34. * macros. It does not need to be defined when building using MSVC
  35. * earlier than 14.0 (_MSC_VER == 1900).