update nspr to NSPR_HEAD_20100311 r=wtc
authorBrad Lassey <blassey@mozilla.com>
Thu, 11 Mar 2010 12:14:58 -0500
changeset 39285 9f7d41c42cf49684e45c2fb1b9839ceedfdc31d9
parent 39284 dc3af645f71324f778c3f59329c9bca6851b9e0d
child 39286 85fe77e1b558ccf2018b1305748b208a0dc442a3
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswtc
milestone1.9.3a3pre
update nspr to NSPR_HEAD_20100311 r=wtc
nsprpub/admin/repackage.sh
nsprpub/configure
nsprpub/configure.in
nsprpub/pr/include/md/_freebsd.h
nsprpub/pr/include/prinit.h
nsprpub/pr/src/linking/Makefile.in
nsprpub/pr/src/linking/prlink.c
nsprpub/pr/src/md/windows/ntio.c
nsprpub/pr/src/md/windows/w95io.c
nsprpub/pr/src/misc/dtoa.c
nsprpub/pr/tests/op_filok.c
nsprpub/pr/tests/vercheck.c
--- 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.4
-TOTOP=./v4.8.4
-NSPRDIR=nspr-4.8.4
-SOURCETAG=NSPR_4_8_4_RTM
+FROMTOP=/share/builds/components/nspr20/v4.8.5
+TOTOP=./v4.8.5
+NSPRDIR=nspr-4.8.5
+SOURCETAG=NSPR_4_8_5_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/configure
+++ b/nsprpub/configure
@@ -690,17 +690,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=4
+MOD_PATCH_VERSION=5
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
 USE_PTHREADS=
 USE_USER_PTHREADS=
 USE_NSPR_THREADS=
 USE_N32=
 USE_64=
 USE_CPLUS=
@@ -3570,16 +3570,17 @@ EOF
         MDCPUCFG_H=_hpux32.cfg
     fi
     if test -z "$GNU_CC"; then
         CC="$CC -Ae"
         CXX="$CXX -ext"
         DSO_CFLAGS=+Z
     else
         DSO_CFLAGS=-fPIC
+        ASFLAGS="$ASFLAGS -x assembler-with-cpp"
     fi
 
     if test -n "$MOZILLA_CLIENT"; then
         DEFAULT_IMPL_STRATEGY=_EMU
     fi
 
     if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
         cat >> confdefs.h <<\EOF
@@ -4175,33 +4176,32 @@ EOF
 #define WINCE 1
 EOF
 
     cat >> confdefs.h <<\EOF
 #define _PR_GLOBAL_THREADS_ONLY 1
 EOF
 
 
-    AR='lib -NOLOGO -OUT:"$@"'
-    AR_FLAGS=
+    AR_FLAGS='-NOLOGO -OUT:"$@"'
 
     OBJ_SUFFIX=obj
     LIB_SUFFIX=lib
     DLL_SUFFIX=dll
     MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
 
     PR_MD_ARCH_DIR=windows
     RESOLVE_LINK_SYMBOLS=1
 
     MDCPUCFG_H=_win95.cfg
     LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
     LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
 
     DLLFLAGS='-OUT:"$@"'
-    if test -n "$MOZ_DEBUG_SYMBOLS"; then
+    if test -n "$MOZ_DEBUG_SYMBOLS" || test -n "$MOZ_DEBUG"; then
         OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
         OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
         DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
     fi
     _DEBUG_FLAGS=-Zi
     _OPTIMIZE_FLAGS=-O2
     ;;
 
@@ -5362,20 +5362,23 @@ fi
 esac
 
 
 
 case "$target_os" in
 darwin*)
     _HAVE_PTHREADS=1
     ;;
+wince*)
+    _HAVE_PTHREADS=
+    ;;
 *)
     
 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5374: checking for pthread_create in -lpthreads" >&5
+echo "configure:5377: 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);
         }
@@ -5387,17 +5390,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:5396: checking for pthread_create in -lpthread" >&5
+echo "configure:5399: 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);
         }
@@ -5409,17 +5412,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:5418: checking for pthread_create in -lc_r" >&5
+echo "configure:5421: 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);
         }
@@ -5431,17 +5434,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:5440: checking for pthread_create in -lc" >&5
+echo "configure:5443: 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);
         }
@@ -5563,17 +5566,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:5572: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5575: 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
@@ -5586,17 +5589,17 @@ echo "configure:5572: 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:5595: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5598: 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
@@ -5874,17 +5877,17 @@ if test -n "$_SAVE_DEBUG_FLAGS"; then
     _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
 fi
 
 if test -n "$MOZ_OPTIMIZE"; then
     CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
     CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
 fi
 
-if test -n "$MOZ_DEBUG"; then
+if test -n "$MOZ_DEBUG_SYMBOLS" || test -n "$MOZ_DEBUG"; then
     CFLAGS="$CFLAGS $_DEBUG_FLAGS"
     CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
 fi
 
 if test -n "$MOZ_OPTIMIZE"; then
     OBJDIR_TAG=_OPT
 else
     OBJDIR_TAG=_DBG
--- 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=4
+MOD_PATCH_VERSION=5
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
 USE_PTHREADS=
 USE_USER_PTHREADS=
 USE_NSPR_THREADS=
 USE_N32=
 USE_64=
 USE_CPLUS=
@@ -1195,16 +1195,17 @@ tools are selected during the Xcode/Deve
         MDCPUCFG_H=_hpux32.cfg
     fi
     if test -z "$GNU_CC"; then
         CC="$CC -Ae"
         CXX="$CXX -ext"
         DSO_CFLAGS=+Z
     else
         DSO_CFLAGS=-fPIC
+        ASFLAGS="$ASFLAGS -x assembler-with-cpp"
     fi
 
     if test -n "$MOZILLA_CLIENT"; then
         DEFAULT_IMPL_STRATEGY=_EMU
     fi
 
     if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
         AC_DEFINE(_PR_NEED_H_ERRNO)
@@ -1645,33 +1646,32 @@ tools are selected during the Xcode/Deve
     ;;
 
 *-wince*|*-winmo*)
     AC_DEFINE(XP_PC)
     AC_DEFINE(WIN32)
     AC_DEFINE(WINCE)
     AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
 
-    AR='lib -NOLOGO -OUT:"$@"'
-    AR_FLAGS=
+    AR_FLAGS='-NOLOGO -OUT:"$@"'
 
     OBJ_SUFFIX=obj
     LIB_SUFFIX=lib
     DLL_SUFFIX=dll
     MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
 
     PR_MD_ARCH_DIR=windows
     RESOLVE_LINK_SYMBOLS=1
 
     MDCPUCFG_H=_win95.cfg
     LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
     LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
 
     DLLFLAGS='-OUT:"$@"'
-    if test -n "$MOZ_DEBUG_SYMBOLS"; then
+    if test -n "$MOZ_DEBUG_SYMBOLS" || test -n "$MOZ_DEBUG"; then
         OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
         OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
         DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
     fi
     _DEBUG_FLAGS=-Zi
     _OPTIMIZE_FLAGS=-O2
     ;;
 
@@ -2398,16 +2398,19 @@ echo "
         [$3]
     fi
 ])
 
 case "$target_os" in
 darwin*)
     _HAVE_PTHREADS=1
     ;;
+wince*)
+    _HAVE_PTHREADS=
+    ;;
 *)
     MOZ_CHECK_PTHREADS(pthreads,
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
         MOZ_CHECK_PTHREADS(pthread,
             _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
             MOZ_CHECK_PTHREADS(c_r,
                 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
                 MOZ_CHECK_PTHREADS(c,
@@ -2718,17 +2721,17 @@ if test -n "$_SAVE_DEBUG_FLAGS"; then
     _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
 fi
 
 if test -n "$MOZ_OPTIMIZE"; then
     CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
     CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
 fi
 
-if test -n "$MOZ_DEBUG"; then
+if test -n "$MOZ_DEBUG_SYMBOLS" || test -n "$MOZ_DEBUG"; then
     CFLAGS="$CFLAGS $_DEBUG_FLAGS"
     CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
 fi
 
 if test -n "$MOZ_OPTIMIZE"; then
     OBJDIR_TAG=_OPT
 else
     OBJDIR_TAG=_DBG
--- a/nsprpub/pr/include/md/_freebsd.h
+++ b/nsprpub/pr/include/md/_freebsd.h
@@ -71,17 +71,17 @@
 #define _MD_DEFAULT_STACK_SIZE	65536L
 #define _MD_MMAP_FLAGS          MAP_PRIVATE
 
 #undef  HAVE_STACK_GROWING_UP
 #define HAVE_DLL
 #define USE_DLFCN
 #define _PR_HAVE_SOCKADDR_LEN
 #define _PR_STAT_HAS_ST_ATIMESPEC
-#define _PR_NO_LARGE_FILES
+#define _PR_HAVE_LARGE_OFF_T
 
 #if defined(_PR_PTHREADS)
 #if __FreeBSD_version >= 400008
 /*
  * libc_r before this version of FreeBSD doesn't have poll().
  * Although libc has poll(), it is not thread-safe so we can't
  * use it in the pthreads version.
  */
--- a/nsprpub/pr/include/prinit.h
+++ b/nsprpub/pr/include/prinit.h
@@ -58,21 +58,21 @@ 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.4"
+#define PR_VERSION  "4.8.5 Beta"
 #define PR_VMAJOR   4
 #define PR_VMINOR   8
-#define PR_VPATCH   4
-#define PR_BETA     PR_FALSE
+#define PR_VPATCH   5
+#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/src/linking/Makefile.in
+++ b/nsprpub/pr/src/linking/Makefile.in
@@ -57,19 +57,14 @@ endif
 CSRCS =           \
 	prlink.c   \
 	$(NULL)
 
 TARGETS	= $(OBJS)
 
 INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
 
-# On Mac OS X use flat #includes.
-ifeq ($(OS_TARGET),MacOSX)
-INCLUDES    += -I$(MACOS_SDK_DIR)/Developer/Headers/FlatCarbon
-endif
-
 DEFINES += -D_NSPR_BUILD_
 
 include $(topsrcdir)/config/rules.mk
 
 export:: $(TARGETS)
 
--- a/nsprpub/pr/src/linking/prlink.c
+++ b/nsprpub/pr/src/linking/prlink.c
@@ -40,25 +40,18 @@
 
 #include <string.h>
 
 #ifdef XP_BEOS
 #include <image.h>
 #endif
 
 #if defined(XP_MACOSX) && defined(USE_MACH_DYLD)
-#include <CodeFragments.h>
-#include <TextUtils.h>
-#include <Types.h>
-#include <Aliases.h>
-#include <CFURL.h>
-#include <CFBundle.h>
-#include <CFString.h>
-#include <CFDictionary.h>
-#include <CFData.h>
+#include <Carbon/Carbon.h>
+#include <CoreFoundation/CoreFoundation.h>
 #endif
 
 #ifdef XP_UNIX
 #ifdef USE_DLFCN
 #include <dlfcn.h>
 /* Define these on systems that don't have them. */
 #ifndef RTLD_NOW
 #define RTLD_NOW 0
@@ -616,26 +609,26 @@ pr_LoadViaCFM(const char *name, PRLibrar
 ** deallocate.
 */
 
 static PRStatus
 pr_LoadCFBundle(const char *name, PRLibrary *lm)
 {
     CFURLRef bundleURL;
     CFBundleRef bundle = NULL;
-    char pathBuf[PATH_MAX];
-    const char *resolvedPath;
+    char *resolvedPath;
     CFStringRef pathRef;
 
     /* Takes care of relative paths and symlinks */
-    resolvedPath = realpath(name, pathBuf);
+    resolvedPath = realpath(name, NULL);
     if (!resolvedPath)
         return PR_FAILURE;
         
-    pathRef = CFStringCreateWithCString(NULL, pathBuf, kCFStringEncodingUTF8);
+    pathRef = CFStringCreateWithCString(NULL, resolvedPath, kCFStringEncodingUTF8);
+    free(resolvedPath);
     if (pathRef) {
         bundleURL = CFURLCreateWithFileSystemPath(NULL, pathRef,
                                                   kCFURLPOSIXPathStyle, true);
         if (bundleURL) {
             bundle = CFBundleCreate(NULL, bundleURL);
             CFRelease(bundleURL);
         }
         CFRelease(pathRef);
--- a/nsprpub/pr/src/md/windows/ntio.c
+++ b/nsprpub/pr/src/md/windows/ntio.c
@@ -2735,30 +2735,30 @@ void FlipSlashes(char *cp, int len)
 
 /*
 **
 ** Local implementations of standard Unix RTL functions which are not provided
 ** by the VC RTL.
 **
 */
 
-PRStatus
+PRInt32
 _PR_MD_CLOSE_DIR(_MDDir *d)
 {
     if ( d ) {
         if (FindClose( d->d_hdl )) {
             d->magic = (PRUint32)-1;
-            return PR_SUCCESS;
+            return 0;
         } else {
             _PR_MD_MAP_CLOSEDIR_ERROR(GetLastError());
-            return PR_FAILURE;
+            return -1;
         }
     }
     PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
-    return PR_FAILURE;
+    return -1;
 }
 
 
 PRStatus
 _PR_MD_OPEN_DIR(_MDDir *d, const char *name)
 {
     char filename[ MAX_PATH ];
     int len;
--- a/nsprpub/pr/src/md/windows/w95io.c
+++ b/nsprpub/pr/src/md/windows/w95io.c
@@ -668,30 +668,30 @@ static void FlipSlashes(char *cp, size_t
 
 /*
 **
 ** Local implementations of standard Unix RTL functions which are not provided
 ** by the VC RTL.
 **
 */
 
-PRStatus
+PRInt32
 _PR_MD_CLOSE_DIR(_MDDir *d)
 {
     if ( d ) {
         if (FindClose(d->d_hdl)) {
         d->magic = (PRUint32)-1;
-        return PR_SUCCESS;
+        return 0;
 		} else {
 			_PR_MD_MAP_CLOSEDIR_ERROR(GetLastError());
-        	return PR_FAILURE;
+        	return -1;
 		}
     }
     PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
-    return PR_FAILURE;
+    return -1;
 }
 
 
 PRStatus
 _PR_MD_OPEN_DIR(_MDDir *d, const char *name)
 {
     char filename[ MAX_PATH ];
     size_t len;
@@ -1573,30 +1573,30 @@ PRUnichar *
         PR_ASSERT(NO_ERROR != err);
         _PR_MD_MAP_READDIR_ERROR(err);
         return NULL;
     }
     PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
     return NULL;
 }
  
-PRStatus
+PRInt32
 _PR_MD_CLOSE_DIR_UTF16(_MDDirUTF16 *d)
 {
     if ( d ) {
         if (FindClose(d->d_hdl)) {
             d->magic = (PRUint32)-1;
-            return PR_SUCCESS;
+            return 0;
         } else {
             _PR_MD_MAP_CLOSEDIR_ERROR(GetLastError());
-            return PR_FAILURE;
+            return -1;
         }
     }
     PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
-    return PR_FAILURE;
+    return -1;
 }
 
 #define _PR_IS_W_SLASH(ch) ((ch) == L'/' || (ch) == L'\\')
 
 /*
  * IsRootDirectoryW --
  *
  * Return PR_TRUE if the pathname 'fn' is a valid root directory,
--- a/nsprpub/pr/src/misc/dtoa.c
+++ b/nsprpub/pr/src/misc/dtoa.c
@@ -2786,19 +2786,16 @@ strtod
 	/* Get starting approximation = rv * 10**e1 */
 
 	if (e1 > 0) {
 		if ((i = e1 & 15))
 			dval(&rv) *= tens[i];
 		if (e1 &= ~15) {
 			if (e1 > DBL_MAX_10_EXP) {
  ovfl:
-#ifndef NO_ERRNO
-				errno = ERANGE;
-#endif
 				/* Can't trust HUGE_VAL */
 #ifdef IEEE_Arith
 #ifdef Honor_FLT_ROUNDS
 				switch(bc.rounding) {
 				  case 0: /* toward 0 */
 				  case 3: /* toward -infinity */
 					word0(&rv) = Big0;
 					word1(&rv) = Big1;
@@ -2815,16 +2812,27 @@ strtod
 				/* set overflow bit */
 				dval(&rv0) = 1e300;
 				dval(&rv0) *= dval(&rv0);
 #endif
 #else /*IEEE_Arith*/
 				word0(&rv) = Big0;
 				word1(&rv) = Big1;
 #endif /*IEEE_Arith*/
+ range_err:
+				if (bd0) {
+					Bfree(bb);
+					Bfree(bd);
+					Bfree(bs);
+					Bfree(bd0);
+					Bfree(delta);
+					}
+#ifndef NO_ERRNO
+				errno = ERANGE;
+#endif
 				goto ret;
 				}
 			e1 >>= 4;
 			for(j = 0; e1 > 1; j++, e1 >>= 1)
 				if (e1 & 1)
 					dval(&rv) *= bigtens[j];
 		/* The last multiplication could overflow. */
 			word0(&rv) -= P*Exp_msk1;
@@ -2879,20 +2887,17 @@ strtod
 			dval(&rv) *= tinytens[j];
 			if (!dval(&rv)) {
 				dval(&rv) = 2.*dval(&rv0);
 				dval(&rv) *= tinytens[j];
 #endif
 				if (!dval(&rv)) {
  undfl:
 					dval(&rv) = 0.;
-#ifndef NO_ERRNO
-					errno = ERANGE;
-#endif
-					goto ret;
+					goto range_err;
 					}
 #ifndef Avoid_Underflow
 				word0(&rv) = Tiny0;
 				word1(&rv) = Tiny1;
 				/* The refinement below will clean
 				 * this approximation up.
 				 */
 				}
@@ -3118,17 +3123,17 @@ strtod
 				word0(&rv) -= P*Exp_msk1;
 				goto cont;
 				}
 #endif /*Sudden_Underflow*/
 #endif /*Avoid_Underflow}*/
 			adj.d *= ulp(&rv);
 			if (bc.dsign) {
 				if (word0(&rv) == Big0 && word1(&rv) == Big1)
-					goto ovflfree;
+					goto ovfl;
 				dval(&rv) += adj.d;
 				}
 			else
 				dval(&rv) -= adj.d;
 			goto cont;
 			}
 #endif /*}Honor_FLT_ROUNDS*/
 
@@ -3169,16 +3174,18 @@ strtod
 				if ((word0(&rv) & Bndry_mask1) == Bndry_mask1
 				 &&  word1(&rv) == (
 #ifdef Avoid_Underflow
 			(bc.scale && (y = word0(&rv) & Exp_mask) <= 2*P*Exp_msk1)
 		? (0xffffffff & (0xffffffff << (2*P+1-(y>>Exp_shift)))) :
 #endif
 						   0xffffffff)) {
 					/*boundary case -- increment exponent*/
+					if (word0(&rv) == Big0 && word1(&rv) == Big1)
+						goto ovfl;
 					word0(&rv) = (word0(&rv) & Exp_mask)
 						+ Exp_msk1
 #ifdef IBM
 						| Exp_msk1 >> 4
 #endif
 						;
 					word1(&rv) = 0;
 #ifdef Avoid_Underflow
@@ -3333,27 +3340,18 @@ strtod
 
 		if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) {
 			dval(&rv0) = dval(&rv);
 			word0(&rv) -= P*Exp_msk1;
 			adj.d = aadj1 * ulp(&rv);
 			dval(&rv) += adj.d;
 			if ((word0(&rv) & Exp_mask) >=
 					Exp_msk1*(DBL_MAX_EXP+Bias-P)) {
-				if (word0(&rv0) == Big0 && word1(&rv0) == Big1) {
-#ifdef Honor_FLT_ROUNDS
- ovflfree:
-#endif
-					Bfree(bb);
-					Bfree(bd);
-					Bfree(bs);
-					Bfree(bd0);
-					Bfree(delta);
+				if (word0(&rv0) == Big0 && word1(&rv0) == Big1)
 					goto ovfl;
-					}
 				word0(&rv) = Big0;
 				word1(&rv) = Big1;
 				goto cont;
 				}
 			else
 				word0(&rv) += P*Exp_msk1;
 			}
 		else {
@@ -3463,18 +3461,24 @@ strtod
 		}
 	Bfree(bb);
 	Bfree(bd);
 	Bfree(bs);
 	Bfree(bd0);
 	Bfree(delta);
 #ifndef NO_STRTOD_BIGCOMP
 	if (bc.nd > nd && bc.dsign) {
+		bd0 = 0;
 		bc.e0 += nz1;
 		bigcomp(&rv, s0, &bc);
+		y = word0(&rv) & Exp_mask;
+		if (y == Exp_mask)
+			goto ovfl;
+		if (y == 0 && rv.d == 0.)
+			goto undfl;
 		}
 #endif
 #ifdef SET_INEXACT
 	if (bc.inexact) {
 		if (!oldinexact) {
 			word0(&rv0) = Exp_1 + (70 << Exp_shift);
 			word1(&rv0) = 0;
 			dval(&rv0) += 1.;
--- a/nsprpub/pr/tests/op_filok.c
+++ b/nsprpub/pr/tests/op_filok.c
@@ -58,16 +58,18 @@
 /*
  * The name of a file that is guaranteed to exist
  * on every machine of a particular OS.
  */
 #if defined(SYMBIAN)
 #define EXISTING_FILENAME "z:\\system\\install\\Series60v3.0.sis"
 #elif defined (XP_UNIX)
 #define EXISTING_FILENAME "/bin/sh"
+#elif defined(WINCE)
+#define EXISTING_FILENAME "/Windows/services.exe"
 #elif defined(WIN32)
 #define EXISTING_FILENAME "c:/autoexec.bat"
 #elif defined(OS2)
 #define EXISTING_FILENAME "c:/config.sys"
 #elif defined(BEOS)
 #define EXISTING_FILENAME "/boot/beos/bin/sh"
 #else
 #error "Unknown OS"
--- a/nsprpub/pr/tests/vercheck.c
+++ b/nsprpub/pr/tests/vercheck.c
@@ -47,30 +47,30 @@
  */
 
 #include "prinit.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 
 /*
- * This release (4.8.4) is backward compatible with the
+ * This release (4.8.5) 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, and 4.8.3 releases.  It, of course,
+ * 4.8, 4.8.1, 4.8.2, 4.8.3, and 4.8.4 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", PR_VERSION
+    "4.8", "4.8.1", "4.8.2", "4.8.3", "4.8.4", 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.