From 63aa6af8c87677136cf3e9dca400421e6528340b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sun, 14 Jan 2007 17:34:31 +0000 Subject: [PATCH] Fix bug #814: pazpar2 does not compile on Debian woody. Use xmlParseFile instead of xmlReadFile. Use xmlDocDump instead of xmlDocFormatDump on Libxml2 version < 2.6.0. --- src/config.c | 4 ++-- src/pazpar2.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index de47152..1f1052c 100644 --- a/src/config.c +++ b/src/config.c @@ -1,4 +1,4 @@ -/* $Id: config.c,v 1.10 2007-01-12 15:08:44 quinn Exp $ */ +/* $Id: config.c,v 1.11 2007-01-14 17:34:31 adam Exp $ */ #include @@ -418,7 +418,7 @@ static struct conf_config *parse_config(xmlNode *root) int read_config(const char *fname) { - xmlDoc *doc = xmlReadFile(fname, NULL, 0); + xmlDoc *doc = xmlParseFile(fname); const char *p; if (!nmem) // Initialize diff --git a/src/pazpar2.c b/src/pazpar2.c index fc5ee38..31d5891 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.28 2007-01-12 23:37:15 adam Exp $ */ +/* $Id: pazpar2.c,v 1.29 2007-01-14 17:34:31 adam Exp $ */ #include #include @@ -423,7 +423,11 @@ static xmlDoc *normalize_record(struct client *cl, Z_External *rec) if (global_parameters.dump_records) { fprintf(stderr, "Record:\n----------------\n"); +#if LIBXML_VERSION >= 20600 xmlDocFormatDump(stderr, rdoc, 1); +#else + xmlDocDump(stderr, rdoc); +#endif } return rdoc; } -- 1.7.10.4