diff options
author | Mattias Andrée <maandree@kth.se> | 2023-12-07 22:51:52 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-12-07 22:51:52 +0100 |
commit | 9f449569df9c94670f51fd8cd5558b66884cd877 (patch) | |
tree | 21d3c31e22b2cd0544351584c8614e70b66826e4 /linux/syscall-table.mk | |
parent | Fourth commit (diff) | |
download | libsyscalls-9f449569df9c94670f51fd8cd5558b66884cd877.tar.gz libsyscalls-9f449569df9c94670f51fd8cd5558b66884cd877.tar.bz2 libsyscalls-9f449569df9c94670f51fd8cd5558b66884cd877.tar.xz |
Improve portability
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | linux/syscall-table.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/syscall-table.mk b/linux/syscall-table.mk index 1b993e6..7e6fb1a 100644 --- a/linux/syscall-table.mk +++ b/linux/syscall-table.mk @@ -12,7 +12,7 @@ libsyscalls_get_syscall_range.lo: $(LINUX_SYSCALLS_HDR) generated/linux-syscall-table.h: linux/syscall-table.c common.h linux/linux-support.mk set -e; \ - macros="$$(sed -n 's/^\s*\x23\s*define\s\+MAKE_\([^(]*\)(.*$$/\1/p' < linux/syscall-table.c)"; \ + macros="$$(sed -n 's/^$(s)*$(h)$(s)*define$(s)\{1,\}MAKE_\([^(]*\)(.*$$/\1/p' < linux/syscall-table.c)"; \ for arch in $(SUPPORTED_LINUX_ARCHES); do \ for macro in $$macros; do \ printf '\43define MAKE_%s_%s(...) MAKE_%s(%s, __VA_ARGS__)\n' \ @@ -32,9 +32,9 @@ generated/linux-syscall-ranges.h: $(LINUX_SYSCALLS_ARCH_HDR) printf '%s\n' 'This may take some time ...'; \ set -e; arch=; \ cat -- $(LINUX_SYSCALLS_ARCH_HDR) \ - | sed 's/^\s*X[A-Z_]*(\([^,]*\).*$$/\1/' \ - | sed 's/\x23\s*define\s\+LIST_LINUX_SYSCALLS_FOR_\(.*\)(.*/\1/' \ - | sed '/^\s*$$/d' \ + | sed 's/^$(s)*X[A-Z_]*(\([^,]*\).*$$/\1/' \ + | sed 's/$(h)$(s)*define$(s)\{1,\}LIST_LINUX_SYSCALLS_FOR_\(.*\)(.*/\1/' \ + | sed '/^$(s)*$$/d' \ | (\ while read line; do \ if test -z "$$(printf '%s\n' "$$line" | sed 's/^[A-Z].*$$//')"; then \ |