Adrian Bunk wrote:
On Fri, Nov 19, 2010 at 10:00:38PM +0200, Roumen Petrov wrote:
Kwasi Mensah wrote:
I ran into the issue where HAVE_PTHREAD_H is defined but
LIBXML_THREAD_ENABLED wasn't. The fix was already submitted as per  .

Out of curiosity, is there a reason this patch didn't get into that main

This is with libxml2 2.7.8 on Mac OS X. I ran the configure script but

In summary :
- gcc -pthread defines _REENTRANT on linux
- gcc -pthread does not define preprocesor macros on FreeBSD and OS

I guess other BSDs to be similar as FreeBSD.
No Idea how to resolve properly issue.
The proper solution would be to:
- get rid of the #if's in and
- set one threads variable in when using threads and
- *if* that variable is set, set an additional variable in specifying which threads type is used
As Daniel is author of the code I would like to leave to him to detail. Lets see the code
#  if XXX
#  endif /*XXX*/
as @WITH_THREADS@ depend from configure script/settings/detection.

If i understand properly if libxml is compiled :
- without threading support to forbid third party to use threading. In this case @WITH_THREADS@ will be zero and nested if are not applicable. - with threading support to enable/disable threading for third party depending from some flags. In this case @WITH_THREADS@ will be one and nested #if is applicable.

The issue is with second case - how thread aware libxml to detect that third party application/library require threading.


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