summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-04 21:41:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-04 21:41:59 -0700
commited4c9902edb6a769c3faa1c835b045287578ccaa (patch)
tree898b0714c165e69f77f0f07cfc7a1d314773ada7 /parser.l
parentea6cb9c2ea015bfc7744c8749dbf65788d1900bc (diff)
downloadtxr-ed4c9902edb6a769c3faa1c835b045287578ccaa.tar.gz
txr-ed4c9902edb6a769c3faa1c835b045287578ccaa.tar.bz2
txr-ed4c9902edb6a769c3faa1c835b045287578ccaa.zip
Changes for FreeBSD 9.
* configure: Use pointer-based test for timegm, because -Werror=implicit-function-declaration does not work in the gcc 4.2 used on FreeBSD 9. * parser.l: Check for Flex 2.5.9 and earlier which don't have yylex_destroy. Thanks to Marcus Breiing.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l11
1 files changed, 11 insertions, 0 deletions
diff --git a/parser.l b/parser.l
index 15e7958b..1fa7ac38 100644
--- a/parser.l
+++ b/parser.l
@@ -71,6 +71,17 @@ val form_to_ln_hash;
static val prepared_error_message;
+#define FLEX_NUM_VERSION 1000*FLEX_MAJOR_VERSION + \
+ 100*FLEX_MINOR_VERSION + \
+ FLEX_SUBMINOR_VERSION
+
+#if FLEX_NUM_VERSION < 20509
+int yylex_destroy(void)
+{
+ return 0;
+}
+#endif
+
void yyerror(const char *s)
{
yyerrorf(lit("~a"), string_utf8(s), nao);