mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507)
This commit is contained in:
parent
1de60155d5
commit
a6ca8eee22
14 changed files with 90 additions and 14 deletions
|
@ -3292,7 +3292,14 @@ os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
|
|||
}
|
||||
else
|
||||
#endif /* HAVE_FHCMODAT */
|
||||
{
|
||||
#ifdef HAVE_CHMOD
|
||||
result = chmod(path->narrow, mode);
|
||||
#else
|
||||
result = -1;
|
||||
errno = ENOSYS;
|
||||
#endif
|
||||
}
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (result) {
|
||||
|
@ -4885,6 +4892,7 @@ os_system_impl(PyObject *module, PyObject *command)
|
|||
#endif /* HAVE_SYSTEM */
|
||||
|
||||
|
||||
#ifdef HAVE_UMASK
|
||||
/*[clinic input]
|
||||
os.umask
|
||||
|
||||
|
@ -4903,6 +4911,7 @@ os_umask_impl(PyObject *module, int mask)
|
|||
return posix_error();
|
||||
return PyLong_FromLong((long)i);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue