From 67a942381096679d1d9c6982e4d0988f88ae389b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 26 Nov 2023 16:10:58 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- LICENSE | 2 +- Makefile | 9 ++++++--- config.mk | 8 ++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index 38e536c..c0d1b8f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ISC License -© 2020 Mattias Andrée +© 2020, 2023 Mattias Andrée Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/Makefile b/Makefile index 2960cc1..878ee1a 100644 --- a/Makefile +++ b/Makefile @@ -32,14 +32,17 @@ sctrace: $(OBJ) list-errnos.h: printf '#define LIST_ERRNOS(_)\\\n\t' > $@ - cat $(ERRNO_HDRS) | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ + cat $(ERRNO_HDRS) | tr '\n' '\0' \ + | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' | tr '\0' '\n' \ | sed -n '/^[$S]*#[$S]*define[$S].*[$S][0-9]*[$S]*$$/s/^[$S#]*define[$S]*\([^$S]*\).*$$/_(\1)/p' \ | sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ list-signums.h: - printf '#define LIST_SIGNUMS(_)\\\n ' > $@ - cat $(SIGNUM_HDRS) | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ + printf '#define LIST_SIGNUMS(_)\\\n\t' > $@ + cat $(SIGNUM_HDRS) | tr '\n' '\0' \ + | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' | tr '\0' '\n' \ | sed -n '/^[$S]*#[$S]*define[$S][^_]*[$S][0-9]*[$S]*$$/s/^[$S#]*define[$S]*\([^$S]*\).*$$/_(\1)/p' \ + | grep -v 'SIG\(UNUSED\|RTMIN\|RTMAX\|STKSZ\)' | grep '(SIG' \ | sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ install: sctrace diff --git a/config.mk b/config.mk index 8825261..5a947f9 100644 --- a/config.mk +++ b/config.mk @@ -3,8 +3,12 @@ MANPREFIX = $(PREFIX)/share/man CC = cc -ERRNO_HDRS = /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h -SIGNUM_HDRS = /usr/include/bits/signum.h /usr/include/bits/signum-generic.h +ERRNO_HDRS =\ + /usr/include/asm-generic/errno.h\ + /usr/include/asm-generic/errno-base.h + +SIGNUM_HDRS =\ + /usr/include/asm/signal.h CPPFLAGS = -D_XOPEN_SOURCE=700 -D_GNU_SOURCE CFLAGS = -std=c11 -Wall -Og -g -- cgit v1.2.3-70-g09d2