From owner-svn-src-stable@FreeBSD.ORG Thu Nov 4 10:53:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F377C106564A; Thu, 4 Nov 2010 10:53:50 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E03EC8FC0C; Thu, 4 Nov 2010 10:53:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oA4AroNj057697; Thu, 4 Nov 2010 10:53:50 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oA4AroW0057692; Thu, 4 Nov 2010 10:53:50 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201011041053.oA4AroW0057692@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 4 Nov 2010 10:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214779 - in stable/8/usr.bin: lex yacc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2010 10:53:51 -0000 Author: uqs Date: Thu Nov 4 10:53:50 2010 New Revision: 214779 URL: http://svn.freebsd.org/changeset/base/214779 Log: MFC r200626,201289,213764,214272, syncing yacc and flex to -CURRENT r200626: remove external reference to not (or at least no longer) existing variable 'myname' r201289: Let both yacc and lex generate code that passes -Wold-style-definition. Both these tools emit code where several functions have no `void' keyword placed in the arugment list when the function has no arguments. r213764: Don't define the input() function ifdef YY_NO_INPUT. This was previously done for the input() function. r214272: flex: add missing ifdef magic to create/hide prototypes This unbreaks build for some software with higher WARNS flags. Modified: stable/8/usr.bin/lex/flex.skl stable/8/usr.bin/lex/initscan.c stable/8/usr.bin/yacc/defs.h stable/8/usr.bin/yacc/skeleton.c Directory Properties: stable/8/usr.bin/lex/ (props changed) stable/8/usr.bin/yacc/ (props changed) Modified: stable/8/usr.bin/lex/flex.skl ============================================================================== --- stable/8/usr.bin/lex/flex.skl Thu Nov 4 10:47:19 2010 (r214778) +++ stable/8/usr.bin/lex/flex.skl Thu Nov 4 10:53:50 2010 (r214779) @@ -747,7 +747,11 @@ void yyFlexLexer::LexerOutput( const cha */ %- +#ifdef YY_USE_PROTOS +static int yy_get_next_buffer(void) +#else static int yy_get_next_buffer() +#endif %+ int yyFlexLexer::yy_get_next_buffer() %* @@ -883,7 +887,11 @@ int yyFlexLexer::yy_get_next_buffer() /* yy_get_previous_state - get the state just before the EOB char was reached */ %- +#ifdef YY_USE_PROTOS +static yy_state_type yy_get_previous_state(void) +#else static yy_state_type yy_get_previous_state() +#endif %+ yy_state_type yyFlexLexer::yy_get_previous_state() %* @@ -979,11 +987,16 @@ void yyFlexLexer::yyunput( int c, char* %- +#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else +#ifdef YY_USE_PROTOS +static int input(void) +#else static int input() #endif +#endif %+ int yyFlexLexer::yyinput() %* @@ -1054,6 +1067,9 @@ int yyFlexLexer::yyinput() return c; } +%- +#endif /* ifndef YY_NO_INPUT */ +%* %- @@ -1402,7 +1418,11 @@ void yyFlexLexer::yy_push_state( int new #ifndef YY_NO_POP_STATE %- +#ifdef YY_USE_PROTOS +static void yy_pop_state(void) +#else static void yy_pop_state() +#endif %+ void yyFlexLexer::yy_pop_state() %* @@ -1417,7 +1437,11 @@ void yyFlexLexer::yy_pop_state() #ifndef YY_NO_TOP_STATE %- +#ifdef YY_USE_PROTOS +static int yy_top_state(void) +#else static int yy_top_state() +#endif %+ int yyFlexLexer::yy_top_state() %* Modified: stable/8/usr.bin/lex/initscan.c ============================================================================== --- stable/8/usr.bin/lex/initscan.c Thu Nov 4 10:47:19 2010 (r214778) +++ stable/8/usr.bin/lex/initscan.c Thu Nov 4 10:53:50 2010 (r214779) @@ -2894,7 +2894,7 @@ case YY_STATE_EOF(LINEDIR): * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer() +static int yy_get_next_buffer(void) { char *dest = yy_current_buffer->yy_ch_buf; char *source = yytext_ptr; @@ -3026,7 +3026,7 @@ static int yy_get_next_buffer() /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state() +static yy_state_type yy_get_previous_state(void) { yy_state_type yy_current_state; char *yy_cp; @@ -3138,7 +3138,7 @@ char *yy_bp; #ifdef __cplusplus static int yyinput() #else -static int input() +static int input(void) #endif { int c; Modified: stable/8/usr.bin/yacc/defs.h ============================================================================== --- stable/8/usr.bin/yacc/defs.h Thu Nov 4 10:47:19 2010 (r214778) +++ stable/8/usr.bin/yacc/defs.h Thu Nov 4 10:53:50 2010 (r214779) @@ -220,7 +220,6 @@ extern char tflag; extern char vflag; extern const char *symbol_prefix; -extern char *myname; extern char *cptr; extern char *line; extern int lineno; Modified: stable/8/usr.bin/yacc/skeleton.c ============================================================================== --- stable/8/usr.bin/yacc/skeleton.c Thu Nov 4 10:47:19 2010 (r214778) +++ stable/8/usr.bin/yacc/skeleton.c Thu Nov 4 10:53:50 2010 (r214779) @@ -140,7 +140,11 @@ const char *header[] = const char *body[] = { "/* allocate initial stack or double stack size, up to YYMAXDEPTH */", + "#if defined(__cplusplus) || __STDC__", + "static int yygrowstack(void)", + "#else", "static int yygrowstack()", + "#endif", "{", " int newsize, i;", " short *newss;",