From: Adam Dickmeiss Date: Mon, 11 Oct 2010 10:50:56 +0000 (+0200) Subject: Allow compilation without Libxml2 support (again) X-Git-Tag: v4.1.2~20 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=aa688c4388adbbbf022e0dbfad51e9a12eef37a1 Allow compilation without Libxml2 support (again) --- diff --git a/src/solr.c b/src/solr.c index 8c1e29f..55a86ca 100644 --- a/src/solr.c +++ b/src/solr.c @@ -18,12 +18,12 @@ #include "sru-p.h" +#define SOLR_MAX_PARAMETERS 100 + #if YAZ_HAVE_XML2 #include #include -#define SOLR_MAX_PARAMETERS 100 - const char *xml_node_attribute_value_get(xmlNodePtr ptr, const char *node_name, const char *attribute_name) { struct _xmlAttr *attr; diff --git a/src/zoom-sru.c b/src/zoom-sru.c index bf00f61..c6d11e7 100644 --- a/src/zoom-sru.c +++ b/src/zoom-sru.c @@ -392,6 +392,7 @@ static void handle_srw_scan_response(ZOOM_connection c, int ZOOM_handle_sru(ZOOM_connection c, Z_HTTP_Response *hres, zoom_ret *cret) { +#if YAZ_HAVE_XML2 int ret = 0; const char *addinfo = 0; @@ -446,6 +447,9 @@ int ZOOM_handle_sru(ZOOM_connection c, Z_HTTP_Response *hres, ret = -1; } return ret; +#else + return -1; +#endif } /* diff --git a/util/yaz-record-conv.c b/util/yaz-record-conv.c index 4f943b6..d05ea11 100644 --- a/util/yaz-record-conv.c +++ b/util/yaz-record-conv.c @@ -7,6 +7,7 @@ #include #endif +#include #include #include @@ -30,6 +31,7 @@ int main (int argc, char **argv) case 'V': break; case 0: +#if YAZ_HAVE_XML2 if (!p) { xmlDocPtr doc = xmlParseFile(arg); @@ -92,11 +94,19 @@ int main (int argc, char **argv) fclose(f); } break; +#else + fprintf(stderr, "%s: YAZ not compiled with Libxml2 support\n", + prog); + usage(); + break; +#endif default: usage(); } - } + } +#if YAZ_HAVE_XML2 yaz_record_conv_destroy(p); +#endif if (no_errors) exit(1); exit(0);