Re: [xml] solaris and pthread library [patch]

Hi All,
So it seems the safer option is to always link with libpthread.
Any drawback I miss here?
May be better is to rewrite current test to be more portable.
According to specs file on linux gcc with -pthread add pthread library and define _REENTRANT.

AX_PTHREAD is an existing macro distributed under GPL. May be current test could be replaced to use this macro if there is no license issue.

What could be used, on solaris for pthread support, instead link with library ? If compiler is gcc is enough to set -pthreads as compiler flag (CFLAGS) ? What about other compilers (Sun C? ) ?

As far as I can tell Solaris guarantees only backward compatibility. And this is not the case. Actually it's very likely that you won't be able to execute binary (if it's not just hello world) on older system because new binary requires new libc version.

--- libxml2-2.9.0/    Wed Jan 30 07:40:27 2013
+++ libxml2-2.9.0/    Wed Jan 30 07:45:50 2013
@@ -1014,6 +1014,14 @@
+       solaris*)
+ SOLARIS_MAJOR=`echo $host_os | sed -e 's+solaris++' -e 's+\..*++'`
+           SOLARIS_MINOR=`echo $host_os | sed 's+solaris[[0-9]]*\.++'`
+ if test $SOLARIS_MAJOR -ge 2 -a $SOLARIS_MINOR -ge 10 ; then

This test would not do what you intend on Solaris 3.0

Hmm. Solaris 3.0 :-) Please see attached new version.
Please, test for feature with use functional tests instead to hard code a feature based on os version.



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