aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/numpy/py3/patches/05-fix-win-build.patch
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/numpy/py3/patches/05-fix-win-build.patch
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
downloadydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/numpy/py3/patches/05-fix-win-build.patch')
-rw-r--r--contrib/python/numpy/py3/patches/05-fix-win-build.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/contrib/python/numpy/py3/patches/05-fix-win-build.patch b/contrib/python/numpy/py3/patches/05-fix-win-build.patch
new file mode 100644
index 0000000000..c628efec95
--- /dev/null
+++ b/contrib/python/numpy/py3/patches/05-fix-win-build.patch
@@ -0,0 +1,38 @@
+--- contrib/python/numpy/py3/numpy/core/src/npymath/npy_math_private.h (index)
++++ contrib/python/numpy/py3/numpy/core/src/npymath/npy_math_private.h (working tree)
+@@ -34,6 +34,10 @@
+ #include "numpy/npy_endian.h"
+ #include "numpy/npy_common.h"
+
++#ifdef _MSC_VER // windows in ucrt\math.h makes #define complex _complex
++#undef complex
++#endif
++
+ /*
+ * The original fdlibm code used statements like:
+ * n0 = ((*(int*)&one)>>29)^1; * index of high word *
+--- contrib/python/numpy/py3/numpy/distutils/include/npy_cpu_dispatch_config.x86_64.h (index)
++++ contrib/python/numpy/py3/numpy/distutils/include/npy_cpu_dispatch_config.x86_64.h (working tree)
+@@ -53,7 +53,11 @@
+ #ifdef NPY__CPU_TARGET_POPCNT
+ /** POPCNT **/
+ #define NPY_HAVE_POPCNT 1
++#ifdef _MSC_VER
++ #include <nmmintrin.h>
++#else
+ #include <popcntintrin.h>
++#endif
+ #endif /*NPY__CPU_TARGET_POPCNT*/
+ #ifdef NPY__CPU_TARGET_SSE42
+ /** SSE42 **/
+--- contrib/python/numpy/py3/numpy/core/src/common/numpyos.c (index)
++++ contrib/python/numpy/py3/numpy/core/src/common/numpyos.c (working tree)
+@@ -783,7 +783,7 @@ NumPyOS_strtoull(const char *str, char **endptr, int base)
+
+ #include <stdlib.h>
+
+-#if _MSC_VER >= 1900
++#if _MSC_VER >= 1900 && 0
+ /* npy3k_compat.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
+ * macros. It does not need to be defined when building using MSVC
+ * earlier than 14.0 (_MSC_VER == 1900).