Dmitry V. Levin
469fd109cd
When grep or sed is used with basic regular expressions containing '(', ')', '{', '}', '|', '?', and '+' special characters, convert them to extended regular expressions for better portability and readability. * generate_mpers_am.sh: Convert grep and sed BREs to EREs. * Makefile.am (ioctl_redefs%.h, m%_type_defs.h, m%_funcs.h, mpers_printer_decl_pattern, printers.h, %_printer_decls.h, %_printer_defs.h): Convert sed BREs to EREs. * generate_sen.sh: Likewise. * linux/mips/genstub.sh: Likewise. * make-dsc: Likewise. * mpers.sh: Likewise. * xlat/gen.sh: Likewise. * tests/Makefile.am (ksysent.h): Likewise. * tests/ksysent.sed: Likewise. * tests/pc.test: Likewise. * tests/strace-S.test: Likewise. * tests/strace-V.test: Likewise. * tests/strace-k.test: Likewise.
16 lines
505 B
Sed
16 lines
505 B
Sed
#!/bin/sed -rnf
|
|
|
|
# should not have been exported at all
|
|
/#define[[:space:]]+__NR_(sys_epoll_|arch_specific_syscall|syscalls|syscall_count|syscall_max|available|reserved|unused)/d
|
|
|
|
# should not have been named this way
|
|
s/__NR_(arm|xtensa)_fadvise64_64/__NR_fadvise64_64/
|
|
|
|
# legacy names
|
|
s/__NR_get_cpu/__NR_getcpu/
|
|
s/__NR_madvise1/__NR_madvise/
|
|
s/__NR_paccept/__NR_accept4/
|
|
|
|
# generate
|
|
s/#define[[:space:]]+__NR_([a-z_][^[:space:]]+)([[:space:]].*)?$/#ifdef __NR_\1\n[__NR_\1 \& 0xffff] = "\1",\n#endif/p
|