From 9c5a52cf888a7c1588fb406803f1defa03533a46 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 23 May 2013 05:42:35 +0000 Subject: [PATCH] Work around build breakages with GCC 4.2. Reported by: tinderbox --- contrib/openbsm/bin/auditdistd/token.l | 1 + usr.bin/ar/acplex.l | 2 ++ usr.bin/bc/scan.l | 1 + usr.bin/m4/tokenizer.l | 2 ++ usr.bin/mklocale/lex.l | 2 ++ usr.sbin/bluetooth/bthidd/lexer.l | 2 ++ usr.sbin/config/lang.l | 1 + usr.sbin/jail/jaillex.l | 2 ++ 8 files changed, 13 insertions(+) diff --git a/contrib/openbsm/bin/auditdistd/token.l b/contrib/openbsm/bin/auditdistd/token.l index 5e58e8728836..f459013a4453 100644 --- a/contrib/openbsm/bin/auditdistd/token.l +++ b/contrib/openbsm/bin/auditdistd/token.l @@ -52,6 +52,7 @@ int depth; int lineno; #define DP do { } while (0) +#define YY_DECL int yylex(void) %} %option noinput diff --git a/usr.bin/ar/acplex.l b/usr.bin/ar/acplex.l index a82db37f3417..589888e6dc06 100644 --- a/usr.bin/ar/acplex.l +++ b/usr.bin/ar/acplex.l @@ -40,6 +40,8 @@ int lineno = 1; int yylex(void); +#define YY_DECL int yylex(void) + %} %option nounput diff --git a/usr.bin/bc/scan.l b/usr.bin/bc/scan.l index 5d60bb37c232..71cb295956dc 100644 --- a/usr.bin/bc/scan.l +++ b/usr.bin/bc/scan.l @@ -46,6 +46,7 @@ static void init_strbuf(void); static void add_str(const char *); static int bc_yyinput(char *, int); +#define YY_DECL int yylex(void) #define YY_NO_INPUT #undef YY_INPUT #define YY_INPUT(buf,retval,max) \ diff --git a/usr.bin/m4/tokenizer.l b/usr.bin/m4/tokenizer.l index da362b4025d1..2b4b2dba3d4f 100644 --- a/usr.bin/m4/tokenizer.l +++ b/usr.bin/m4/tokenizer.l @@ -31,6 +31,8 @@ extern int32_t yylval; int32_t number(void); int32_t parse_radix(void); extern int yylex(void); + +#define YY_DECL int yylex(void) %} delim [ \t\n] diff --git a/usr.bin/mklocale/lex.l b/usr.bin/mklocale/lex.l index d931df7d45e2..08fa54a4b176 100644 --- a/usr.bin/mklocale/lex.l +++ b/usr.bin/mklocale/lex.l @@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include "ldef.h" #include "y.tab.h" #include "extern.h" + +#define YY_DECL int yylex(void) %} ODIGIT [0-7] diff --git a/usr.sbin/bluetooth/bthidd/lexer.l b/usr.sbin/bluetooth/bthidd/lexer.l index 54821daa3ba1..b9f62a1e7ca2 100644 --- a/usr.sbin/bluetooth/bthidd/lexer.l +++ b/usr.sbin/bluetooth/bthidd/lexer.l @@ -37,6 +37,8 @@ #include "parser.h" int yylex (void); + +#define YY_DECL int yylex(void) %} %option yylineno noyywrap nounput noinput diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index c56c6afebc8a..3e4e11560445 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -93,6 +93,7 @@ unsigned int octal(const char *); unsigned int hex(const char *); int yyerror(const char *); +#define YY_DECL int yylex(void) %} %option nounput diff --git a/usr.sbin/jail/jaillex.l b/usr.sbin/jail/jaillex.l index b77e15a402a5..04de85f2a67a 100644 --- a/usr.sbin/jail/jaillex.l +++ b/usr.sbin/jail/jaillex.l @@ -42,6 +42,8 @@ static ssize_t text2lval(size_t triml, size_t trimr, int tovar); static int instr; static int lineno = 1; + +#define YY_DECL int yylex(void) %} %option noinput