Skip to content

gh-157695: Rename HAVE_GETDENTS64 to _Py_HAVE_GETDENTS64 - #162184

Open
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:rename_gettid_macro2
Open

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:rename_gettid_macro2

Conversation

@vstinner

@vstinner vstinner commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

In configure script, use PY_CHECK_FUNC_PRIVATE() to detect functions:

  • getdents64() of <dirent.h>: _Py_HAVE_GETDENTS64
  • gettid() of <unistd.h>: _Py_HAVE_GETTID
  • if_indextoname() of <net/if.h>: _Py_HAVE_IF_INDEXTONAME
  • if_nametoindex() of <net/if.h>: _Py_HAVE_IF_NAMETOINDEX
  • pidfd_getfd() of <sys/pidfd.h>: _Py_HAVE_PIDFD_GETFD
  • pidfd_open() of <sys/pidfd.h>: _Py_HAVE_PIDFD_OPEN
  • pidfd_send_signal() of <sys/pidfd.h>: _Py_HAVE_PIDFD_SEND_SIGNAL

Add shebang to Tools/build/check_capi_macros.py and make the script executable.

In configure script, use PY_CHECK_FUNC_PRIVATE() to detect
functions:

* getdents64() of <dirent.h>: _Py_HAVE_GETDENTS64
* gettid() of <unistd.h>: _Py_HAVE_GETTID
* if_indextoname() of <net/if.h>: _Py_HAVE_IF_INDEXTONAME
* if_nametoindex() of <net/if.h>: _Py_HAVE_IF_NAMETOINDEX
* pidfd_getfd() of <sys/pidfd.h>: _Py_HAVE_PIDFD_GETFD
* pidfd_open() of <sys/pidfd.h>: _Py_HAVE_PIDFD_OPEN
* pidfd_send_signal() of <sys/pidfd.h>: _Py_HAVE_PIDFD_SEND_SIGNAL

Add shebang to Tools/build/check_capi_macros.py and make the script
executable.
@vstinner

Copy link
Copy Markdown
Member Author

This PR replaces the old PR gh-157939. The previous PR called PY_CHECK_FUNC_PRIVATE() without specifying the header file in configure.ac, which risks of not detecting a function which would be available otherwise.

In this PR, PY_CHECK_FUNC_PRIVATE() is now called with the related header file. I checked that on Linux, the 7 functions are still detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant