From cf6e2fa64f532396be322f3498fccc93ea6dd287 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Wed, 14 Jun 2023 14:42:08 +0200 Subject: [PATCH] BUG: Fixup for win64 fwrite issue The temporary code got a bit lost in hard to understand macros, see gh-23806. This applies the minimal suggested fix, which is already being shipped by msys2: https://github.com/msys2/MINGW-packages/pull/16931 Co-authored-by: Edward E --- numpy/core/src/multiarray/convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c index aef78ff5ef23..60c1a1b9b011 100644 --- a/numpy/core/src/multiarray/convert.c +++ b/numpy/core/src/multiarray/convert.c @@ -157,7 +157,7 @@ PyArray_ToFile(PyArrayObject *self, FILE *fp, char *sep, char *format) size = PyArray_SIZE(self); NPY_BEGIN_ALLOW_THREADS; -#if defined(NPY_OS_WIN64) +#if defined(_WIN64) /* * Workaround Win64 fwrite() bug. Issue gh-2256 * The native 64 windows runtime has this issue, the above will