INN commit: trunk (doc/pod/news.pod innfeed/configfile.l)
INN Commit
rra at isc.org
Wed Jul 31 17:24:21 UTC 2013
Date: Wednesday, July 31, 2013 @ 10:24:20
Author: iulius
Revision: 9519
fix build with flex 2.5.36+
Cast yyget_leng() to size_t because it used to be an int
in flex versions anterior to 2.5.35 (not included).
Modified:
trunk/doc/pod/news.pod
trunk/innfeed/configfile.l
----------------------+
doc/pod/news.pod | 5 +++++
innfeed/configfile.l | 21 ++++-----------------
2 files changed, 9 insertions(+), 17 deletions(-)
Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod 2013-07-31 17:14:37 UTC (rev 9518)
+++ doc/pod/news.pod 2013-07-31 17:24:20 UTC (rev 9519)
@@ -147,6 +147,11 @@
=item *
+INN now properly builds fine with S<< B<flex> 2.5.36 >> (this version
+introduced a change of type for a variable used by INN).
+
+=item *
+
When using funnel feeds, B<innfeed> log files were open forever, which
resulted in empty log files, once rotated by B<scanlogs>. B<innfeed>
now reopens its log files upon receiving a HUP signal; this signal
Modified: innfeed/configfile.l
===================================================================
--- innfeed/configfile.l 2013-07-31 17:14:37 UTC (rev 9518)
+++ innfeed/configfile.l 2013-07-31 17:24:20 UTC (rev 9519)
@@ -31,20 +31,6 @@
warnings about it. */
static void yyunput(int, char *) UNUSED;
-/* Prototype the various accessor functions generated by flex to avoid
- missing prototype warnings. */
-int yyget_lineno(void);
-FILE *yyget_in(void);
-FILE *yyget_out(void);
-int yyget_leng(void);
-char *yyget_text(void);
-int yyget_debug(void);
-void yyset_lineno(int);
-void yyset_in(FILE *);
-void yyset_out(FILE *);
-void yyset_debug(int);
-int yylex_destroy(void);
-
char *strPtr = 0 ;
int strPtrLen = 0 ;
int strIdx = 0 ;
@@ -52,7 +38,6 @@
int lineCount = 0 ;
int current ;
-static void strAppend (int ch);
static void strAppend (int ch)
{
if (strIdx == strPtrLen)
@@ -162,11 +147,13 @@
return (CHAR) ;}
\"[^\"]* {{
- int i ;
+ size_t i ;
for (i = 1, strIdx = 0, sawBsl = 0 ; ; i++)
{
- if (i < yyleng)
+ /* Cast yyget_leng() to size_t because it used to be an int
+ * in flex versions anterior to 2.5.35 (not included). */
+ if (i < (size_t) yyget_leng())
current = yytext [i] ;
else
current = input() ;
More information about the inn-committers
mailing list