Re: [xml] LIBXML_THREAD_ENABLED and HAVE_PTHREAD_H mismatch



On Wed, Nov 17, 2010 at 01:28, Roumen Petrov <bugtrack roumenpetrov info> wrote:
Andrew W. Nosenko wrote:

On Tue, Nov 16, 2010 at 01:05, Roumen Petrov<bugtrack roumenpetrov info>
 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
http://mail.gnome.org/archives/xml/2005-August/msg00136.html .

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

This is with libxml2 2.7.8 on Mac OS X. I ran the configure script but
I'm
not using the make scripts as I have to make a static library that will
work
on the iPhone.

Thanks,
kwasi



May be. Note that my gcc  4.2.4 return:
$ gcc -pthread -E -dM -</dev/null | grep REEN

#define _REENTRANT 1
$ gcc -E -dM -</dev/null | grep REEN

Roumen


$ uname -rs
FreeBSD 8.0-RELEASE-p1

$ gcc --version
gcc (GCC) 4.2.1 20070719  [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ touch zzz.h
$ gcc -pthread -E -dM zzz.h | grep REEN
$ gcc -pthread -E -dM zzz.h | wc -l
     111

$ gcc45 --version
gcc45 (GCC) 4.5.2 20101104 (prerelease)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ gcc45 -pthread -E -dM zzz.h | grep REEN
$ gcc45 -pthread -E -dM zzz.h | wc -l
     201


My limited FreeBSD knowledge is that -kthread is prefered flag.

You mistaken.  There no -kthread GCC option.

I really don't know how to build thread aware FreeBSD application.

Same as under Linux: use -pthread.


What is difference of internal gcc variables if above test is performed with
and without -kthread flag ?

See above: there no -kthread flag

Did gcc (on freebsd) defines _THREAD_SAFE ?

$ gcc -pthread -E -dM - < /dev/null | grep -i thr
$ gcc45 -pthread -E -dM - < /dev/null | grep -i thr
$

-- 
Andrew W. Nosenko <andrew w nosenko gmail com>



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