perlhack update, by Steve Grazzini
[p5sagit/p5-mst-13.2.git] / hints / freebsd.sh
index 4a01430..5818097 100644 (file)
@@ -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 <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
 # Date: Tue Mar 10 16:07:00 EST 1998
 #
 # Support for FreeBSD/ELF
@@ -92,10 +92,17 @@ case "$osvers" in
        d_setegid='undef'
        d_seteuid='undef'
        ;;
+4.*)   # In FreeBSD 4 and 5 the system malloc is performance-wise
+       # VERY bad for Perl-- we are talking of differences of not
+       # one, but TWO magnitudes.
+       usemymalloc=y
+       ;;
+5.*)   usemymalloc=y
+       ;;
 *)     usevfork='true'
        case "$usemymalloc" in
-           "") usemymalloc='n'
-               ;;
+       "") usemymalloc='y'
+           ;;
        esac
        libswanted=`echo $libswanted | sed 's/ malloc / /'`
        ;;
@@ -220,10 +227,11 @@ EOM
              fi
              ldflags="-pthread $ldflags"
              case "$osvers" in
-             4.*)      # 4.x has gethostbyaddr_r but it is
+             4.*|5.0-release*) 
+                       # 4.x and 5.0-release have gethostbyaddr_r but it is
                        # "Temporary function, not threadsafe"...
                        d_gethostbyaddr_r="undef"
-                       d_gethostbyaddr_r_proto="undef"
+                       d_gethostbyaddr_r_proto="0"
                        ;;
              esac
              ;;
@@ -249,7 +257,7 @@ EOM
 
        # Even with the malloc mutexes the Perl malloc does not
        # seem to be threadsafe in FreeBSD?
-       usemymalloc=n
+       usemymalloc=y
 
 esac
 EOCBU