From 262b09ab151a57e7ebac6ab437bcf48564734057 Mon Sep 17 00:00:00 2001 From: Felipe Monteiro de Carvalho <fcarvalho@opera.com> Date: Mon, 10 Dec 2012 11:09:20 +0100 Subject: [PATCH] Fixes compilation on Kubuntu 12.10. According to the bison manual, yydebug is only available if YYDEBUG is defined and equals 1. Also the yyparse prototype was wrong. --- src/main.c | 4 ++-- src/program.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 75b3c60c0c..e2758788e0 100644 --- a/src/main.c +++ b/src/main.c @@ -484,9 +484,9 @@ int main(int argc, char **argv) case 'c': p++; -#if defined(YYDEBUG) || defined(PIKE_DEBUG) +#if (defined(YYDEBUG) && (YYDEBUG==1)) && defined(PIKE_DEBUG) yydebug++; -#endif /* YYDEBUG || PIKE_DEBUG */ +#endif /* YYDEBUG && PIKE_DEBUG */ break; case 's': diff --git a/src/program.c b/src/program.c index 18ba4e31f2..83a91b70ac 100644 --- a/src/program.c +++ b/src/program.c @@ -7676,7 +7676,7 @@ void handle_compile_exception (const char *yyerror_fmt, ...) free_svalue(&thrown); } -extern void yyparse(void); +extern int yyparse(void); #ifdef PIKE_DEBUG #define do_yyparse() do { \ -- GitLab