dovecot-sieve-1.1: Fixed compiling with old flex versions.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jul 8 01:16:11 EEST 2009
details: http://hg.dovecot.org/dovecot-sieve-1.1/rev/9bd499a166b4
changeset: 70:9bd499a166b4
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 07 18:16:07 2009 -0400
description:
Fixed compiling with old flex versions.
diffstat:
2 files changed, 17 insertions(+), 1 deletion(-)
src/libsieve/sieve-lex.l | 14 ++++++++++++++
src/libsieve/sieve.y | 4 +++-
diffs (42 lines):
diff -r fb361f100000 -r 9bd499a166b4 src/libsieve/sieve-lex.l
--- a/src/libsieve/sieve-lex.l Tue Jun 30 14:15:38 2009 -0400
+++ b/src/libsieve/sieve-lex.l Tue Jul 07 18:16:07 2009 -0400
@@ -171,3 +171,17 @@ static char *chkstr(char *str)
if (!str) return xstrdup("");
else return str;
}
+
+void my_yylex_destroy(void);
+#if defined(YY_FLEX_MAJOR_VERSION) && defined(YY_FLEX_MINOR_VERSION) && \
+ (YY_FLEX_MAJOR_VERSION > 2 || \
+ (YY_FLEX_MAJOR_VERSION == 2 && YY_FLEX_MINOR_VERSION >= 9))
+void my_yylex_destroy(void)
+{
+ yylex_destroy();
+}
+#else
+void my_yylex_destroy(void)
+{
+}
+#endif
diff -r fb361f100000 -r 9bd499a166b4 src/libsieve/sieve.y
--- a/src/libsieve/sieve.y Tue Jun 30 14:15:38 2009 -0400
+++ b/src/libsieve/sieve.y Tue Jul 07 18:16:07 2009 -0400
@@ -668,6 +668,8 @@ tests: test { $$ =
;
%%
+void my_yylex_destroy(void);
+
commandlist_t *sieve_parse(sieve_script_t *script, FILE *f)
{
commandlist_t *t;
@@ -679,7 +681,7 @@ commandlist_t *sieve_parse(sieve_script_
} else {
t = ret;
}
- yylex_destroy();
+ my_yylex_destroy();
ret = NULL;
return t;
}
More information about the dovecot-cvs
mailing list