Re: [libxml++] Win32 link error (v0.24.0 + msvc patch)



The relevant lines from xmlversion.h are:

/**
 * LIBXML_THREAD_ENABLED:
 *
 * Whether the thread support is configured in
 */
#if 1
#if defined(_REENTRANT) || (_POSIX_C_SOURCE - 0 >= 199506L)
#define LIBXML_THREAD_ENABLED
#endif
#endif


If the library is compiled without threads it would say  #if 0 and never
define LIBXML_THREAD_ENABLED
so:
In msvc you have to define _REENTRANT to get LIBXML_THREAD_ENABLED when
thread support is on, and it will have no effect on libxml when thread
support is off.

On unix machines it may be that the _POSIX_C_SOURCE is automatically defined
so there is no need to define anything else, but this is just a guess (it is
so on my linux).

-eff


----- Original Message ----- 
From: <Murray Cumming Comneon com>
To: <libxmlplusplus-general lists sourceforge net>
Sent: Tuesday, June 24, 2003 5:54 PM
Subject: RE: [libxml++] Win32 link error (v0.24.0 + msvc patch)


> > From: Christophe de VIENNE [mailto:cdevienne alphacent com]
> > > Do we have the same configure option?
> >
> > no
> >
> > >
> > > > Question for autotools gurus:
> > > > - - Is there a way at configure time to now wether or not
> > > > libxml2 has been
> > > > compiled with thread-support ?
> > >
> > > Probably not. When people are compiling from source it's OK
> > to assume that
> > > they know what they are doing. If you use unusual compiler
> > or configure
> > > options then you have to be careful.
> >
> > So we just have to add --enable-thread option to configure,
> > which will add
> > - -D_REENTRANT to CXXFLAGS. Right ?
>
> Dunno. I guess we should
> a) Do what libxml does.
> b) Do what libxml suggests that apps-that-use-libxml do.
>
> On the other hand, nobody has reported this as a real-world bug yet, so
I'm
> inclined to be lazy.
>
> Murray Cumming
> murrayc usa net
> www.murrayc.com
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> Libxmlplusplus-general mailing list
> Libxmlplusplus-general lists sourceforge net
> https://lists.sourceforge.net/lists/listinfo/libxmlplusplus-general
>





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