mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
[3.11] gh-95174: Handle missing dup() and constants in WASI (GH-95229) (GH-95272)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
c7ac8b6588
commit
db13c0c1b8
12 changed files with 47 additions and 5 deletions
|
@ -9346,7 +9346,9 @@ os_dup_impl(PyObject *module, int fd)
|
|||
return _Py_dup(fd);
|
||||
}
|
||||
|
||||
|
||||
// dup2() is either provided by libc or dup2.c with AC_REPLACE_FUNCS().
|
||||
// dup2.c provides working dup2() if and only if F_DUPFD is available.
|
||||
#if (defined(HAVE_DUP3) || defined(F_DUPFD) || defined(MS_WINDOWS))
|
||||
/*[clinic input]
|
||||
os.dup2 -> int
|
||||
fd: int
|
||||
|
@ -9446,6 +9448,7 @@ os_dup2_impl(PyObject *module, int fd, int fd2, int inheritable)
|
|||
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_LOCKF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue