X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Ffreebsd.sh;h=7a2b23a8fbc1c422f112efb28edf4f395524447d;hb=8aa8f774be44d46814d4ddbad03e302f1eb37338;hp=a553633f33bb2726f879c3383864371db5ca84ff;hpb=5628bcce1bc89f7739f986067312dc27ada319e1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/freebsd.sh b/hints/freebsd.sh index a553633..7a2b23a 100644 --- a/hints/freebsd.sh +++ b/hints/freebsd.sh @@ -20,7 +20,7 @@ # # Modified to ensure we replace -lc with -lc_r, and # to put in place-holders for various specific hints. -# Andy Dougherty +# Andy Dougherty # Date: Tue Mar 10 16:07:00 EST 1998 # # Support for FreeBSD/ELF @@ -67,7 +67,10 @@ case "$osvers" in # 2.0.5*|2.0-built*|2.1*) usevfork='true' - usemymalloc='n' + case "$usemymalloc" in + "") usemymalloc='n' + ;; + esac d_setregid='define' d_setreuid='define' d_setegid='undef' @@ -79,7 +82,10 @@ case "$osvers" in # don't use -lmalloc (maybe there's an old one from 1.1.5.1 floating around) 2.2*) usevfork='true' - usemymalloc='n' + case "$usemymalloc" in + "") usemymalloc='n' + ;; + esac libswanted=`echo $libswanted | sed 's/ malloc / /'` d_setregid='define' d_setreuid='define' @@ -87,7 +93,10 @@ case "$osvers" in d_seteuid='undef' ;; *) usevfork='true' - usemymalloc='n' + case "$usemymalloc" in + "") usemymalloc='n' + ;; + esac libswanted=`echo $libswanted | sed 's/ malloc / /'` ;; esac @@ -210,6 +219,13 @@ EOM exit 1 fi ldflags="-pthread $ldflags" + case "$osvers" in + 4.*) # 4.x has gethostbyaddr_r but it is + # "Temporary function, not threadsafe"... + d_gethostbyaddr_r="undef" + d_gethostbyaddr_r_proto="undef" + ;; + esac ;; esac @@ -230,9 +246,11 @@ EOM esac unset lc_r + + # Even with the malloc mutexes the Perl malloc does not + # seem to be threadsafe in FreeBSD? + usemymalloc=n + esac EOCBU -# /proc/.../file is broken on FreeBSD -# see http://www.freebsd.org/cgi/query-pr.cgi?pr=35703 -d_procselfexe='undef'