summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-17 21:58:34 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-17 22:00:26 -0800
commit74fad4a7cecf57e87a721941b5962a7bcba21b42 (patch)
tree4caa3409234a623f6eb61e9de7d3f27037892fc4 /file.c
parent12b73912f2c80ddbc690bd44cc44b8ce09488511 (diff)
downloadsubsurface-74fad4a7cecf57e87a721941b5962a7bcba21b42.tar.gz
xsltMaxVars was only introduced in libxslt 1.1.27
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/file.c b/file.c
index b9cd5ba21..25221e635 100644
--- a/file.c
+++ b/file.c
@@ -14,6 +14,9 @@
/* For SAMPLE_* */
#include <libdivecomputer/parser.h>
+/* to check XSLT version number */
+#include <libxslt/xsltconfig.h>
+
/* Crazy windows sh*t */
#ifndef O_BINARY
#define O_BINARY 0
@@ -869,7 +872,9 @@ int parse_csv_file(const char *filename, int timef, int depthf, int tempf, int p
/* Increase the limits for recursion and variables on XSLT
* parsing */
xsltMaxDepth = 30000;
+#if LIBXSLT_VERSION > 10126
xsltMaxVars = 150000;
+#endif
if (timef >= MAXCOLS || depthf >= MAXCOLS || tempf >= MAXCOLS || po2f >= MAXCOLS || cnsf >= MAXCOLS || ndlf >= MAXCOLS || cnsf >= MAXCOLS || stopdepthf >= MAXCOLS || pressuref >= MAXCOLS)
return report_error(translate("gettextFromC", "Maximum number of supported columns on CSV import is %d"), MAXCOLS);