Merge branch 'signal-systypes' into 'master'

remove sys_types header from signal header includes

See merge request redox-os/relibc!1330
This commit is contained in:
Jeremy Soller
2026-05-15 06:26:34 -06:00
2 changed files with 15 additions and 1 deletions
+11 -1
View File
@@ -6,9 +6,19 @@
# - "pid_t As described in <sys/types.h>."
# - "The <signal.h> header shall define the pthread_attr_t type as described in <sys/types.h>."
# - "Inclusion of the <signal.h> header may make visible all symbols from the <time.h> header."
sys_includes = ["sys/types.h"]
#
# Cycle warning:
# POSIX states signal.h may include time.h and time.h may include signal.h.
# To prevent a cycle between both headers we only import the needed types through bits.
#
# features.h required for deprecated annotations
sys_includes = ["features.h"]
include_guard = "_RELIBC_SIGNAL_H"
after_includes = """
#include <bits/size-t.h> // for size_t from sys/types.h
#include <bits/pid-t.h> // for pid_t from sys/types.h
#include <bits/uid-t.h> // for uid_t from sys/types.h
#include <bits/pthread.h> // for pthread_t and pthread_attr_t from sys/types.h
#include <bits/sigset-t.h> // for sigset_t
#include <bits/timespec.h> // for timespec from time.h
+4
View File
@@ -34,9 +34,13 @@ pub mod sys;
type SigSet = BitSet<[u64; 1]>;
/// cbindgen:ignore
pub(crate) const SIG_DFL: usize = 0;
/// cbindgen:ignore
pub(crate) const SIG_IGN: usize = 1;
/// cbindgen:ignore
pub(crate) const SIG_ERR: isize = -1;
/// cbindgen:ignore
pub(crate) const SIG_HOLD: isize = 2;
pub const SIG_BLOCK: c_int = 0;