diff options
author | Fred Fish <fnf@specifix.com> | 1992-06-10 02:05:20 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-06-10 02:05:20 +0000 |
commit | 36ce1b646904b96f10000668aac033f6a03f5206 (patch) | |
tree | 5a0240dcfbffd0ab24a7a5f5c9dbdd9977ff35f2 /gdb/c-exp.y | |
parent | cc0d9de8676c3f2b43e42b6a43f9667632564d5d (diff) | |
download | gdb-36ce1b646904b96f10000668aac033f6a03f5206.zip gdb-36ce1b646904b96f10000668aac033f6a03f5206.tar.gz gdb-36ce1b646904b96f10000668aac033f6a03f5206.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index e16f409..5e6932c 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 <ssym> BLOCKNAME %type <bval> 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 <malloc.h>, and if we do it + before that, then the remapped declarations in <malloc.h> will collide + with the ones in "defs.h". */ + +#define malloc xmalloc +#define realloc xrealloc +%} + start : exp1 | type_exp ; |