Usage of libxml2 for several modules

Nikolay Sivov bunglehead at
Fri Jan 15 17:41:56 CST 2010

I'm thinking about implementing xmllite library - its interface is 
almost the same as xmlTextReader/Writer from libxml2 so it's potentially 
a thin wrapper, and it's good.

The problem is that libxml2 is not reentrant. This isn't a problem for 
xmllite itself, cause it's not thread safe too, but:
we already have a msxml3 module that loads libxml2.
If let's say a process with 2 threads use msxml3 for first and xmllite 
for second then it's not safe anymore, cause both modules use the same 
libxml2 instance.

If I'm right then only solution is to link to libxml2 statically from 
each module. Is it an acceptable way?

P.S. having a separate copy of libxml2 allows to tweak its namespace 
support (I believe there's some discussions of that problem in bugzilla).

More information about the wine-devel mailing list