path: root/mimetypes/
authorSergey Poznyakoff <>2018-01-13 09:29:15 (GMT)
committer Sergey Poznyakoff <>2018-01-13 09:32:52 (GMT)
commit672f113f48209834926f649cdebf8e11dae64af0 (patch) (side-by-side diff)
treeeb8118b0db3256a0c58d8c6ea67ad22c48749bd4 /mimetypes/
parent8c68d2a748ce641209d4e4a142a14ca2b0477c5a (diff)
Various fixes in libmimetypes
* mimetypes/ Rename yy prefix in grammar and lexer. * mimetypes/grammar.y (yyerror, yylex): Provide extern declarations. * mimetypes/lexer.l (yylval, yylloc, yyerror): Provide defines to compensate for --name-prefix in bison (see notes in Fix improper usage of yyerror.
Diffstat (limited to 'mimetypes/') (more/less context) (ignore whitespace changes)
1 files changed, 14 insertions, 3 deletions
diff --git a/mimetypes/ b/mimetypes/
index cdcb0f1..3517a76 100644
--- a/mimetypes/
+++ b/mimetypes/
@@ -12,7 +12,18 @@ libmimetypes_a_SOURCES = \
+# Notes on prefix renaming:
+# 1) bison and flex are required
+# 2) The following symbols must be renamed manually in lexer.l:
+# yylval, yylloc, yyerror. We do so by inserting appropriate
+# #defines immediately after the #include block.
+# 3) flex --prefix also renames the output root, so LEX_OUTPUT_ROOT
+# must be redefined to compensate for it.
+# In general, all of the above is a terrible kludge. I'd be better off
+# using gylwrap from GNU mailutils.
+AM_YFLAGS=-v -t -d --name-prefix=yymt
+AM_LFLAGS=-d --prefix=yymt
SUBDIRS = . tests

Return to:

Send suggestions and report system problems to the System administrator.