Browse Source

COMP: Added missing include for malloc on QNX.

Brad King 19 years ago
parent
commit
0bd4649fe6
2 changed files with 10 additions and 0 deletions
  1. 5 0
      Source/cmCommandArgumentParser.cxx
  2. 5 0
      Source/cmCommandArgumentParser.y

+ 5 - 0
Source/cmCommandArgumentParser.cxx

@@ -138,6 +138,11 @@ Modify cmCommandArgumentParser.cxx:
         cmCommandArgumentError(yyscanner, x)
 #define yyGetParser (cmCommandArgument_yyget_extra(yyscanner))
 
+/* Make sure malloc and free are available on QNX.  */
+#ifdef __QNX__
+# include <malloc.h>
+#endif
+
 /* Make sure the parser uses standard memory allocation.  The default
    generated parser malloc/free declarations do not work on all
    platforms.  */

+ 5 - 0
Source/cmCommandArgumentParser.y

@@ -38,6 +38,11 @@ Modify cmCommandArgumentParser.cxx:
         cmCommandArgumentError(yyscanner, x)
 #define yyGetParser (cmCommandArgument_yyget_extra(yyscanner))
 
+/* Make sure malloc and free are available on QNX.  */
+#ifdef __QNX__
+# include <malloc.h>
+#endif
+
 /* Make sure the parser uses standard memory allocation.  The default
    generated parser malloc/free declarations do not work on all
    platforms.  */