10BC0 MAINT: fix a few issues with CPython main/3.13.0a1 by rgommers · Pull Request #24969 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter
Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions numpy/_core/include/numpy/npy_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
#define npy_ftell ftell
#endif
#include <sys/types.h>
#ifndef _WIN32
#include <unistd.h>
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, seems like the windows <io.h> equivalence is still in python, I guess. (or maybe I misunderstand).

Anyway, LGTM, thanks. If something is odd on _WIN32 here we would notice it anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failed for 32-bit Python on Windows. I checked in a few other libraries like zlib and blosc, and they all protect this include like that, so it should be fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, was just waiting for CI, thanks. It seems to me that lseek on windows may need <io.h> but Python probably still has that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess we'll find out if and when they clean it up:)

#define npy_lseek lseek
#define npy_off_t off_t

Expand Down
2 changes: 1 addition & 1 deletion vendored-meson/meson
0