[libxml2] Few cleanup patches for Windows
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Few cleanup patches for Windows
- Date: Wed, 27 Mar 2013 01:57:25 +0000 (UTC)
commit e1631e1cfcdf4bd7e7ec4999ec5aae9675390797
Author: Denis Pauk <pauk denis gmail com>
Date: Sun Mar 10 12:47:37 2013 +0200
Few cleanup patches for Windows
https://bugzilla.gnome.org/show_bug.cgi?id=690878
provided by Cole <coleharrisjohnson gmail com>
catalog.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/catalog.c b/catalog.c
index 61cce03..8e34cd2 100644
--- a/catalog.c
+++ b/catalog.c
@@ -84,10 +84,12 @@ static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
#define GetModuleHandleA GetModuleHandle
#define GetModuleFileNameA GetModuleFileName
#else
+#if !defined(_WINDOWS_)
void* __stdcall GetModuleHandleA(const char*);
unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
#endif
#endif
+#endif
static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID);
static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename);
@@ -989,7 +991,7 @@ xmlLoadFileContent(const char *filename)
return (NULL);
}
#endif
- content = xmlMallocAtomic(size + 10);
+ content = (xmlChar*)xmlMallocAtomic(size + 10);
if (content == NULL) {
xmlCatalogErrMemory("allocating catalog data");
return (NULL);
@@ -1547,7 +1549,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
NULL, catal->prefer, NULL);
if (doregister) {
catal->type = XML_CATA_CATALOG;
- cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
+ cur = (xmlCatalogEntryPtr)xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
if (cur != NULL)
cur->children = catal->children;
}
@@ -3129,7 +3131,7 @@ xmlInitializeCatalog(void) {
if (p != buf) {
xmlChar* uri;
strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
- uri = xmlCanonicPath(buf);
+ uri = xmlCanonicPath((const xmlChar*)buf);
if (uri != NULL) {
strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);
xmlFree(uri);
@@ -3244,7 +3246,7 @@ xmlLoadCatalogs(const char *pathss) {
cur++;
path = xmlStrndup((const xmlChar *)paths, cur - paths);
#ifdef _WIN32
- iLen = strlen(path);
+ iLen = strlen((const char*)path);
for(i = 0; i < iLen; i++) {
if(path[i] == '\\') {
path[i] = '/';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]