From: Matthew T Harden Date: Fri, 28 Aug 1998 14:10:42 +0000 (+0000) Subject: updated usethreads hints for hpux 10.X X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ac5a1fe856ae9296e1a0c7e52d5e675b059eff4;p=p5sagit%2Fp5-mst-13.2.git updated usethreads hints for hpux 10.X Message-Id: <199808281410.AA11058@mthard1.monsanto.com> Subject: Re: OK: perl 5.00502 on PA-RISC1.1-thread 10.20 (UNINSTALLED) p4raw-id: //depot/perl@1817 --- diff --git a/hints/hpux.sh b/hints/hpux.sh index 281f289..7ff265c 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -128,6 +128,27 @@ else selecttype='int *' fi +# Under 10.X, a threaded perl can be built, but it needs +# libcma and OLD_PTHREADS_API. Also needs to +# be #included before any other includes (in perl.h) +if [ "$xxOsRevMajor" -eq 10 -a "X$usethreads" = "X$define" ]; then + + # HP-UX 10.X uses the old pthreads API + case "$d_oldpthreads" in + '') d_oldpthreads="$define" ;; + esac + + # include libcma before all the others + libswanted="cma $libswanted" + + # tell perl.h to include before other include files + ccflags="$ccflags -DPTHREAD_H_FIRST" + + # CMA redefines select to cma_select, and cma_select expects int * + # instead of fd_set * (just like 9.X) + selecttype='int *' +fi + # Remove bad libraries that will cause problems # (This doesn't remove libraries that don't actually exist) diff --git a/perl.h b/perl.h index c406f38..91b9058 100644 --- a/perl.h +++ b/perl.h @@ -302,6 +302,13 @@ register struct op *op asm(stringify(OP_IN_REGISTER)); # endif #endif +/* HP-UX 10.X CMA (Common Multithreaded Architecure) insists that + pthread.h must be included before all other header files. +*/ +#if defined(USE_THREADS) && defined(PTHREAD_H_FIRST) +# include +#endif + #ifndef _TYPES_ /* If types.h defines this it's easy. */ # ifndef major /* Does everyone's types.h define this? */ # include