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



On Thu, Jan 31, 2013 at 02:47:25PM +0100, Petr Sumbera wrote:
Hi,

please see attached patch. pthread library is no longer needed from
Solaris 10.

See:
http://docs.oracle.com/cd/E19963-01/html/821-1601/compile-94611.html

"An application compiled on Solaris 10 can run on Solaris 9 if the 
application was explicitly linked with the libthread or libpthread 
libraries."

So it seems the safer option is to always link with libpthread.
Any drawback I miss here?

http://docs.oracle.com/cd/E26502_01/html/E29043/pthreads-5.html#REFMAN5pthreads-5

Thanks,

Petr

From Solaris 10 it's not necessary to link explicitly with libpthread
library because all the threading functions are in the libc library.

--- libxml2-2.9.0/configure.in        Wed Jan 30 07:40:27 2013
+++ libxml2-2.9.0/configure.in        Wed Jan 30 07:45:50 2013
@@ -1014,6 +1014,14 @@
             fi
         fi
        ;;
+       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

+            THREAD_LIBS=""
+            BASE_THREAD_LIBS=""
+           fi
+       ;;
     esac
     if test "$WITH_THREADS" = "1" ; then
      THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed




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