summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parse.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/parse.h b/src/parse.h
index f66bf06..88b1118 100644
--- a/src/parse.h
+++ b/src/parse.h
@@ -63,8 +63,21 @@ in this Software without prior written authorization from The Open Group.
#include "list.h"
#include "gram.h"
+/*
+ * POSIX does not say where yyparse() is declared. bison puts it in its
+ * generated header, while byacc does not. This chunk helps with portability.
+ */
+#if !(defined(YYDEBUG) && defined(YY_YY_GRAM_H_INCLUDED)) && !defined(YYBYACC)
+extern int yyparse(void);
+#endif
+
+/*
+ * Some versions of byacc and flex declare yylex(). This chunk fixes that.
+ */
+#if !(defined(YYBYACC) || defined(YYLEX_DECL))
#define YY_DECL int yylex (void)
YY_DECL;
+#endif
extern void assign_var_savecolor(void);
extern int do_single_keyword(int keyword);