svn commit: r252181 - in stable/9: contrib/binutils/binutils contrib/binutils/ld contrib/openbsm/bin/auditdistd lib/libc/net lib/libipsec sbin/devd sbin/hastd usr.bin/ar usr.bin/bc usr.bin/csup usr...

Marius Strobl marius at FreeBSD.org
Mon Jun 24 21:33:24 UTC 2013


Author: marius
Date: Mon Jun 24 21:33:19 2013
New Revision: 252181
URL: http://svnweb.freebsd.org/changeset/base/252181

Log:
  A set of MFCs allowing stable/9 to be built again on head after r250881:
  
  r250227:
  Improve compatibility with recent flex from flex.sourceforge.net.
  
  r250914:
  Improve compatibility with old flex and fix build with GCC.
  
  r250926 (partial):
  Work around build breakages with GCC 4.2.

Modified:
  stable/9/contrib/binutils/binutils/arlex.l
  stable/9/contrib/binutils/ld/ldlex.l
  stable/9/contrib/openbsm/bin/auditdistd/token.l
  stable/9/lib/libc/net/nslexer.l
  stable/9/lib/libipsec/policy_token.l
  stable/9/sbin/devd/token.l
  stable/9/sbin/hastd/hast.h
  stable/9/sbin/hastd/parse.y
  stable/9/sbin/hastd/token.l
  stable/9/usr.bin/ar/acplex.l
  stable/9/usr.bin/bc/scan.l
  stable/9/usr.bin/csup/token.l
  stable/9/usr.bin/mklocale/lex.l
  stable/9/usr.bin/xlint/lint1/scan.l
  stable/9/usr.sbin/apmd/apmdlex.l
  stable/9/usr.sbin/bluetooth/bthidd/lexer.l
  stable/9/usr.sbin/config/lang.l
  stable/9/usr.sbin/jail/jaillex.l
  stable/9/usr.sbin/kbdcontrol/lex.l
  stable/9/usr.sbin/ndiscvt/inf-token.l
  stable/9/usr.sbin/rrenumd/lexer.l
Directory Properties:
  stable/9/contrib/binutils/   (props changed)
  stable/9/contrib/openbsm/   (props changed)
  stable/9/lib/libc/   (props changed)
  stable/9/lib/libipsec/   (props changed)
  stable/9/sbin/devd/   (props changed)
  stable/9/sbin/hastd/   (props changed)
  stable/9/usr.bin/ar/   (props changed)
  stable/9/usr.bin/bc/   (props changed)
  stable/9/usr.bin/csup/   (props changed)
  stable/9/usr.bin/mklocale/   (props changed)
  stable/9/usr.bin/xlint/   (props changed)
  stable/9/usr.sbin/apmd/   (props changed)
  stable/9/usr.sbin/bluetooth/bthidd/   (props changed)
  stable/9/usr.sbin/config/   (props changed)
  stable/9/usr.sbin/jail/   (props changed)
  stable/9/usr.sbin/kbdcontrol/   (props changed)
  stable/9/usr.sbin/ndiscvt/   (props changed)
  stable/9/usr.sbin/rrenumd/   (props changed)

Modified: stable/9/contrib/binutils/binutils/arlex.l
==============================================================================
--- stable/9/contrib/binutils/binutils/arlex.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/contrib/binutils/binutils/arlex.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -28,13 +28,13 @@ Foundation, Inc., 51 Franklin Street - F
 #include "libiberty.h"
 #include "arparse.h"
 
-#define YY_NO_UNPUT
-
 extern int yylex (void);
 
 int linenumber;
 %}
 
+%option nounput
+
 %a 10000
 %o 25000
 

Modified: stable/9/contrib/binutils/ld/ldlex.l
==============================================================================
--- stable/9/contrib/binutils/ld/ldlex.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/contrib/binutils/ld/ldlex.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -63,8 +63,6 @@ const char *lex_string = NULL;
 #undef YY_INPUT
 #define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size)
 
-#define YY_NO_UNPUT
-
 #define MAX_INCLUDE_DEPTH 10
 static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
 static const char *file_name_stack[MAX_INCLUDE_DEPTH];
@@ -72,7 +70,7 @@ static unsigned int lineno_stack[MAX_INC
 static unsigned int include_stack_ptr = 0;
 static int vers_node_nesting = 0;
 
-static void yy_input (char *, int *, int);
+static void yy_input (char *, yy_size_t *, yy_size_t);
 static void comment (void);
 static void lex_warn_invalid (char *where, char *what);
 
@@ -94,6 +92,8 @@ int yywrap (void) { return 1; }
 #endif
 %}
 
+%option nounput
+
 %a 4000
 %o 5000
 
@@ -612,7 +612,7 @@ ldlex_popstate (void)
    either the number of characters read, or 0 to indicate EOF.  */
 
 static void
-yy_input (char *buf, int *result, int max_size)
+yy_input (char *buf, yy_size_t *result, yy_size_t max_size)
 {
   *result = 0;
   if (YY_CURRENT_BUFFER->yy_input_file)

Modified: stable/9/contrib/openbsm/bin/auditdistd/token.l
==============================================================================
--- stable/9/contrib/openbsm/bin/auditdistd/token.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/contrib/openbsm/bin/auditdistd/token.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -52,6 +52,7 @@ int depth;
 int lineno;
 
 #define	DP	do { } while (0)
+#define	YY_DECL	int yylex(void)
 %}
 
 %option noinput

Modified: stable/9/lib/libc/net/nslexer.l
==============================================================================
--- stable/9/lib/libc/net/nslexer.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/lib/libc/net/nslexer.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -53,11 +53,10 @@ static char *rcsid = 
 
 #include "nsparser.h"
 
-#define	YY_NO_INPUT
-#define YY_NO_UNPUT
-
 %}
 
+%option noinput
+%option nounput
 %option yylineno
 
 BLANK		[ \t]

Modified: stable/9/lib/libipsec/policy_token.l
==============================================================================
--- stable/9/lib/libipsec/policy_token.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/lib/libipsec/policy_token.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -139,8 +139,8 @@ void
 __policy__strbuffer__init__(msg)
 	char *msg;
 {
-	if (yy_current_buffer)
-		yy_delete_buffer(yy_current_buffer);
+	if (YY_CURRENT_BUFFER)
+		yy_delete_buffer(YY_CURRENT_BUFFER);
 	strbuffer = (YY_BUFFER_STATE)yy_scan_string(msg);
 	yy_switch_to_buffer(strbuffer);
 

Modified: stable/9/sbin/devd/token.l
==============================================================================
--- stable/9/sbin/devd/token.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/sbin/devd/token.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -37,8 +37,6 @@
 #include "y.tab.h"
 
 int lineno = 1;
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
 
 static void
 update_lineno(const char *cp)
@@ -50,6 +48,9 @@ update_lineno(const char *cp)
 
 %}
 
+%option nounput
+%option noinput
+
 %%
 
 [ \t]+			;

Modified: stable/9/sbin/hastd/hast.h
==============================================================================
--- stable/9/sbin/hastd/hast.h	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/sbin/hastd/hast.h	Mon Jun 24 21:33:19 2013	(r252181)
@@ -259,8 +259,6 @@ struct hast_resource {
 struct hastd_config *yy_config_parse(const char *config, bool exitonerror);
 void yy_config_free(struct hastd_config *config);
 
-void yyerror(const char *);
-int yylex(void);
 int yyparse(void);
 
 #endif	/* !_HAST_H_ */

Modified: stable/9/sbin/hastd/parse.y
==============================================================================
--- stable/9/sbin/hastd/parse.y	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/sbin/hastd/parse.y	Mon Jun 24 21:33:19 2013	(r252181)
@@ -75,6 +75,8 @@ static char depth1_provname[PATH_MAX];
 static char depth1_localpath[PATH_MAX];
 static int depth1_metaflush;
 
+extern void yyerror(const char *);
+extern int yylex(void);
 extern void yyrestart(FILE *);
 
 static int

Modified: stable/9/sbin/hastd/token.l
==============================================================================
--- stable/9/sbin/hastd/token.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/sbin/hastd/token.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -42,6 +42,9 @@ int depth;
 int lineno;
 
 #define	DP	do { } while (0)
+#define	YY_DECL	int yylex(void)
+
+extern int yylex(void);
 %}
 
 %option noinput

Modified: stable/9/usr.bin/ar/acplex.l
==============================================================================
--- stable/9/usr.bin/ar/acplex.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.bin/ar/acplex.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -36,14 +36,16 @@ __FBSDID("$FreeBSD$");
 
 #include "y.tab.h"
 
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
 int lineno = 1;
 
 int	yylex(void);
 
+#define	YY_DECL	int yylex(void)
+
 %}
 
+%option nounput
+%option noinput
 %option noyywrap
 
 %%

Modified: stable/9/usr.bin/bc/scan.l
==============================================================================
--- stable/9/usr.bin/bc/scan.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.bin/bc/scan.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -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) \

Modified: stable/9/usr.bin/csup/token.l
==============================================================================
--- stable/9/usr.bin/csup/token.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.bin/csup/token.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -35,12 +35,11 @@
 #include "misc.h"
 #include "token.h"
 
-#define	YY_NO_UNPUT
-
 int lineno = 1;
 
 %}
 
+%option nounput
 %option noyywrap
 
 %%

Modified: stable/9/usr.bin/mklocale/lex.l
==============================================================================
--- stable/9/usr.bin/mklocale/lex.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.bin/mklocale/lex.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -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]

Modified: stable/9/usr.bin/xlint/lint1/scan.l
==============================================================================
--- stable/9/usr.bin/xlint/lint1/scan.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.bin/xlint/lint1/scan.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include "cgram.h"
 
 #define CHAR_MASK	(~(~0 << CHAR_BIT))
-#define YY_NO_UNPUT
 
 /* Current position (its also updated when an included file is parsed) */
 pos_t	curr_pos = { 1, "", 0 };
@@ -86,6 +85,8 @@ static	int	wcstrg(void);
 
 %}
 
+%option nounput
+
 L	[_A-Za-z]
 D	[0-9]
 NZD	[1-9]

Modified: stable/9/usr.sbin/apmd/apmdlex.l
==============================================================================
--- stable/9/usr.sbin/apmd/apmdlex.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.sbin/apmd/apmdlex.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -36,14 +36,14 @@
 #include "apmd.h"
 #include "y.tab.h"
 
-/* We don't need it, avoid the warning. */
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
-
 int lineno;
 int first_time;
 %}
 
+/* We don't need it, avoid the warning. */
+%option nounput
+%option noinput
+
 %s TOP
 
 %%

Modified: stable/9/usr.sbin/bluetooth/bthidd/lexer.l
==============================================================================
--- stable/9/usr.sbin/bluetooth/bthidd/lexer.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.sbin/bluetooth/bthidd/lexer.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -37,6 +37,8 @@
 #include "parser.h"
 
 	int	yylex	(void);
+
+#define	YY_DECL	int yylex(void)
 %}
 
 %option yylineno noyywrap nounput noinput

Modified: stable/9/usr.sbin/config/lang.l
==============================================================================
--- stable/9/usr.sbin/config/lang.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.sbin/config/lang.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -38,9 +38,6 @@
 #include "y.tab.h"
 #include "config.h"
 
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
-
 /*
  * Data for returning to previous files from include files.
  */
@@ -96,7 +93,12 @@ unsigned int octal(const char *);
 unsigned int hex(const char *);
 int yyerror(const char *);
 
+#define YY_DECL int yylex(void)
 %}
+
+%option nounput
+%option noinput
+
 ID	[A-Za-z_][-A-Za-z_0-9]*
 PATH	[./][-/.%^A-Za-z_0-9]+
 %START TOEOL

Modified: stable/9/usr.sbin/jail/jaillex.l
==============================================================================
--- stable/9/usr.sbin/jail/jaillex.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.sbin/jail/jaillex.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -36,17 +36,19 @@ __FBSDID("$FreeBSD$");
 #include "jailp.h"
 #include "y.tab.h"
 
-#define YY_NO_INPUT
-#define YY_NO_UNPUT
-
 extern int yynerrs;
 
 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
+%option nounput
+
 %start _ DQ
 
 %%

Modified: stable/9/usr.sbin/kbdcontrol/lex.l
==============================================================================
--- stable/9/usr.sbin/kbdcontrol/lex.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.sbin/kbdcontrol/lex.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -31,11 +31,12 @@
 %{
 
 #include "lex.h"
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
 
 %}
 
+%option nounput
+%option noinput
+
 D	[0-9]
 X	[0-9a-fA-F]
 A	.

Modified: stable/9/usr.sbin/ndiscvt/inf-token.l
==============================================================================
--- stable/9/usr.sbin/ndiscvt/inf-token.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.sbin/ndiscvt/inf-token.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -43,8 +43,6 @@ __FBSDID("$FreeBSD$");
 #include "y.tab.h"
 
 int lineno = 1;
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
 
 int yylex(void);
 void yyerror(const char *);
@@ -59,6 +57,9 @@ update_lineno(const char *cp)
 
 %}
 
+%option nounput
+%option noinput
+
 %%
 
 [ \t]+			;

Modified: stable/9/usr.sbin/rrenumd/lexer.l
==============================================================================
--- stable/9/usr.sbin/rrenumd/lexer.l	Mon Jun 24 21:27:15 2013	(r252180)
+++ stable/9/usr.sbin/rrenumd/lexer.l	Mon Jun 24 21:33:19 2013	(r252181)
@@ -32,8 +32,6 @@
  */
 
 %{
-#define YY_NO_UNPUT
-
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
@@ -64,6 +62,8 @@ void yyerror(const char *);
 int yylex(void);
 %}
 
+%option nounput
+
 /* common section */
 nl		\n
 ws		[ \t]+


More information about the svn-src-stable-9 mailing list