Re: [xml] libxml2 and pthreads

Daniel Veillard wrote:
On Thu, Aug 19, 2004 at 11:54:47AM -0700, Ben Greear wrote:


While porting some code forward from RH 9 to FC 2, I noticed
that anything I linked with libxml also needed to be linked
with pthreads.  For various reasons I do not want to link against
pthreads, so I am curious to know what is the preferred method of
building/finding a pthread-less libxml?

  configure --without-threads

With most other libraries, any locking is done by the calling code.
Why did libxml see the need to pull pthreads internal?

  we call pthread from libxml2 for locking and thread private data.
This affect malloc() and free() too.

I do not have to link libpthread for normal malloc and free though,
and when I fork() from a signal handler my program doesn't deadlock
deep in libpthread :)

I'll give the --without-threads option a try.


Ben Greear <greearb candelatech com>
Candela Technologies Inc

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