Bug 2493: Fix (Part 2):
To prevent Windows compiler errors when using flex 2.5.35. Fixes "missing unistd.h" and yywrap "mismatched parameter" warnings [Upcoming Part 3: ignore 'signed /unsigned mismatch' errors] svn path=/trunk/; revision=25173
This commit is contained in:
parent
ff52380765
commit
0d4b874b44
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
%option nounput
|
||||
|
||||
/*
|
||||
* We don't read from the terminal.
|
||||
*/
|
||||
|
@ -806,6 +796,17 @@ void ddict_print(FILE* fh, ddict_t* d) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef TEST_DIAM_DICT_STANDALONE
|
||||
int main(int argc, char** argv) {
|
||||
ddict_t* d;
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
@ -111,6 +106,13 @@
|
|||
|
||||
#define YY_INPUT(buff,result,max_size) ( (result) = my_yyinput((buff),(max_size)) )
|
||||
|
||||
/*
|
||||
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define YY_NO_UNISTD_H
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
comment_start "<!--"
|
||||
|
@ -367,3 +369,14 @@ extern dtd_build_data_t* dtd_parse(GString* s) {
|
|||
|
||||
return build_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
@ -82,6 +77,13 @@ static guint linenum;
|
|||
static gchar* replace_entity(gchar* s);
|
||||
static const gchar* location(void);
|
||||
|
||||
/*
|
||||
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define YY_NO_UNISTD_H
|
||||
#endif
|
||||
|
||||
%}
|
||||
xmlpi_start "<?"
|
||||
xmlpi_stop "?>"
|
||||
|
@ -217,3 +219,14 @@ extern GString* dtd_preparse(const gchar* dname,const gchar* fname, GString* er
|
|||
|
||||
return output;
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
@ -419,3 +414,14 @@ gboolean radius_load_dictionary (radius_dictionary_t* d, gchar* dir, const gchar
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
@ -349,3 +344,14 @@ gboolean uat_load_str(uat_t* uat_in, char* entry, char** err) {
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
@ -73,6 +68,13 @@
|
|||
|
||||
#define MATE_PARSE(token_type) MateParser(pParser, (token_type), g_strdup(yytext), mc );
|
||||
|
||||
/*
|
||||
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define YY_NO_UNISTD_H
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
pdu_kw Pdu
|
||||
|
@ -325,3 +327,14 @@ extern gboolean mate_load_config(const gchar* filename, mate_config* matecfg) {
|
|||
|
||||
return state;
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
@ -731,6 +726,17 @@ void wimaxasncp_dict_print(FILE *fh, wimaxasncp_dict_t *d) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef TEST_WIMAXASNCP_DICT_STANDALONE
|
||||
int main(int argc, char **argv) {
|
||||
wimaxasncp_dict_t *d;
|
||||
|
|
|
@ -41,7 +41,14 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "text2pcap.h"
|
||||
|
||||
|
||||
/*
|
||||
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define YY_NO_UNISTD_H
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
hexdigit [0-9A-Fa-f]
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't read from the terminal.
|
||||
*/
|
||||
|
@ -353,3 +348,14 @@ void ascend_init_lexer(FILE_T fh)
|
|||
yy_fh = fh;
|
||||
BEGIN(INITIAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* We don't use unput, so don't generate code for it.
|
||||
*/
|
||||
|
@ -327,3 +322,14 @@ int k12text_dump_can_write_encap(int encap) {
|
|||
return WTAP_ERR_UNSUPPORTED_ENCAP;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
* (%option noyywrap is not used because if used then
|
||||
* some flex versions (eg: 2.5.35) generate code which causes
|
||||
* warnings by the Windows VC compiler).
|
||||
*/
|
||||
|
||||
int yywrap(void) {
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue