diff options
author | Brad King <brad.king@kitware.com> | 2006-03-16 19:44:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-03-16 19:44:13 (GMT) |
commit | 8893db3539471803171743bda4f58c21f2b204b3 (patch) | |
tree | d41afe12230c55bff1ec5dbc8a91a0051bfe35f3 /Source/cmCommandArgumentParser.y | |
parent | 180a45c8c752c01ee81b8f7ac6aaaf8053f57d0e (diff) | |
download | CMake-8893db3539471803171743bda4f58c21f2b204b3.zip CMake-8893db3539471803171743bda4f58c21f2b204b3.tar.gz CMake-8893db3539471803171743bda4f58c21f2b204b3.tar.bz2 |
COMP: Fix malloc/free declaration for windows compilers.
Diffstat (limited to 'Source/cmCommandArgumentParser.y')
-rw-r--r-- | Source/cmCommandArgumentParser.y | 8 |
1 files changed, 7 insertions, 1 deletions
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. */ |