[libc-commits] [libc] [libc] Implement waitid in sys/wait (PR #227815)
Aman Maurya via libc-commits
libc-commits at lists.llvm.org
Sun Oct 4 00:18:15 PDT 2026
================
@@ -11,6 +11,25 @@
#include <linux/wait.h>
+// <linux/wait.h> defines P_ALL, P_PID, P_PGID, P_PIDFD as numeric macros.
----------------
amanmaurya92 wrote:
We can avoid #undef (and #pragma push_macro) entirely by not including <linux/wait.h> in sys-wait-macros.h at all.
Similar to poll-macros.h and sched-macros.h, we can define the required wait flags (WNOHANG, WEXITED, etc.) directly. That way, `P_*` are never defined as macros in the first place.
Let me know if that sounds good and I can update the PR accordingly.
https://github.com/llvm/llvm-project/pull/227815
More information about the libc-commits
mailing list