Add a libxml2 version check to make gst-compprep compile again on FC1

Original commit message from CVS:
Add a libxml2 version check to make gst-compprep compile again on FC1
This commit is contained in:
Jan Schmidt 2004-06-12 15:27:59 +00:00
parent 30128f9b16
commit cc9d178af2
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-06-13 Jan Schmidt <thaytan@mad.scientist.com>
* tools/gst-compprep.c: (handle_xmlerror), (main):
Add a check for the version that introduced SetStructuredError to fix
the build on FC1
2004-06-12 Steve Lhomme <steve.lhomme@free.fr>
* win32/msvc71.sln:

View file

@ -10,12 +10,16 @@ GST_DEBUG_CATEGORY_STATIC (debug_compprep);
#define GST_CAT_DEFAULT debug_compprep
#define GST_COMPREG_FILE (GST_CACHE_DIR "/compreg.xml")
#ifdef HAVE_LIBXML2
#if LIBXML_VERSION >= 20600
void
handle_xmlerror (void *userData, xmlErrorPtr error)
{
g_print ("Error writing the completion registry: %s, %s\n", GST_COMPREG_FILE,
error->message);
}
#endif
#endif
int
main (int argc, char *argv[])
@ -128,7 +132,9 @@ main (int argc, char *argv[])
}
#ifdef HAVE_LIBXML2
#if LIBXML_VERSION >= 20600
xmlSetStructuredErrorFunc (NULL, handle_xmlerror);
#endif
xmlSaveFormatFile (GST_COMPREG_FILE, doc, 1);
#else
xmlSaveFile (GST_COMPREG_FILE, doc);