remove sys_types header from signal header includes

This commit is contained in:
auronandace
2026-05-15 08:42:31 +01:00
parent 5e0867eae0
commit b74eec62d4
2 changed files with 13 additions and 1 deletions
+9 -1
View File
@@ -6,11 +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.
sys_includes = []
include_guard = "_RELIBC_SIGNAL_H"
after_includes = """
#include <bits/pid-t.h> // for pid_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/size-t.h> // for size_t from sys/types.h
#include <bits/timespec.h> // for timespec from time.h
#include <bits/uid-t.h> // for uid_t from sys/types.h
#define SIG_DFL ((void (*)(int))0)
#define SIG_IGN ((void (*)(int))1)
+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;