tests: avoid c++ failure due to lack of getenv decl

* tests/c++.at (Syntax error as exception): Avoid spurious failure
at least when compiling with g++-4.7.x due to lack of declaration
of getenv.  Include <stdlib.h>.
This commit is contained in:
Jim Meyering
2012-02-16 11:03:31 +01:00
parent 3d6ca33908
commit 292402a9b2

View File

@@ -461,6 +461,7 @@ AT_DATA_GRAMMAR([[input.yy]],
%code %code
{ {
#include <stdlib.h>
int yylex (yy::parser::semantic_type *); int yylex (yy::parser::semantic_type *);
} }
@@ -510,7 +511,7 @@ yy::parser::error (const std::string &m)
} }
int int
main () main (void)
{ {
yy::parser parser; yy::parser parser;
parser.set_debug_level(!!getenv("YYDEBUG")); parser.set_debug_level(!!getenv("YYDEBUG"));