After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690878 - Code fixes in catalog.c
Code fixes in catalog.c
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-30 05:35 UTC by Cole
Modified: 2013-03-27 01:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes from this ticket as patch (2.18 KB, patch)
2013-03-10 11:02 UTC, Denis Pauk
none Details | Review

Description Cole 2012-12-30 05:35:15 UTC
Around line 3123, change


uri = xmlCanonicPath(buf);
if (uri != NULL) {
    strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);

to:

uri = xmlCanonicPath((const xmlChar*)buf);
if (uri != NULL) {
    strncpy(XML_XML_DEFAULT_CATALOG, (const char*)uri, 255);
Comment 1 Cole 2012-12-30 05:37:30 UTC
Around line 992, change
    content = xmlMallocAtomic(size + 10);
to
    content = (xmlChar*)xmlMallocAtomic(size + 10);

Around line 3247, change
        iLen = strlen(path);
to
        iLen = strlen((const char*)path);
Comment 2 Cole 2012-12-30 05:39:07 UTC
Around line 1550, change
	cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
to
	cur = (xmlCatalogEntryPtr)xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
Comment 3 Cole 2012-12-30 05:51:18 UTC
At line 87, change

void* __stdcall GetModuleHandleA(const char*);

to

#if !defined(_WINDOWS_)
void* __stdcall GetModuleHandleA(const char*);
#endif

duplicate deceleration results if <Windows.h> is included before <libxml/catalog.h>
Comment 4 Cole 2012-12-30 05:52:11 UTC
(In reply to comment #3)
> At line 87, change
> 
> void* __stdcall GetModuleHandleA(const char*);
> 
> to
> 
> #if !defined(_WINDOWS_)
> void* __stdcall GetModuleHandleA(const char*);
> #endif
> 
> duplicate deceleration results if <Windows.h> is included before
> <libxml/catalog.h>


#if !defined(_WINDOWS_)
void* __stdcall GetModuleHandleA(const char*);
unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
#endif
Comment 5 André Klapper 2012-12-30 13:08:27 UTC
Patches are highly welcome, see https://live.gnome.org/Git/Developers
Comment 6 Cole 2013-01-06 20:51:05 UTC
I don't have Git
Comment 7 Denis Pauk 2013-03-10 11:02:15 UTC
Created attachment 238514 [details] [review]
Fixes from this ticket as patch

Compiled without warnings on linux, not checked under windows
Comment 8 Daniel Veillard 2013-03-27 01:58:36 UTC
Okay, pushed to git, thanks !

https://git.gnome.org/browse/libxml2/commit/?id=e1631e1cfcdf4bd7e7ec4999ec5aae9675390797

Daniel