diff --git a/nsprpub/admin/repackage.sh b/nsprpub/admin/repackage.sh index c542131227ac..afc3fbacd217 100755 --- a/nsprpub/admin/repackage.sh +++ b/nsprpub/admin/repackage.sh @@ -64,10 +64,10 @@ # # ------------------------------------------------------------------ -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 diff --git a/nsprpub/configure b/nsprpub/configure index 8f7fa364a23c..b4e2378a8a44 100755 --- a/nsprpub/configure +++ b/nsprpub/configure @@ -695,7 +695,7 @@ test "$host_alias" != "$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= @@ -3575,6 +3575,7 @@ EOF DSO_CFLAGS=+Z else DSO_CFLAGS=-fPIC + ASFLAGS="$ASFLAGS -x assembler-with-cpp" fi if test -n "$MOZILLA_CLIENT"; then @@ -4180,8 +4181,7 @@ EOF EOF - AR='lib -NOLOGO -OUT:"$@"' - AR_FLAGS= + AR_FLAGS='-NOLOGO -OUT:"$@"' OBJ_SUFFIX=obj LIB_SUFFIX=lib @@ -4196,7 +4196,7 @@ EOF 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' @@ -5367,10 +5367,13 @@ 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 void *foo(void *v) { return v; } @@ -5392,7 +5395,7 @@ echo " 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 void *foo(void *v) { return v; } @@ -5414,7 +5417,7 @@ echo " 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 void *foo(void *v) { return v; } @@ -5436,7 +5439,7 @@ echo " 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 void *foo(void *v) { return v; } @@ -5568,7 +5571,7 @@ 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 @@ -5591,7 +5594,7 @@ echo "configure:5572: checking whether ${CC-cc} accepts -pthread" >&5 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 @@ -5879,7 +5882,7 @@ if test -n "$MOZ_OPTIMIZE"; then 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 diff --git a/nsprpub/configure.in b/nsprpub/configure.in index 81a215a0c9e4..26eb220ed3e9 100644 --- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -50,7 +50,7 @@ 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= @@ -1200,6 +1200,7 @@ tools are selected during the Xcode/Developer Tools installation.]) DSO_CFLAGS=+Z else DSO_CFLAGS=-fPIC + ASFLAGS="$ASFLAGS -x assembler-with-cpp" fi if test -n "$MOZILLA_CLIENT"; then @@ -1650,8 +1651,7 @@ tools are selected during the Xcode/Developer Tools installation.]) 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 @@ -1666,7 +1666,7 @@ tools are selected during the Xcode/Developer Tools installation.]) 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' @@ -2403,6 +2403,9 @@ case "$target_os" in darwin*) _HAVE_PTHREADS=1 ;; +wince*) + _HAVE_PTHREADS= + ;; *) MOZ_CHECK_PTHREADS(pthreads, _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads", @@ -2723,7 +2726,7 @@ if test -n "$MOZ_OPTIMIZE"; then 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 diff --git a/nsprpub/pr/include/md/_freebsd.h b/nsprpub/pr/include/md/_freebsd.h index b684ef79f8de..9cda93cb6523 100644 --- a/nsprpub/pr/include/md/_freebsd.h +++ b/nsprpub/pr/include/md/_freebsd.h @@ -76,7 +76,7 @@ #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 diff --git a/nsprpub/pr/include/prinit.h b/nsprpub/pr/include/prinit.h index 45c203bf5d92..48651462f20d 100644 --- a/nsprpub/pr/include/prinit.h +++ b/nsprpub/pr/include/prinit.h @@ -63,11 +63,11 @@ PR_BEGIN_EXTERN_C ** The format of the version string is ** ".[.] []" */ -#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 diff --git a/nsprpub/pr/src/linking/Makefile.in b/nsprpub/pr/src/linking/Makefile.in index 9b82aca205df..738132dd2809 100644 --- a/nsprpub/pr/src/linking/Makefile.in +++ b/nsprpub/pr/src/linking/Makefile.in @@ -62,11 +62,6 @@ 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 diff --git a/nsprpub/pr/src/linking/prlink.c b/nsprpub/pr/src/linking/prlink.c index 873c5e854023..2f73d0fb4226 100644 --- a/nsprpub/pr/src/linking/prlink.c +++ b/nsprpub/pr/src/linking/prlink.c @@ -45,15 +45,8 @@ #endif #if defined(XP_MACOSX) && defined(USE_MACH_DYLD) -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #endif #ifdef XP_UNIX @@ -621,16 +614,16 @@ 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); diff --git a/nsprpub/pr/src/md/windows/ntio.c b/nsprpub/pr/src/md/windows/ntio.c index 5fecc537b655..46535030850e 100644 --- a/nsprpub/pr/src/md/windows/ntio.c +++ b/nsprpub/pr/src/md/windows/ntio.c @@ -2740,20 +2740,20 @@ void FlipSlashes(char *cp, int len) ** */ -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; } diff --git a/nsprpub/pr/src/md/windows/w95io.c b/nsprpub/pr/src/md/windows/w95io.c index f9b2cc437ecc..86f952aea45e 100644 --- a/nsprpub/pr/src/md/windows/w95io.c +++ b/nsprpub/pr/src/md/windows/w95io.c @@ -673,20 +673,20 @@ static void FlipSlashes(char *cp, size_t len) ** */ -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; } @@ -1578,20 +1578,20 @@ _PR_MD_READ_DIR_UTF16(_MDDirUTF16 *d, PRIntn flags) 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'\\') diff --git a/nsprpub/pr/src/misc/dtoa.c b/nsprpub/pr/src/misc/dtoa.c index a065a20e86d8..ce41835c8fb9 100644 --- a/nsprpub/pr/src/misc/dtoa.c +++ b/nsprpub/pr/src/misc/dtoa.c @@ -2791,9 +2791,6 @@ strtod 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 @@ -2820,6 +2817,17 @@ strtod 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; @@ -2884,10 +2892,7 @@ strtod if (!dval(&rv)) { undfl: dval(&rv) = 0.; -#ifndef NO_ERRNO - errno = ERANGE; -#endif - goto ret; + goto range_err; } #ifndef Avoid_Underflow word0(&rv) = Tiny0; @@ -3123,7 +3128,7 @@ strtod adj.d *= ulp(&rv); if (bc.dsign) { if (word0(&rv) == Big0 && word1(&rv) == Big1) - goto ovflfree; + goto ovfl; dval(&rv) += adj.d; } else @@ -3174,6 +3179,8 @@ strtod #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 @@ -3338,17 +3345,8 @@ strtod 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; @@ -3468,8 +3466,14 @@ strtod 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 diff --git a/nsprpub/pr/tests/op_filok.c b/nsprpub/pr/tests/op_filok.c index 9a5dc9b1a29d..3218c1fcdf8d 100644 --- a/nsprpub/pr/tests/op_filok.c +++ b/nsprpub/pr/tests/op_filok.c @@ -63,6 +63,8 @@ #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) diff --git a/nsprpub/pr/tests/vercheck.c b/nsprpub/pr/tests/vercheck.c index e75d7281b575..188b69bf5921 100644 --- a/nsprpub/pr/tests/vercheck.c +++ b/nsprpub/pr/tests/vercheck.c @@ -52,9 +52,9 @@ #include /* - * 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[] = { @@ -65,7 +65,7 @@ static char *compatible_version[] = { "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 }; /*