Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. Building INN with flex 2.5.36 (Julien ?LIE)
----------------------------------------------------------------------
Message: 1
Date: Mon, 29 Jul 2013 22:20:48 +0200
From: Julien ?LIE <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Building INN with flex 2.5.36
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
Hi all,
Trying to build INN with flex 2.5.36 or 2.5.37, I get the following error:
/home/iulius/autobuild/bin/gcc-4.8.1/bin/gcc -g -O2 -DDEBUG=1 -Werror -Wall
-Wextra -Winit-self -Wsync-nand -Wendif-labels -Wpointer-arith
-Wbad-function-cast -Wcast-align -Wwrite-strings -Wstrict-prototypes
-Wold-style-definition -Wmissing-prototypes -Wmissing-declarations
-Wnormalized=nfc -Wnested-externs -Winline -Wvla -g -O2 -I../include -c -o
config_l.o config_l.c
lex.yy.c:611:11: error: conflicting types for 'yyget_leng'
configfile.l:39:5: note: previous declaration of 'yyget_leng' was here
int yyget_leng(void);
^
configfile.l: In function 'yylex':
configfile.l:169:19: error: comparison between signed and unsigned integer
expressions [-Werror=sign-compare]
if (i < yyleng)
^
lex.yy.c: In function 'yy_scan_bytes':
lex.yy.c:1861:17: error: comparison between signed and unsigned integer
expressions [-Werror=sign-compare]
lex.yy.c: At top level:
lex.yy.c:1935:11: error: conflicting types for 'yyget_leng'
configfile.l:39:5: note: previous declaration of 'yyget_leng' was here
int yyget_leng(void);
^
cc1: all warnings being treated as errors
It seems that the yyget_leng() function now returns a size_t, and not an int.
What would be the best way to fix the issue?
I see that someone added an autoconf test (defining YYLENG_IS_YY_SIZE_T) to
check
the type of yyleng:
https://github.com/bgilbert/nip2/commit/5b135dd968633ecee11a9aec8b35df5862f58683
Should a similar fix be used in INN or do you see another solution?
Then we would have:
--- innfeed/configfile.l (revision 9513)
+++ innfeed/configfile.l (working copy)
@@ -36,7 +36,7 @@
int yyget_lineno(void);
FILE *yyget_in(void);
FILE *yyget_out(void);
-int yyget_leng(void);
+#ifdef YYLENG_IS_YY_SIZE_T
+ size_t yyget_leng(void);
+#else
+ int yyget_leng(void);
+#endif
char *yyget_text(void);
int yyget_debug(void);
void yyset_lineno(int);
@@ -162,11 +162,11 @@
return (CHAR) ;}
\"[^\"]* {{
- int i ;
+#ifdef YYLENG_IS_YY_SIZE_T
+ size_t i ;
+#else
+ int i ;
+#endif
for (i = 1, strIdx = 0, sawBsl = 0 ; ; i++)
{
- if (i < yyleng)
+ if (i < yyget_leng())
current = yytext [i] ;
else
current = input() ;
And then we will have to expect flex 2.5.38 to have this bug fixed:
http://sourceforge.net/p/flex/bugs/140/
It prevents the use of -Wsign-compare because the code generated by flex
triggers a warning.
--
Julien ?LIE
? ? Je t'ai pr?par? une bonne soupe dont tu me diras des
nouvelles, mon gar?on !
? Pour moi, ?a, ce n'est pas des bonnes nouvelles ! ? (Ast?rix)
------------------------------
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
End of inn-workers Digest, Vol 53, Issue 5
******************************************