summaryrefslogtreecommitdiff
path: root/epan/dtd_parse.l
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dtd_parse.l')
-rw-r--r--epan/dtd_parse.l23
1 files changed, 18 insertions, 5 deletions
diff --git a/epan/dtd_parse.l b/epan/dtd_parse.l
index 6749dfb556..f097148809 100644
--- a/epan/dtd_parse.l
+++ b/epan/dtd_parse.l
@@ -1,9 +1,4 @@
/*
- * 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
@@ -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;
+}