E583 Merge pull request #25630 from snogge/fallocate64-1.26 · numpy/numpy@dc12cf1 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc12cf1

Browse files
authored
Merge pull request #25630 from snogge/fallocate64-1.26
BUG: Use large file fallocate on 32 bit linux platforms
2 parents e48572e + f49c6f9 commit dc12cf1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
#define _GNU_SOURCE
12
#include <stdio.h>
23
#include <fcntl.h>
34

5+
#if 0 /* Only for setup_common.py, not the C compiler */
46
off_t ftello(FILE *stream);
57
int fseeko(FILE *stream, off_t offset, int whence);
68
int fallocate(int, int, off_t, off_t);
9+
#endif

numpy/core/src/multiarray/convert.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
#include "array_coercion.h"
2424
#include "refcount.h"
2525

26-
int
27-
fallocate(int fd, int mode, off_t offset, off_t len);
26+
#if defined(HAVE_FALLOCATE) && defined(__linux__)
27+
#include <fcntl.h>
28+
#endif
2829

2930
/*
3031
* allocate nbytes of diskspace for file fp

0 commit comments

Comments
 (0)
0