[PATCH 1/3] Makefile.am: fix regular expression can not adapt whitespace

Dmitry V. Levin ldv at altlinux.org
Tue Jan 17 15:33:40 UTC 2017


On Tue, Jan 17, 2017 at 03:55:57PM +0800, JingPiao Chen wrote:
> ---
> When I decode ustat syscall
> # include DEF_MPERS_TYPE(ustat_t) will fault
> 
>  Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Nice catch.  Would you write a changelog entry for this fix, please?

> diff --git a/Makefile.am b/Makefile.am
> index afc3dd2..a7d7006 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -880,7 +880,7 @@ mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
>  
>  m%_type_defs.h: $(srcdir_mpers_source_files)
>  	for f in $^; do \
> -		sed -r -n 's/^#include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
> +		sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
>  	done > $@-t
>  	echo '#undef MPERS_PRINTER_NAME' >> $@-t
>  	echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t

-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170117/f0638a36/attachment.bin>


More information about the Strace-devel mailing list