This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit] malloc and sys/wait.h tweaks


Andrew Cagney <cagney@gnu.org> writes:

> @@ -1575,8 +1575,8 @@ po/$(PACKAGE).pot: force
>  	     -e '/extern.*realloc/d' \
>  	     -e '/extern.*free/d' \
>  	     -e '/include.*malloc.h/d' \
> -	     -e 's/malloc/xmalloc/g' \
> -	     -e 's/realloc/xrealloc/g' \
> +	     -e 's/[^x]malloc/xmalloc/g' \
> +	     -e 's/[^x]realloc/xrealloc/g' \

This replaces any character before malloc with 'x' which may introduce
syntax errors.  The following should work better:

+	     -e 's/\([^x]\)malloc/\1xmalloc/g' \
+	     -e 's/\([^x]\)realloc/\1xrealloc/g' \

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]