summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2022-01-18 08:37:43 +0100
committerRalf Gommers <ralf.gommers@gmail.com>2022-01-18 08:37:43 +0100
commit60dc6b79a675904fcb49e99f7f5dc62d3628a6d9 (patch)
tree21c99f0e8c293c282a663c90af6b5d4ed336eac4
parent381684986a20cc5c41afb9fe4a9abc5507684305 (diff)
downloadnumpy-60dc6b79a675904fcb49e99f7f5dc62d3628a6d9.tar.gz
MAINT: remove outdated mingw32 fseek support
`_fseeki64` and `_ftelli64` have been present in mingw-w64 for a long time, see https://github.com/mingw-w64/mingw-w64/commit/d66350ea60d043a8992ada752040fc4ea48537c3 This fixes an annoying build warning in the SciPy Meson build: ``` C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/npy_common.h:185:20: warning: 'int _fseeki64(FILE*, long long int, int)' redeclared without dllimport attribute after being referenced with dll linkage 185 | extern int __cdecl _fseeki64(FILE *, long long, int); | ^~~~~~~~~ C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/npy_common.h:186:26: warning: 'long long int _ftelli64(FILE*)' redeclared without dllimport attribute after being referenced with dll linkage 186 | extern long long __cdecl _ftelli64(FILE *); | ^~~~~~~~~ ``` It's only happening for Pythran extensions, because Pythran uses `fseek`. The cause is otherwise unrelated to Pythran though, it's `npy_common.h` redefining something that's in mingw-w64.
-rw-r--r--numpy/core/include/numpy/npy_common.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/numpy/core/include/numpy/npy_common.h b/numpy/core/include/numpy/npy_common.h
index 88794ca07..1d6234e20 100644
--- a/numpy/core/include/numpy/npy_common.h
+++ b/numpy/core/include/numpy/npy_common.h
@@ -180,12 +180,6 @@
defined(__MINGW32__) || defined(__MINGW64__)
#include <io.h>
-/* mingw based on 3.4.5 has lseek but not ftell/fseek */
-#if defined(__MINGW32__) || defined(__MINGW64__)
-extern int __cdecl _fseeki64(FILE *, long long, int);
-extern long long __cdecl _ftelli64(FILE *);
-#endif
-
#define npy_fseek _fseeki64
#define npy_ftell _ftelli64
#define npy_lseek _lseeki64