The old lex wants it and emits errors if it's not there.
The new lex doesn't want it, and emits warnings if it is there.
On gcc44, the build breaks on an error.
To make both happy, switch it on based on recent __DragonFly_version bump.
Bump __DragonFly_version to be 100% everyone can upgrade
* 300300 - 3.3 master
* 300301 - Add eaccess syscall
* 300302 - fpsave changes - ucontext_t, mcontext_t, sigcontext, sigframe
+ * 300303 - Demarcation of old m4/flex with new m4/flex
*/
#undef __DragonFly_version
-#define __DragonFly_version 300302 /* propagated to newvers */
+#define __DragonFly_version 300303 /* propagated to newvers */
#include <sys/_null.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
+#include <sys/param.h>
#include "mdef.h"
#include "extern.h"
#define YYSTYPE int32_t
extern int yylex(void);
+#if __DragonFly_version < 300303
+extern int yyparse(void);
+#endif
extern int yyerror(const char *);
%}
%token NUMBER
#include <errno.h>
#include <stdint.h>
#include <limits.h>
+#include <sys/param.h>
extern int mimic_gnu;
extern int32_t yylval;
int32_t number(void);
int32_t parse_radix(void);
+#if __DragonFly_version < 300303
+extern int yylex(void);
+#endif
%}
delim [ \t\n]