Merge branch 'sys-wait-bits' into 'master'

move sys_wait bits from C to cbindgen

See merge request redox-os/relibc!1130
This commit is contained in:
Jeremy Soller
2026-03-28 09:59:27 -06:00
2 changed files with 10 additions and 14 deletions
-13
View File
@@ -1,13 +0,0 @@
#ifndef _BITS_SYS_WAIT_H
#define _BITS_SYS_WAIT_H
#define WEXITSTATUS(s) (((s) >> 8) & 0xff)
#define WTERMSIG(s) ((s) & 0x7f)
#define WSTOPSIG(s) WEXITSTATUS(s)
#define WCOREDUMP(s) (((s) & 0x80) != 0)
#define WIFEXITED(s) (((s) & 0x7f) == 0)
#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
#define WIFSIGNALED(s) (((((s) & 0x7f) + 1U) & 0x7f) >= 2) // Ends with 1111111 or 10000000
#define WIFCONTINUED(s) ((s) == 0xffff)
#endif /* _BITS_SYS_WAIT_H */
+10 -1
View File
@@ -1,6 +1,15 @@
sys_includes = ["sys/types.h", "sys/resource.h"]
include_guard = "_SYS_WAIT_H"
trailer = "#include <bits/sys/wait.h>"
trailer = """
#define WEXITSTATUS(s) (((s) >> 8) & 0xff)
#define WTERMSIG(s) ((s) & 0x7f)
#define WSTOPSIG(s) WEXITSTATUS(s)
#define WCOREDUMP(s) (((s) & 0x80) != 0)
#define WIFEXITED(s) (((s) & 0x7f) == 0)
#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
#define WIFSIGNALED(s) (((((s) & 0x7f) + 1U) & 0x7f) >= 2) // Ends with 1111111 or 10000000
#define WIFCONTINUED(s) ((s) == 0xffff)
"""
language = "C"
style = "Tag"
no_includes = true