This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] Makefile.in: fix xmalloc substitution
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 15 Oct 2004 12:14:39 -0400
- Subject: [patch] Makefile.in: fix xmalloc substitution
This patch fixes a little glitch where "[^x]malloc" would eat
a critical character in strings like "#define YYSTACK_ALLOC malloc"
and "(char *)malloc(namelen+1);".
Tested on native i686-pc-linux-gnu building with gcc 3.3.4.
I am committing this now.
2004-10-15 Michael Chastain <mec.gnu@mindspring.com>
From Andreas Schwab <schwab@suse.de>:
* Makefile.in (.y.c, .l.c.): Fix the substitutions for
for xmalloc and xrealloc.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.642
diff -c -3 -p -r1.642 Makefile.in
*** Makefile.in 15 Oct 2004 13:29:31 -0000 1.642
--- Makefile.in 15 Oct 2004 15:48:11 -0000
*************** po/$(PACKAGE).pot: force
*** 1575,1582 ****
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
! -e 's/[^x]malloc/xmalloc/g' \
! -e 's/[^x]realloc/xrealloc/g' \
-e '/^#line.*y.tab.c/d' \
< $@.tmp > $@.new
-rm $@.tmp
--- 1575,1582 ----
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
! -e 's/\([^x]\)malloc/\1xmalloc/g' \
! -e 's/\([^x]\)realloc/\1xrealloc/g' \
-e '/^#line.*y.tab.c/d' \
< $@.tmp > $@.new
-rm $@.tmp
*************** po/$(PACKAGE).pot: force
*** 1589,1596 ****
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
! -e 's/[^x]malloc/xmalloc/g' \
! -e 's/[^x]realloc/xrealloc/g' \
-e 's/yy_flex_xrealloc/yyxrealloc/g' \
< $@ > $@.new && \
rm -f $@ && \
--- 1589,1596 ----
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
! -e 's/\([^x]\)malloc/\1xmalloc/g' \
! -e 's/\([^x]\)realloc/\1xrealloc/g' \
-e 's/yy_flex_xrealloc/yyxrealloc/g' \
< $@ > $@.new && \
rm -f $@ && \