commit e3e21cc0d86c395b7043b80063bc8871173438d9
Author: Akim Demaille <[email protected]>
Date: Thu Apr 2 06:59:35 2020 +0200
examples: reccalc: compile cleanly in C99
See https://trac.macports.org/ticket/59927.
* examples/c/reccalc/parse.y: C99 does not allow multiple typedefs.
diff --git a/examples/c/reccalc/parse.y b/examples/c/reccalc/parse.y
index 6d645294..3de58afc 100644
--- a/examples/c/reccalc/parse.y
+++ b/examples/c/reccalc/parse.y
@@ -133,6 +133,9 @@ exp:
%%
// Epilogue (C code).
+// We already defined yyscan_t, don't let scan.h define it again.
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void* yyscan_t;
#include "scan.h"
result