aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorUlrich Spörlein <uqs@FreeBSD.org>2010-10-24 15:31:41 +0000
committerUlrich Spörlein <uqs@FreeBSD.org>2010-10-24 15:31:41 +0000
commit16dc6e122a3f31e3068d041403cdb88782ed82fc (patch)
tree942132821bdfd07a7a18a91b395d0f47d1f1349a /usr.bin
parent3afd23533af9d6dd2dd9a5f7c1790c92a1e4a9cb (diff)
downloadsrc-16dc6e122a3f31e3068d041403cdb88782ed82fc.tar.gz
src-16dc6e122a3f31e3068d041403cdb88782ed82fc.zip
flex: add missing ifdef magic to create/hide prototypes
This unbreaks build for some software with higher WARNS flags. Reviewed by: rpaulo PR: bin/139319 (parts already committed in previous revision)
Notes
Notes: svn path=/head/; revision=214272
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/lex/flex.skl24
1 files changed, 23 insertions, 1 deletions
diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl
index 69d9ca2cac4c..ac8eac2d9c37 100644
--- a/usr.bin/lex/flex.skl
+++ b/usr.bin/lex/flex.skl
@@ -747,7 +747,11 @@ void yyFlexLexer::LexerOutput( const char* buf, int size )
*/
%-
+#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()
%*
@@ -983,7 +991,11 @@ void yyFlexLexer::yyunput( int c, char* yy_bp )
#ifdef __cplusplus
static int yyinput()
#else
+#ifdef YY_USE_PROTOS
static int input(void)
+#else
+static int input()
+#endif
#endif
%+
int yyFlexLexer::yyinput()
@@ -1055,7 +1067,9 @@ int yyFlexLexer::yyinput()
return c;
}
-#endif /* ifndef YY_NO_INPUT */
+%-
+#endif /* ifndef YY_NO_INPUT */
+%*
%-
@@ -1404,7 +1418,11 @@ void yyFlexLexer::yy_push_state( int new_state )
#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()
%*
@@ -1419,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()
%*