[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Problems with pthread detection under HPUX 11.0 (ITS#14)

Content-Type: text/plain; charset=us-ascii

Try the attached patch. I've tested it under the HPUX 11 boxes I have. A quick
run on one of my remaining 10.20 boxes shows that this bit of code never gets

That isnt so much of a hardship as 10.20 had horribly broken DCE threads
anyways. The only situation I can think of in which this patch might get
confused/fail to work is with HPUX 10.30 machines. 10.30 had usable threads,
but since we got rid of our 10.30 machines some time ago, I cant work up an
appropriate test.

Again, I dont really forsee this to be a big issue. 10.30 wasnt in general
release - it was only available if customers complained loudly enough. HP
strongly encourages everyone to go straight to 11.00 these days.


Josh Tiefenbach - Member - ACC Corps of Internet Engineers - josh@ican.net

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="conf.patch"

Index: configure.in
RCS file: /home/josh/projects/openldap/repo/pkg/ldap/configure.in,v
retrieving revision 1.68
diff -u -r1.68 configure.in
--- configure.in	1998/12/28 19:08:17	1.68
+++ configure.in	1998/12/30 15:52:14
@@ -382,6 +382,36 @@
 		dnl Now the hard part, how to link
+		dnl HP-UX 11 check
+		if test $ol_link_threads = no; then
+			save_LIBS="$LIBS"
+			LIBS="$LIBS -lpthread"
+			AC_MSG_CHECKING([for pthread_create() in HP-UX -lpthread])
+			ol_try_pthread_hpux_11=no
+			AC_CACHE_VAL(ol_cv_pthread_hpux_11,[
+				AC_TRY_LINK([#include <pthread.h>
+							 #include <elf.h>
+#ifndef ELFABI_HPUX_REL11
+		die horribly
+				], [pthread_create(NULL, NULL, NULL, NULL);],
+					ol_try_pthread_hpux_11=yes
+					ol_cv_pthread_hpux_11=yes,
+					ol_cv_pthread_hpux_11=no)])
+			AC_MSG_RESULT(yes)
+			LIBS="$save_LIBS"
+			if test $ol_cv_pthread_hpux_11=yes ; then
+				if test $ol_try_pthread_hpux_11=yes ; then
+					dnl Some tests below may fail, cause we aint including
+					dnl pthread.h. Force appropriate ones to yes
+					ol_link_threads=posix
+					ac_cv_func_pthread_attr_init=yes
+				fi
+			fi
+		fi
 		dnl Check for pthread support in current $LIBS