From 36ce1b646904b96f10000668aac033f6a03f5206 Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Wed, 10 Jun 1992 02:05:20 +0000 Subject: [PATCH] * c-exp.y, m2-exp.y: Move remapping defines for malloc and realloc. Add remapping defines for {yyss, yyssp, yyvs, yyvsp}. * config/{amix.mh, i386v4.mh, ncr3000.mh, stratus.mh, sun4os5.mh}: Add definition for INSTALL using /usr/ucb/install. --- gdb/ChangeLog | 7 +++++++ gdb/c-exp.y | 28 ++++++++++++++++++++-------- gdb/config/amix.mh | 3 +++ gdb/config/i386v4.mh | 3 +++ gdb/config/ncr3000.mh | 3 +++ gdb/config/stratus.mh | 3 +++ gdb/config/sun4os5.mh | 3 +++ gdb/m2-exp.y | 27 +++++++++++++++++++-------- 8 files changed, 61 insertions(+), 16 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ebed57d86f2..7fb91edc24b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +Tue Jun 9 17:19:45 1992 Fred Fish (fnf@cygnus.com) + + * c-exp.y, m2-exp.y: Move remapping defines for malloc and + realloc. Add remapping defines for {yyss, yyssp, yyvs, yyvsp}. + * config/{amix.mh, i386v4.mh, ncr3000.mh, stratus.mh, + sun4os5.mh}: Add definition for INSTALL using /usr/ucb/install. + Tue Jun 9 16:29:19 1992 Stu Grossman (grossman at cygnus.com) * depend: rebuild to account for remote-st2000.c. diff --git a/gdb/c-exp.y b/gdb/c-exp.y index e16f4092a96..5e6932c6d30 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -42,14 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "symfile.h" #include "objfiles.h" -/* Ensure that if the generated parser contains any calls to malloc/realloc, - that they get mapped to xmalloc/xrealloc. */ - -#define malloc xmalloc -#define realloc xrealloc - -/* These MUST be included in any grammar file!!!! - Please choose unique names! */ +/* These MUST be included in any grammar file!!!! Please choose unique names! + Note that this are a combined list of variables that can be produced + by any one of bison, byacc, or yacc. */ #define yymaxdepth c_maxdepth #define yyparse c_parse #define yylex c_lex @@ -77,6 +72,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define yy_yyv c_yyv #define yyval c_val #define yylloc c_lloc +#define yyss c_yyss /* byacc */ +#define yyssp c_yysp /* byacc */ +#define yyvs c_yyvs /* byacc */ +#define yyvsp c_yyvsp /* byacc */ int yyparse PARAMS ((void)); @@ -193,9 +192,22 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *)); %token BLOCKNAME %type block %left COLONCOLON + %% +%{ +/* Ensure that if the generated parser contains any calls to malloc/realloc, + that they get mapped to xmalloc/xrealloc. We have to do this here + rather than earlier in the file because this is the first point after + the place where the SVR4 yacc includes , and if we do it + before that, then the remapped declarations in will collide + with the ones in "defs.h". */ + +#define malloc xmalloc +#define realloc xrealloc +%} + start : exp1 | type_exp ; diff --git a/gdb/config/amix.mh b/gdb/config/amix.mh index 945a50f68ff..bca61a0c363 100644 --- a/gdb/config/amix.mh +++ b/gdb/config/amix.mh @@ -19,3 +19,6 @@ ALLOCA1=alloca.o # old termcap descriptions are incomplete. So ensure that we use the # new terminfo interface and latest terminal descriptions. TERMCAP=-ltermlib + +# SVR4 puts the BSD compatible install in /usr/ucb. +INSTALL = /usr/ucb/install -c diff --git a/gdb/config/i386v4.mh b/gdb/config/i386v4.mh index ac7ad658961..9982d2ff9d8 100644 --- a/gdb/config/i386v4.mh +++ b/gdb/config/i386v4.mh @@ -25,3 +25,6 @@ ALLOCA1=alloca.o # old termcap descriptions are incomplete. So ensure that we use the # new terminfo interface and latest terminal descriptions. TERMCAP=-ltermlib + +# SVR4 puts the BSD compatible install in /usr/ucb. +INSTALL = /usr/ucb/install -c diff --git a/gdb/config/ncr3000.mh b/gdb/config/ncr3000.mh index f5ae3f9137b..d311a6e5b11 100644 --- a/gdb/config/ncr3000.mh +++ b/gdb/config/ncr3000.mh @@ -34,3 +34,6 @@ ALLOCA1=alloca.o # old termcap descriptions are incomplete. So ensure that we use the # new terminfo interface and latest terminal descriptions. TERMCAP=-ltermlib + +# SVR4 puts the BSD compatible install in /usr/ucb. +INSTALL = /usr/ucb/install -c diff --git a/gdb/config/stratus.mh b/gdb/config/stratus.mh index 3888593a8df..4a184f714a9 100644 --- a/gdb/config/stratus.mh +++ b/gdb/config/stratus.mh @@ -19,3 +19,6 @@ ALLOCA1=alloca.o # old termcap descriptions are incomplete. So ensure that we use the # new terminfo interface and latest terminal descriptions. TERMCAP=-ltermlib + +# SVR4 puts the BSD compatible install in /usr/ucb. +INSTALL = /usr/ucb/install -c diff --git a/gdb/config/sun4os5.mh b/gdb/config/sun4os5.mh index 60e965db130..8ec7ab82520 100755 --- a/gdb/config/sun4os5.mh +++ b/gdb/config/sun4os5.mh @@ -20,6 +20,9 @@ REGEX1=regex.o # new terminfo interface and latest terminal descriptions. TERMCAP=-ltermlib +# SVR4 puts the BSD compatible install in /usr/ucb. +INSTALL = /usr/ucb/install -c + # Sun's compilers require the -xs option to produce debug information # in the final linked executable. Otherwise they leave it in the .o # files only, with undocumented pointers to it in the linked executable. diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 1c3d9007d29..850019e15c0 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -43,14 +43,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "symfile.h" #include "objfiles.h" -/* Ensure that if the generated parser contains any calls to malloc/realloc, - that they get mapped to xmalloc/xrealloc. */ - -#define malloc xmalloc -#define realloc xrealloc - -/* These MUST be included in any grammar file!!!! - Please choose unique names! */ +/* These MUST be included in any grammar file!!!! Please choose unique names! + Note that this are a combined list of variables that can be produced + by any one of bison, byacc, or yacc. */ #define yymaxdepth m2_maxdepth #define yyparse m2_parse #define yylex m2_lex @@ -78,6 +73,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define yy_yyv m2_yyv #define yyval m2_val #define yylloc m2_lloc +#define yyss m2_yyss /* byacc */ +#define yyssp m2_yysp /* byacc */ +#define yyvs m2_yyvs /* byacc */ +#define yyvsp m2_yyvsp /* byacc */ #if 0 static char * @@ -180,6 +179,18 @@ struct block *modblock=0; */ %% +%{ +/* Ensure that if the generated parser contains any calls to malloc/realloc, + that they get mapped to xmalloc/xrealloc. We have to do this here + rather than earlier in the file because this is the first point after + the place where the SVR4 yacc includes , and if we do it + before that, then the remapped declarations in will collide + with the ones in "defs.h". */ + +#define malloc xmalloc +#define realloc xrealloc +%} + start : exp | type_exp ; -- 2.30.2