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

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

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


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

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

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.



Attachment: no_phtread.patch
Description: Text document

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