2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Make the usage of libxml2 opaque to the caller

The libxml2 have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
This commit is contained in:
Ondřej Surý
2019-06-24 14:25:55 +02:00
parent 11db639945
commit 0771dd3be8
63 changed files with 302 additions and 235 deletions

View File

@@ -34,7 +34,11 @@
#include <isc/thread.h>
#include <isc/time.h>
#include <isc/util.h>
#include <isc/xml.h>
#ifdef HAVE_LIBXML2
#include <libxml/xmlwriter.h>
#define ISC_XMLCHAR (const xmlChar *)
#endif /* HAVE_LIBXML2 */
#ifdef OPENSSL_LEAKS
#include <openssl/err.h>
@@ -1666,10 +1670,11 @@ isc_task_exiting(isc_task_t *t) {
#ifdef HAVE_LIBXML2
#define TRY0(a) do { xmlrc = (a); if (xmlrc < 0) goto error; } while(0)
int
isc_taskmgr_renderxml(isc_taskmgr_t *mgr0, xmlTextWriterPtr writer) {
isc_taskmgr_renderxml(isc_taskmgr_t *mgr0, void *writer0) {
isc__taskmgr_t *mgr = (isc__taskmgr_t *)mgr0;
isc__task_t *task = NULL;
int xmlrc;
xmlTextWriterPtr writer = (xmlTextWriterPtr)writer0;
LOCK(&mgr->lock);