Bug 788955 - Mangle system malloc functions on BSDs. r=glandium, a=jlebar
authorJan Beich <jbeich@tormail.org>
Wed, 17 Oct 2012 16:39:03 +0200
changeset 117528 087fa935c2731b06071b1563c80c84bc1e9eaa53
parent 117527 c08a6a2004b30293597352c047ffe235c56a1272
child 117529 e88bbee69946d0ed91669e1f1a1438a81c8da09f
push id28
push userryanvm@gmail.com
push dateFri, 14 Dec 2012 01:37:47 +0000
reviewersglandium, jlebar
bugs788955
milestone18.0
Bug 788955 - Mangle system malloc functions on BSDs. r=glandium, a=jlebar
configure.in
--- a/configure.in
+++ b/configure.in
@@ -8995,18 +8995,30 @@ if cmp -s ./mozinfo.json.tmp ./mozinfo.j
 else
   mv -f ./mozinfo.json.tmp ./mozinfo.json
 fi
 
 # Run jemalloc configure script
 
 if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_JEMALLOC" -a "$MOZ_MEMORY" ; then
   ac_configure_args="$_SUBDIR_CONFIG_ARGS --build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_"
-  if test "$OS_ARCH" = "Linux"; then
-    MANGLE="malloc calloc valloc free realloc memalign posix_memalign malloc_usable_size"
+  case "$OS_ARCH" in
+    Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
+      MANGLE="malloc calloc valloc free realloc posix_memalign"
+      case "$OS_ARCH" in
+        Linux)
+          MANGLE="$MANGLE memalign malloc_usable_size"
+          ;;
+        FreeBSD)
+          MANGLE="$MANGLE malloc_usable_size"
+          ;;
+      esac
+      ;;
+  esac
+  if test -n "$MANGLE"; then
     MANGLED=
     JEMALLOC_WRAPPER=
     if test -n "$_WRAP_MALLOC"; then
       JEMALLOC_WRAPPER=__wrap_
     fi
     for mangle in ${MANGLE}; do
       if test -n "$MANGLED"; then
         MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle,$MANGLED"