Bug 575620: Update NSPR to NSPR_4_8_6_BETA1. This includes patches
authorWan-Teh Chang <wtc@google.com>
Thu, 08 Jul 2010 18:26:16 -0700
changeset 47292 c1c64067eeb8655ba52f90daf14bea0b3fb29b22
parent 47291 72a7db3de71ba05c3968b2cba72d682a957bd6e0
child 47293 ad5644e101fd00c4c7f412a0059f14d8b3fc898d
push idunknown
push userunknown
push dateunknown
bugs575620, 559133, 564851, 415563, 575534, 570332
milestone2.0b2pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 575620: Update NSPR to NSPR_4_8_6_BETA1. This includes patches for bugs 559133, 564851, 415563, 575620, 575534,570332.
nsprpub/TAG-INFO
nsprpub/admin/repackage.sh
nsprpub/config/prdepend.h
nsprpub/configure
nsprpub/configure.in
nsprpub/pr/include/pratom.h
nsprpub/pr/include/prbit.h
nsprpub/pr/include/prinit.h
nsprpub/pr/include/prtypes.h
nsprpub/pr/src/md/windows/w95thred.c
nsprpub/pr/tests/vercheck.c
new file mode 100644
--- /dev/null
+++ b/nsprpub/TAG-INFO
@@ -0,0 +1,1 @@
+NSPR_4_8_6_BETA1
--- a/nsprpub/admin/repackage.sh
+++ b/nsprpub/admin/repackage.sh
@@ -59,20 +59,20 @@
 # Note! Files written with Gnu tar are not readable by some non-Gnu
 # versions. Sun, in particular.
 # 
 # 
 # 
 # 
 # ------------------------------------------------------------------
 
-FROMTOP=/share/builds/components/nspr20/v4.8.5
-TOTOP=./v4.8.5
-NSPRDIR=nspr-4.8.5
-SOURCETAG=NSPR_4_8_5_RTM
+FROMTOP=/share/builds/components/nspr20/v4.8.6
+TOTOP=./v4.8.6
+NSPRDIR=nspr-4.8.6
+SOURCETAG=NSPR_4_8_6_RTM
 
 #
 # enumerate Unix object directories on /s/b/c
 UNIX_OBJDIRS="
 HP-UXB.11.11_64_DBG.OBJ
 HP-UXB.11.11_64_OPT.OBJ
 HP-UXB.11.11_DBG.OBJ
 HP-UXB.11.11_OPT.OBJ
--- a/nsprpub/config/prdepend.h
+++ b/nsprpub/config/prdepend.h
@@ -37,9 +37,8 @@
 
 /*
  * A dummy header file that is a dependency for all the object files.
  * Used to force a full recompilation of NSPR in Mozilla's Tinderbox
  * depend builds.  See comments in rules.mk.
  */
 
 #error "Do not include this header file."
-
--- a/nsprpub/configure
+++ b/nsprpub/configure
@@ -707,17 +707,17 @@ echo "$ac_t""$build" 1>&6
 test "$host_alias" != "$target_alias" &&
   test "$program_prefix$program_suffix$program_transform_name" = \
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
 
 MOD_MAJOR_VERSION=4
 MOD_MINOR_VERSION=8
-MOD_PATCH_VERSION=5
+MOD_PATCH_VERSION=6
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
 USE_PTHREADS=
 USE_USER_PTHREADS=
 USE_NSPR_THREADS=
 USE_N32=
 USE_64=
 USE_CPLUS=
@@ -2781,17 +2781,17 @@ else
   rm -rf conftest*
   result="no"
 fi
 rm -f conftest*
 echo "$ac_t""$result" 1>&6
 
 if test $result = "yes"; then
    PROFILE_GEN_LDFLAGS="-fprofile-generate"
-   PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freoder-blocks-and-partition"
+   PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freorder-blocks-and-partition"
    PROFILE_USE_LDFLAGS="-fprofile-use"
 fi
 
 CFLAGS="$_SAVE_CFLAGS"
 
 if test "$GNU_CC"; then
     echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
 echo "configure:2798: checking for visibility(hidden) attribute" >&5
@@ -4209,33 +4209,32 @@ EOF
         RC=rc.exe
         GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
         OBJ_SUFFIX=obj
         LIB_SUFFIX=lib
         DLL_SUFFIX=dll
 
         # Determine compiler version
         
-        _MSVC_VER_FILTER='s|.* ([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
+        _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
         
-
-        CC_VERSION=`"${CC}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
+        CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
         _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
         _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
         _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
         _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
         MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
 
-        if test "$_CC_MAJOR_VERSION" = "14"; then
+        if test "$_CC_MAJOR_VERSION" -eq "14"; then
                                             if test $_CC_RELEASE -gt 50727; then
               _USE_DYNAMICBASE=1
            elif test $_CC_BUILD -ge 762; then
               _USE_DYNAMICBASE=1
            fi
-        elif test $_CC_MAJOR_VERSION -gt 15; then
+        elif test $_CC_MAJOR_VERSION -ge 15; then
            _USE_DYNAMICBASE=1    
         fi
 
         if test -n "$_USE_DYNAMICBASE"; then
            DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
         fi
 
         # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
@@ -4704,27 +4703,27 @@ EOF
     if test -z "$GNU_CC"; then
         CC="$CC -std1 -ieee_with_inexact"
         if test "$OS_RELEASE" != "V2.0"; then
             CC="$CC -readonly_strings"
         fi
         _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
         ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4713: checking for machine/builtins.h" >&5
+echo "configure:4712: checking for machine/builtins.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4718 "configure"
+#line 4717 "configure"
 #include "confdefs.h"
 #include <machine/builtins.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -5363,63 +5362,63 @@ if test -z "$SKIP_LIBRARY_CHECKS"; then
 
 
 
 case $target in
 *-darwin*|*-beos*|*-os2*)
     ;;
 *)
     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5372: checking for dlopen in -ldl" >&5
+echo "configure:5371: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5380 "configure"
+#line 5379 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char dlopen();
 
 int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5408: checking for dlfcn.h" >&5
+echo "configure:5407: checking for dlfcn.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5413 "configure"
+#line 5412 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -5442,23 +5441,23 @@ fi
     ;;
 esac
 
 
 
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:5451: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:5450: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 5457 "configure"
+#line 5456 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=yes
@@ -5466,17 +5465,17 @@ else
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=no
 fi
 rm -f conftest*
 
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 5475 "configure"
+#line 5474 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=yes
@@ -5490,22 +5489,22 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional
   if test $ac_cv_prog_gcc_traditional = yes; then
     CC="$CC -traditional"
   fi
 fi
 
 for ac_func in lchown strerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5499: checking for $ac_func" >&5
+echo "configure:5498: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5504 "configure"
+#line 5503 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char $ac_func();
@@ -5518,17 +5517,17 @@ int main() {
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=no"
 fi
@@ -5559,17 +5558,17 @@ if test "${enable_strip+set}" = set; the
 fi
 
 
 case "${target_os}" in
 hpux*)
 if test -z "$GNU_CC"; then
 
     echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5568: checking for +Olit support" >&5
+echo "configure:5567: checking for +Olit support" >&5
 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
                   ac_cv_hpux_usable_olit_option=no
         rm -f conftest*
         echo 'int main() { return 0; }' | cat > conftest.c
         ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
         if test $? -eq 0; then
@@ -5601,17 +5600,17 @@ darwin*)
     _HAVE_PTHREADS=1
     ;;
 wince*)
     _HAVE_PTHREADS=
     ;;
 *)
     
 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5610: checking for pthread_create in -lpthreads" >&5
+echo "configure:5609: checking for pthread_create in -lpthreads" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5623,17 +5622,17 @@ echo "
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5632: checking for pthread_create in -lpthread" >&5
+echo "configure:5631: checking for pthread_create in -lpthread" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5645,17 +5644,17 @@ echo "
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5654: checking for pthread_create in -lc_r" >&5
+echo "configure:5653: checking for pthread_create in -lc_r" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5667,17 +5666,17 @@ echo "
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5676: checking for pthread_create in -lc" >&5
+echo "configure:5675: checking for pthread_create in -lc" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5799,17 +5798,17 @@ EOF
     fi
 fi
 
 
 if test -n "$USE_PTHREADS"; then
       rm -f conftest*
    ac_cv_have_dash_pthread=no
    echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5808: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5807: checking whether ${CC-cc} accepts -pthread" >&5
    echo 'int main() { return 0; }' | cat > conftest.c
    ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
    if test $? -eq 0; then
 	if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
 	    ac_cv_have_dash_pthread=yes
 		case "$target_os" in
 	    freebsd*)
 # Freebsd doesn't use -pthread for compiles, it uses them for linking
@@ -5822,17 +5821,17 @@ echo "configure:5808: checking whether $
 	fi
     fi
     rm -f conftest*
     echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
 
 			    ac_cv_have_dash_pthreads=no
     if test "$ac_cv_have_dash_pthread" = "no"; then
 	    echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5831: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5830: checking whether ${CC-cc} accepts -pthreads" >&5
     	echo 'int main() { return 0; }' | cat > conftest.c
 	    ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
     	if test $? -eq 0; then
 	    	if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
 			    ac_cv_have_dash_pthreads=yes
 			    CFLAGS="$CFLAGS -pthreads"
 			    CXXFLAGS="$CXXFLAGS -pthreads"
 		    fi
--- a/nsprpub/configure.in
+++ b/nsprpub/configure.in
@@ -45,17 +45,17 @@ AC_INIT(config/libc_r.h)
 AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
 AC_CANONICAL_SYSTEM
 
 dnl ========================================================
 dnl = Defaults
 dnl ========================================================
 MOD_MAJOR_VERSION=4
 MOD_MINOR_VERSION=8
-MOD_PATCH_VERSION=5
+MOD_PATCH_VERSION=6
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
 USE_PTHREADS=
 USE_USER_PTHREADS=
 USE_NSPR_THREADS=
 USE_N32=
 USE_64=
 USE_CPLUS=
@@ -654,17 +654,17 @@ CFLAGS="$CFLAGS -fprofile-generate -fpro
 AC_MSG_CHECKING([whether C compiler supports -fprofile-generate])
 AC_TRY_COMPILE([], [return 0;],
                [ PROFILE_GEN_CFLAGS="-fprofile-generate"
                  result="yes" ], result="no")
 AC_MSG_RESULT([$result])
 
 if test $result = "yes"; then
    PROFILE_GEN_LDFLAGS="-fprofile-generate"
-   PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freoder-blocks-and-partition"
+   PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freorder-blocks-and-partition"
    PROFILE_USE_LDFLAGS="-fprofile-use"
 fi
 
 CFLAGS="$_SAVE_CFLAGS"
 
 dnl ===============================================================
 dnl Check for .hidden assembler directive and visibility attribute.
 dnl Borrowed from glibc configure.in
@@ -1673,36 +1673,35 @@ arm-android-eabi)
         RC=rc.exe
         GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
         OBJ_SUFFIX=obj
         LIB_SUFFIX=lib
         DLL_SUFFIX=dll
 
         # Determine compiler version
         changequote(,)
-        _MSVC_VER_FILTER='s|.* ([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
+        _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
         changequote([,])
-
-        CC_VERSION=`"${CC}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
+        CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
         _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
         _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
         _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
         _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
         MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
 
-        if test "$_CC_MAJOR_VERSION" = "14"; then
+        if test "$_CC_MAJOR_VERSION" -eq "14"; then
            dnl -DYNAMICBASE is only supported on VC8SP1 or newer,
            dnl so be very specific here!
            dnl VC8 is 14.00.50727.42, VC8SP1 is 14.00.50727.762
            if test $_CC_RELEASE -gt 50727; then
               _USE_DYNAMICBASE=1
            elif test $_CC_BUILD -ge 762; then
               _USE_DYNAMICBASE=1
            fi
-        elif test $_CC_MAJOR_VERSION -gt 15; then
+        elif test $_CC_MAJOR_VERSION -ge 15; then
            _USE_DYNAMICBASE=1    
         fi
 
         if test -n "$_USE_DYNAMICBASE"; then
            DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
         fi
 
         # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
--- a/nsprpub/pr/include/pratom.h
+++ b/nsprpub/pr/include/pratom.h
@@ -120,20 +120,22 @@ long __cdecl _InterlockedDecrement(long 
 #pragma intrinsic(_InterlockedDecrement)
 
 long __cdecl _InterlockedExchange(long volatile *Target, long Value);
 #pragma intrinsic(_InterlockedExchange)
 
 long __cdecl _InterlockedExchangeAdd(long volatile *Addend, long Value);
 #pragma intrinsic(_InterlockedExchangeAdd)
 
-#define PR_ATOMIC_INCREMENT(val) _InterlockedIncrement(val)
-#define PR_ATOMIC_DECREMENT(val) _InterlockedDecrement(val)
-#define PR_ATOMIC_SET(val, newval) _InterlockedExchange(val, newval)
-#define PR_ATOMIC_ADD(ptr, val) (_InterlockedExchangeAdd(ptr, val) + (val))
+#define PR_ATOMIC_INCREMENT(val) _InterlockedIncrement((long volatile *)(val))
+#define PR_ATOMIC_DECREMENT(val) _InterlockedDecrement((long volatile *)(val))
+#define PR_ATOMIC_SET(val, newval) \
+        _InterlockedExchange((long volatile *)(val), (long)(newval))
+#define PR_ATOMIC_ADD(ptr, val) \
+        (_InterlockedExchangeAdd((long volatile *)(ptr), (long)(val)) + (val))
 
 #elif ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && \
       ((defined(DARWIN) && \
            (defined(__ppc__) || defined(__i386__))) || \
        (defined(LINUX) && \
            (defined(__i386__) || defined(__ia64__) || defined(__x86_64__) || \
            (defined(__powerpc__) && !defined(__powerpc64__)) || \
            defined(__alpha))))
--- a/nsprpub/pr/include/prbit.h
+++ b/nsprpub/pr/include/prbit.h
@@ -57,17 +57,17 @@ PR_BEGIN_EXTERN_C
     unsigned long idx;
     _BitScanReverse(&idx, (unsigned long)val);
     return( (int)(31-idx) );
   }
 # define pr_bitscan_ctz32(val)  __prBitScanForward32(val)
 # define pr_bitscan_clz32(val)  __prBitScanReverse32(val)
 # define  PR_HAVE_BUILTIN_BITSCAN32
 #elif ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \
-       (defined(__i386__) || defined(__x86_64__))
+       (defined(__i386__) || defined(__x86_64__) || defined(__arm__))
 # define pr_bitscan_ctz32(val)  __builtin_ctz(val)
 # define pr_bitscan_clz32(val)  __builtin_clz(val)
 # define  PR_HAVE_BUILTIN_BITSCAN32
 #endif /* MSVC || GCC */
 
 /*
 ** A prbitmap_t is a long integer that can be used for bitmaps
 */
--- a/nsprpub/pr/include/prinit.h
+++ b/nsprpub/pr/include/prinit.h
@@ -58,20 +58,20 @@ PR_BEGIN_EXTERN_C
 /*
 ** NSPR's version is used to determine the likelihood that the version you
 ** used to build your component is anywhere close to being compatible with
 ** what is in the underlying library.
 **
 ** The format of the version string is
 **     "<major version>.<minor version>[.<patch level>] [<Beta>]"
 */
-#define PR_VERSION  "4.8.5 Beta"
+#define PR_VERSION  "4.8.6 Beta"
 #define PR_VMAJOR   4
 #define PR_VMINOR   8
-#define PR_VPATCH   5
+#define PR_VPATCH   6
 #define PR_BETA     PR_TRUE
 
 /*
 ** PRVersionCheck
 **
 ** The basic signature of the function that is called to provide version
 ** checking. The result will be a boolean that indicates the likelihood
 ** that the underling library will perform as the caller expects.
--- a/nsprpub/pr/include/prtypes.h
+++ b/nsprpub/pr/include/prtypes.h
@@ -414,17 +414,17 @@ typedef ptrdiff_t PRPtrdiff;
 
 /************************************************************************
 ** TYPES:       PRUptrdiff
 ** DESCRIPTION:
 **  A type for pointer difference. Variables of this type are suitable
 **      for storing a pointer or pointer sutraction. 
 ************************************************************************/
 #ifdef _WIN64
-typedef unsigned __int64 PRUptrdiff;
+typedef PRUint64 PRUptrdiff;
 #else
 typedef unsigned long PRUptrdiff;
 #endif
 
 /************************************************************************
 ** TYPES:       PRBool
 ** DESCRIPTION:
 **  Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE
@@ -466,18 +466,18 @@ typedef PRUint16 PRUnichar;
 **
 ** A PRWord is an integer that is the same size as a void*.
 ** It implements the notion of a "word" in the Java Virtual
 ** Machine.  (See Sec. 3.4 "Words", The Java Virtual Machine
 ** Specification, Addison-Wesley, September 1996.
 ** http://java.sun.com/docs/books/vmspec/index.html.)
 */
 #ifdef _WIN64
-typedef __int64 PRWord;
-typedef unsigned __int64 PRUword;
+typedef PRInt64 PRWord;
+typedef PRUint64 PRUword;
 #else
 typedef long PRWord;
 typedef unsigned long PRUword;
 #endif
 
 #if defined(NO_NSPR_10_SUPPORT)
 #else
 /********* ???????????????? FIX ME       ??????????????????????????? *****/
--- a/nsprpub/pr/src/md/windows/w95thred.c
+++ b/nsprpub/pr/src/md/windows/w95thred.c
@@ -33,17 +33,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "primpl.h"
 #include <process.h>  /* for _beginthreadex() */
 
-#if _MSC_VER <= 1200
+#if defined(_MSC_VER) && _MSC_VER <= 1200
 /*
  * VC++ 6.0 doesn't have DWORD_PTR.
  */
 
 typedef DWORD DWORD_PTR;
 #endif /* _MSC_VER <= 1200 */
 
 /* --- globals ------------------------------------------------ */
--- a/nsprpub/pr/tests/vercheck.c
+++ b/nsprpub/pr/tests/vercheck.c
@@ -47,30 +47,31 @@
  */
 
 #include "prinit.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 
 /*
- * This release (4.8.5) is backward compatible with the
+ * This release (4.8.6) is backward compatible with the
  * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, 4.6.x, 4.7.x,
- * 4.8, 4.8.1, 4.8.2, 4.8.3, and 4.8.4 releases.  It, of course,
- * is compatible with itself.
+ * 4.8, 4.8.1, 4.8.2, 4.8.3, 4.8.4, and 4.8.5 releases.
+ * It, of course, is compatible with itself.
  */
 static char *compatible_version[] = {
     "4.0", "4.0.1", "4.1", "4.1.1", "4.1.2", "4.1.3",
     "4.2", "4.2.1", "4.2.2", "4.3", "4.4", "4.4.1",
     "4.5", "4.5.1",
     "4.6", "4.6.1", "4.6.2", "4.6.3", "4.6.4", "4.6.5",
     "4.6.6", "4.6.7", "4.6.8",
     "4.7", "4.7.1", "4.7.2", "4.7.3", "4.7.4", "4.7.5",
     "4.7.6",
-    "4.8", "4.8.1", "4.8.2", "4.8.3", "4.8.4", PR_VERSION
+    "4.8", "4.8.1", "4.8.2", "4.8.3", "4.8.4", "4.8.5",
+    PR_VERSION
 };
 
 /*
  * This release is not backward compatible with the old
  * NSPR 2.1 and 3.x releases.
  *
  * Any release is incompatible with future releases and
  * patches.