diff options
author | Denis Pauk <pauk.denis@gmail.com> | 2013-03-10 12:47:37 +0200 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2013-03-27 09:55:14 +0800 |
commit | e1631e1cfcdf4bd7e7ec4999ec5aae9675390797 (patch) | |
tree | fe6524454957ada2bd3d5a590fd83f8203d08f1c /catalog.c | |
parent | f7aeda24f619daf806a3cfd708c28cc662e45fe7 (diff) | |
download | libxml2-e1631e1cfcdf4bd7e7ec4999ec5aae9675390797.tar.gz |
Few cleanup patches for Windows
https://bugzilla.gnome.org/show_bug.cgi?id=690878
provided by Cole <coleharrisjohnson@gmail.com>
Diffstat (limited to 'catalog.c')
-rw-r--r-- | catalog.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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] = '/'; |