From d76004af71f479b0e02535ab46780b7bd3c433e7 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 1 Jun 2005 15:32:06 +0000 Subject: [PATCH] Fixes to make things compile for CW, and possibly others. * Makefile; don't output "#line" info to prevent some errors parsing file names. * *parser.cpp; Remove problematic "#line" directives until these files get regenerated from source. * *parser.cpp; Add "using namespace std;" as free/malloc, possible others, are used and other fail on more conforming compilers. [SVN r29347] --- src/Makefile | 4 ++-- src/graphviz_digraph_parser.cpp | 6 ++---- src/graphviz_graph_parser.cpp | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/Makefile b/src/Makefile index baa6e28a..b8b5b365 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,8 +13,8 @@ BOOST = ../../.. CXX = g++ -ftemplate-depth-50 -LEX = flex -YACC = bison +LEX = flex -L +YACC = bison -l MV = /bin/mv EXTRAFLAGS = -g diff --git a/src/graphviz_digraph_parser.cpp b/src/graphviz_digraph_parser.cpp index e421f75e..72ce4cbf 100644 --- a/src/graphviz_digraph_parser.cpp +++ b/src/graphviz_digraph_parser.cpp @@ -63,6 +63,8 @@ #include #endif +using namespace std; + #ifndef GRAPHVIZ_DIRECTED #error Need to define the GRAPHVIZ_DIRECTED macro to either 0 or 1 #endif @@ -425,8 +427,6 @@ static const short yycheck[] = { 36, }; #define YYPURE 1 -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -640,7 +640,6 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -1227,7 +1226,6 @@ case 48: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; diff --git a/src/graphviz_graph_parser.cpp b/src/graphviz_graph_parser.cpp index 6878c662..65fd2a40 100644 --- a/src/graphviz_graph_parser.cpp +++ b/src/graphviz_graph_parser.cpp @@ -63,6 +63,8 @@ #include #endif +using namespace std; + #ifndef GRAPHVIZ_DIRECTED #error Need to define the GRAPHVIZ_DIRECTED macro to either 0 or 1 #endif @@ -425,8 +427,6 @@ static const short yycheck[] = { 36, }; #define YYPURE 1 -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -640,7 +640,6 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -1227,7 +1226,6 @@ case 48: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/bison.simple" yyvsp -= yylen; yyssp -= yylen;