[commit] malloc and sys/wait.h tweaks

Andreas Schwab schwab@suse.de
Fri Oct 15 14:08:00 GMT 2004


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."



More information about the Gdb-patches mailing list