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:
@@ -33,8 +33,7 @@ HEADERS = aes.h app.h assertions.h atomic.h backtrace.h \
|
||||
region.h resource.h result.h resultclass.h rwlock.h \
|
||||
safe.h serial.h siphash.h sockaddr.h socket.h \
|
||||
stats.h stdio.h strerr.h string.h symtab.h \
|
||||
task.h taskpool.h timer.h tm.h types.h util.h version.h \
|
||||
xml.h
|
||||
task.h taskpool.h timer.h tm.h types.h util.h version.h
|
||||
|
||||
SUBDIRS =
|
||||
TARGETS =
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/platform.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/xml.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
@@ -467,7 +466,7 @@ isc_mem_gettag(isc_mem_t *ctx);
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
int
|
||||
isc_mem_renderxml(xmlTextWriterPtr writer);
|
||||
isc_mem_renderxml(void *writer0);
|
||||
/*%<
|
||||
* Render all contexts' statistics and status in XML for writer.
|
||||
*/
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/time.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/xml.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
@@ -1017,7 +1016,7 @@ isc_socket_hasreuseport(void);
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
int
|
||||
isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer);
|
||||
isc_socketmgr_renderxml(isc_socketmgr_t *mgr, void *writer0);
|
||||
/*%<
|
||||
* Render internal statistics and other state into the XML document.
|
||||
*/
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
#include <isc/lang.h>
|
||||
#include <isc/stdtime.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/xml.h>
|
||||
|
||||
#define ISC_TASKEVENT_FIRSTEVENT (ISC_EVENTCLASS_TASK + 0)
|
||||
#define ISC_TASKEVENT_SHUTDOWN (ISC_EVENTCLASS_TASK + 1)
|
||||
@@ -763,7 +762,7 @@ isc_taskmgr_excltask(isc_taskmgr_t *mgr, isc_task_t **taskp);
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
int
|
||||
isc_taskmgr_renderxml(isc_taskmgr_t *mgr, xmlTextWriterPtr writer);
|
||||
isc_taskmgr_renderxml(isc_taskmgr_t *mgr, void *writer0);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_JSON_C
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ISC_XML_H
|
||||
#define ISC_XML_H 1
|
||||
|
||||
/*
|
||||
* This file is here mostly to make it easy to add additional libxml header
|
||||
* files as needed across all the users of this file. Rather than place
|
||||
* these libxml includes in each file, one include makes it easy to handle
|
||||
* the ifdef as well as adding the ability to add additional functions
|
||||
* which may be useful.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/xmlwriter.h>
|
||||
#endif
|
||||
|
||||
#define ISC_XMLCHAR (const xmlChar *)
|
||||
|
||||
#define ISC_XML_RENDERCONFIG 0x00000001 /* render config data */
|
||||
#define ISC_XML_RENDERSTATS 0x00000002 /* render stats */
|
||||
#define ISC_XML_RENDERALL 0x000000ff /* render everything */
|
||||
|
||||
#endif /* ISC_XML_H */
|
||||
Reference in New Issue
Block a user