25#ifdef LIBXML_MODULES_ENABLED
32static void *xmlModulePlatformOpen(
const char *
name);
33static int xmlModulePlatformClose(
void *
handle);
34static int xmlModulePlatformSymbol(
void *
handle,
const char *
name,
void **
result);
49xmlModuleErrMemory(xmlModulePtr
module,
const char *
extra)
60 "Memory allocation failed : %s\n",
extra);
84 xmlModuleErrMemory(
NULL,
"creating module");
119xmlModuleSymbol(xmlModulePtr
module,
const char *
name,
void **symbol)
126 NULL,
NULL, 0, 0,
"null parameter\n");
130 rc = xmlModulePlatformSymbol(
module->handle,
name, symbol);
136 "failed to find symbol: %s\n",
155xmlModuleClose(xmlModulePtr
module)
162 NULL,
NULL, 0, 0,
"null module pointer\n");
166 rc = xmlModulePlatformClose(
module->handle);
172 "failed to close: %s\n",
module->name);
176 rc = xmlModuleFree(
module);
191xmlModuleFree(xmlModulePtr
module)
196 NULL,
NULL, 0, 0,
"null module pointer\n");
206#if defined(HAVE_DLOPEN) && !defined(_WIN32)
223xmlModulePlatformOpen(
const char *
name)
236xmlModulePlatformClose(
void *
handle)
248xmlModulePlatformSymbol(
void *
handle,
const char *
name,
void **symbol)
251 if (dlerror() !=
NULL) {
269xmlModulePlatformOpen(
const char *
name)
271 return shl_load(
name, BIND_IMMEDIATE, 0
L);
280xmlModulePlatformClose(
void *
handle)
282 return shl_unload(
handle);
292xmlModulePlatformSymbol(
void *
handle,
const char *
name,
void **symbol)
297 rc = shl_findsym(&
handle,
name, TYPE_UNDEFINED, symbol);
306#define WIN32_LEAN_AND_MEAN
315xmlModulePlatformOpen(
const char *
name)
326xmlModulePlatformClose(
void *
handle)
341xmlModulePlatformSymbol(
void *
handle,
const char *
name,
void **symbol)
345 return (
NULL == *symbol) ? -1 : 0;
353#include <kernel/image.h>
362xmlModulePlatformOpen(
const char *
name)
364 return (
void *) load_add_on(
name);
374xmlModulePlatformClose(
void *
handle)
378 rc = unload_add_on((image_id)
handle);
393xmlModulePlatformSymbol(
void *
handle,
const char *
name,
void **symbol)
397 rc = get_image_symbol((image_id)
handle,
name, B_SYMBOL_TYPE_ANY, symbol);
399 return (rc == B_OK) ? 0 : -1;
415xmlModulePlatformOpen(
const char *
name)
421 rc = DosLoadModule(errbuf,
sizeof(errbuf) - 1,
name, &
handle);
436xmlModulePlatformClose(
void *
handle)
438 return DosFreeModule(
handle);
448xmlModulePlatformSymbol(
void *
handle,
const char *
name,
void **symbol)
452 rc = DosQueryProcAddr(
handle, 0,
name, symbol);
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
#define XML_IGNORE_PEDANTIC_WARNINGS
XMLPUBVAR xmlMallocFunc xmlMalloc
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)