[xml] Problem with calling conventions on windows



Hello everyone,

  i have a problem with windows builds when a lib or exe that uses
libxml2 has a different default calling convention. And it is not
possible to built libxml2 itself with another calling convention.

To solve the issue the below patch introduces two new macros:

1) XMLCDECL  which is __cdecl for all windows compilers
2) LIBXML_FASTCALL which can be used to link from a cdecl project to a 
   __fastcall linked libxml2.

Can anybody please verify this?

The patch is here:
http://marcus-boerger.de/libxml2-bug309757-20050718.diff.txt

And in the hope this eases the process of validation i added a msvc.net 
project to verify the problems:
http://marcus-boerger.de/libxml2-bug309757.zip

If you want to verify the mixed build and don't want to rebuild iconv.dll then 
you also need an updated iconv.h:
http://marcus-boerger.de/libxml2-bug309757-iconv.h

You may also comment in the bug database:
http://bugzilla.gnome.org/show_bug.cgi?id=309757

If you look closely and miss the changed in trio than relax, windows doesn't
need trio since the windows _vsnprintf() is quite a good enough approximation
to iso vsnprintf(). And the others shouldn't have problems. If you still
want trio there is no problem unless you want to do your own non __cdecl
libxml2 builds.


Best regards,
 Marcus                          mailto:mail marcus-boerger de




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]