gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS (gh-104129)

This commit is contained in:
Dong-hee Na 2023-05-05 12:27:25 +09:00 committed by GitHub
parent ce871fdc3a
commit e5b8b19d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -0,0 +1 @@
Add gcc fallback of mkfifoat/mknodat for macOS. Patch by Dong-hee Na.

View File

@ -175,6 +175,14 @@
# define HAVE_PWRITEV_RUNTIME (pwritev != NULL)
# endif
# ifdef HAVE_MKFIFOAT
# define HAVE_MKFIFOAT_RUNTIME (mkfifoat != NULL)
# endif
# ifdef HAVE_MKNODAT
# define HAVE_MKNODAT_RUNTIME (mknodat != NULL)
# endif
#endif
#ifdef HAVE_FUTIMESAT
@ -4802,7 +4810,7 @@ os__path_isdir_impl(PyObject *module, PyObject *path)
}
Py_BEGIN_ALLOW_THREADS
if (_path.wide) {
if (_path.wide) {
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
&statInfo, sizeof(statInfo))) {
if (!(statInfo.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
@ -4899,7 +4907,7 @@ os__path_isfile_impl(PyObject *module, PyObject *path)
}
Py_BEGIN_ALLOW_THREADS
if (_path.wide) {
if (_path.wide) {
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
&statInfo, sizeof(statInfo))) {
if (!(statInfo.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
@ -4995,7 +5003,7 @@ os__path_exists_impl(PyObject *module, PyObject *path)
}
Py_BEGIN_ALLOW_THREADS
if (_path.wide) {
if (_path.wide) {
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
&statInfo, sizeof(statInfo))) {
if (!(statInfo.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
@ -5082,7 +5090,7 @@ os__path_islink_impl(PyObject *module, PyObject *path)
}
Py_BEGIN_ALLOW_THREADS
if (_path.wide) {
if (_path.wide) {
if (_Py_GetFileInformationByName(_path.wide, FileStatBasicByNameInfo,
&statInfo, sizeof(statInfo))) {
slow_path = FALSE;