aboutsummaryrefslogtreecommitdiff
path: root/gdb/m2-exp.y
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-06-10 02:05:20 +0000
committerFred Fish <fnf@specifix.com>1992-06-10 02:05:20 +0000
commit36ce1b646904b96f10000668aac033f6a03f5206 (patch)
tree5a0240dcfbffd0ab24a7a5f5c9dbdd9977ff35f2 /gdb/m2-exp.y
parentcc0d9de8676c3f2b43e42b6a43f9667632564d5d (diff)
downloadgdb-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/m2-exp.y')
-rw-r--r--gdb/m2-exp.y27
1 files changed, 19 insertions, 8 deletions
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 1c3d900..850019e 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 <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 : exp
| type_exp
;