aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

commit c6dbb677147ac63173520502fa8f38aaf137b445
parent ca6c6621b71645b5d1e4803e5b668786217b26db
Author: xplshn <anto@xplshn.com.ar>
Date:   Tue, 24 Nov 2026 14:29:01 -0300

sig: one signal table on every system

Diffstat:
Mshared/libutil/sig.c | 13-------------
Mshared/sig.h | 5-----
2 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/shared/libutil/sig.c b/shared/libutil/sig.c @@ -107,16 +107,9 @@ aruu_sig2str(int signo, char *str) { const char *name; -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__APPLE__) - if (signo <= 0 || signo >= sys_nsig) - return -1; - name = sys_signame[signo]; -#else if (signo <= 0 || signo >= aruu_sys_nsig) return -1; name = aruu_sys_signame[signo]; -#endif if (name == NULL) return -1; @@ -132,14 +125,8 @@ aruu_str2sig(const char *str, int *signop) const char *const *table; int limit; -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__APPLE__) - table = sys_signame; - limit = sys_nsig; -#else table = aruu_sys_signame; limit = aruu_sys_nsig; -#endif if (strncasecmp(s, "SIG", 3) == 0) s += 3; diff --git a/shared/sig.h b/shared/sig.h @@ -20,13 +20,8 @@ extern const char *const aruu_sys_signame[NSIG]; extern const int aruu_sys_nsig; -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__APPLE__) -/* system already provides sys_signame and sys_nsig */ -#else #define sys_signame aruu_sys_signame #define sys_nsig aruu_sys_nsig -#endif #define sig2str aruu_sig2str #define str2sig aruu_str2sig