37 lines
1.5 KiB
TOML
37 lines
1.5 KiB
TOML
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_wait.h.html
|
|
#
|
|
# Spec quotations relating to includes:
|
|
# - "The <sys/wait.h> header shall define the id_t and pid_t types as described in <sys/types.h>."
|
|
# - "The <sys/wait.h> header shall define the siginfo_t type and the sigval union as described in <signal.h>."
|
|
# - "Inclusion of the <sys/wait.h> header may also make visible all symbols from <signal.h>."
|
|
sys_includes = ["signal.h"]
|
|
include_guard = "_RELIBC_SYS_WAIT_H"
|
|
after_includes = """
|
|
#include <bits/id-t.h> // for id_t from sys/types.h
|
|
#include <bits/pid-t.h> // for pid_t from sys/types.h
|
|
|
|
// Return exit status.
|
|
#define WEXITSTATUS(s) (((s) >> 8) & 0xff)
|
|
// Return signal number that caused process to terminate.
|
|
#define WTERMSIG(s) ((s) & 0x7f)
|
|
// Return signal number that caused process to stop.
|
|
#define WSTOPSIG(s) WEXITSTATUS(s)
|
|
// True if WIFSIGNALED was true and creation of a core image was attempted.
|
|
#define WCOREDUMP(s) (((s) & 0x80) != 0)
|
|
// True if child exited normally.
|
|
#define WIFEXITED(s) (((s) & 0x7f) == 0)
|
|
// True if child stopped due to uncaught signal.
|
|
#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
|
|
// True if child exited due to uncaught signal.
|
|
#define WIFSIGNALED(s) (((((s) & 0x7f) + 1U) & 0x7f) >= 2) // Ends with 1111111 or 10000000
|
|
// True if child has been continued.
|
|
#define WIFCONTINUED(s) ((s) == 0xffff)
|
|
"""
|
|
language = "C"
|
|
style = "Tag"
|
|
no_includes = true
|
|
cpp_compat = true
|
|
|
|
[enum]
|
|
prefix_with_name = true
|