mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
GH-111804: Drop posix.fallocate() under WASI (GH-111869)
Drop posix.fallocate() under WASI. The underlying POSIX function, posix_fallocate(), was found to vary too much between implementations to remain in WASI. As such, while it was available in WASI preview1, it's been dropped in preview2.
This commit is contained in:
parent
31c90d5838
commit
97c4c06d0d
3 changed files with 10 additions and 5 deletions
|
@ -12165,7 +12165,10 @@ os_truncate_impl(PyObject *module, path_t *path, Py_off_t length)
|
|||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_POSIX_FALLOCATE) && !defined(POSIX_FADVISE_AIX_BUG)
|
||||
/* GH-111804: Due to posix_fallocate() not having consistent semantics across
|
||||
OSs, support was dropped in WASI preview2. */
|
||||
#if defined(HAVE_POSIX_FALLOCATE) && !defined(POSIX_FADVISE_AIX_BUG) && \
|
||||
!defined(__wasi__)
|
||||
/*[clinic input]
|
||||
os.posix_fallocate
|
||||
|
||||
|
@ -12203,7 +12206,7 @@ os_posix_fallocate_impl(PyObject *module, int fd, Py_off_t offset,
|
|||
errno = result;
|
||||
return posix_error();
|
||||
}
|
||||
#endif /* HAVE_POSIX_FALLOCATE) && !POSIX_FADVISE_AIX_BUG */
|
||||
#endif /* HAVE_POSIX_FALLOCATE) && !POSIX_FADVISE_AIX_BUG && !defined(__wasi__) */
|
||||
|
||||
|
||||
#if defined(HAVE_POSIX_FADVISE) && !defined(POSIX_FADVISE_AIX_BUG)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue