--- yacc-orig.c 2007-10-20 14:39:28.000000000 -0400 +++ yacc.c 2007-10-20 14:51:21.000000000 -0400 @@ -344,13 +344,24 @@ # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && ]b4_c_modern[ +# if defined(__cplusplus) + /* in case malloc has exception specification */ +# include +using std::malloc; +# else void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && ]b4_c_modern[ +# if defined(__cplusplus) +# include +using std::free; +# else void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif # endif # endif # endif