Skip to content

Commit

Permalink
pythongh-104106: Add gcc fallback of mkfifoat/mknodat for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed May 3, 2023
1 parent f6314b9 commit 4d59c62
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@
# define HAVE_PWRITEV_RUNTIME (pwritev != NULL)
# endif

# ifdef HAVE_MKFIFOAT
# define HAVE_MKFIFOAT_RUNTIME (mkfifoat!= NULL)
# endif

# ifdef HAVE_MKNODAT_RUNTIME
# define HAVE_MKNODAT_RUNTIME (mknodat != NULL)
# endif

#endif

#ifdef HAVE_FUTIMESAT
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4d59c62

Please sign in to comment.