diff options
-rw-r--r-- | Source/cmCommandArgumentParser.cxx | 8 | ||||
-rw-r--r-- | Source/cmCommandArgumentParser.y | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx index 4c9f201..8fa88d1 100644 --- a/Source/cmCommandArgumentParser.cxx +++ b/Source/cmCommandArgumentParser.cxx @@ -122,7 +122,6 @@ Run bison like this: Modify cmCommandArgumentParser.cxx: - remove TABs - - add __HP_aCC to the #if test for yyerrorlab warning suppression */ @@ -134,6 +133,13 @@ Modify cmCommandArgumentParser.cxx: cmCommandArgumentError(yyscanner, x) #define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) +/* Make sure the parser uses standard memory allocation. The default + generated parser malloc/free declarations do not work on all + platforms. */ +#include <stdlib.h> +#define YYMALLOC malloc +#define YYFREE free + /*-------------------------------------------------------------------------*/ #include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ #include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y index 52f6c70..050d710 100644 --- a/Source/cmCommandArgumentParser.y +++ b/Source/cmCommandArgumentParser.y @@ -25,7 +25,6 @@ Run bison like this: Modify cmCommandArgumentParser.cxx: - remove TABs - - add __HP_aCC to the #if test for yyerrorlab warning suppression */ @@ -37,6 +36,13 @@ Modify cmCommandArgumentParser.cxx: cmCommandArgumentError(yyscanner, x) #define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) +/* Make sure the parser uses standard memory allocation. The default + generated parser malloc/free declarations do not work on all + platforms. */ +#include <stdlib.h> +#define YYMALLOC malloc +#define YYFREE free + /*-------------------------------------------------------------------------*/ #include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ #include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ |