diff --git a/nsprpub/TAG-INFO b/nsprpub/TAG-INFO index 59d87097c71f1..778801bb9c91e 100644 --- a/nsprpub/TAG-INFO +++ b/nsprpub/TAG-INFO @@ -1 +1 @@ -NSPR_4_9_5_RTM +NSPR_4_9_6_BETA1 diff --git a/nsprpub/config/prdepend.h b/nsprpub/config/prdepend.h index e49e92677e3eb..6c66b37ca0fc7 100644 --- a/nsprpub/config/prdepend.h +++ b/nsprpub/config/prdepend.h @@ -10,3 +10,4 @@ */ #error "Do not include this header file." + diff --git a/nsprpub/configure b/nsprpub/configure index 5348f5c0bb891..29c861a04a055 100755 --- a/nsprpub/configure +++ b/nsprpub/configure @@ -19,7 +19,7 @@ ac_help="$ac_help location of the Android toolchain" ac_help="$ac_help --with-android-version=VER - Android platform version, default 5" + Android platform version, default 5 for arm, 9 for x86/mips" ac_help="$ac_help --with-android-platform=DIR location of platform dir" @@ -736,7 +736,7 @@ test "$host_alias" != "$target_alias" && MOD_MAJOR_VERSION=4 MOD_MINOR_VERSION=9 -MOD_PATCH_VERSION=5 +MOD_PATCH_VERSION=6 NSPR_MODNAME=nspr20 _HAVE_PTHREADS= USE_PTHREADS= @@ -857,12 +857,19 @@ if test "${with_android_toolchain+set}" = set; then fi +case "$target_cpu" in +arm) + android_version=5 + ;; +i?86|mipsel) + android_version=9 + ;; +esac + # Check whether --with-android-version or --without-android-version was given. if test "${with_android_version+set}" = set; then withval="$with_android_version" android_version=$withval -else - android_version=5 fi @@ -924,7 +931,7 @@ case "$target" in if test -z "$android_toolchain" ; then echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6 -echo "configure:928: checking for android toolchain directory" >&5 +echo "configure:935: checking for android toolchain directory" >&5 kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"` @@ -950,7 +957,7 @@ echo "configure:928: checking for android toolchain directory" >&5 if test -z "$android_platform" ; then echo $ac_n "checking for android platform directory""... $ac_c" 1>&6 -echo "configure:954: checking for android platform directory" >&5 +echo "configure:961: checking for android platform directory" >&5 case "$target_cpu" in arm) @@ -1312,7 +1319,7 @@ if test -z "$SKIP_PATH_CHECKS"; then # Extract the first word of "$WHOAMI whoami", so it can be a program name with args. set dummy $WHOAMI whoami; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1316: checking for $ac_word" >&5 +echo "configure:1323: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1384,13 +1391,13 @@ if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then _SAVE_LDFLAGS="$LDFLAGS" echo $ac_n "checking for $host compiler""... $ac_c" 1>&6 -echo "configure:1388: checking for $host compiler" >&5 +echo "configure:1395: checking for $host compiler" >&5 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1394: checking for $ac_word" >&5 +echo "configure:1401: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1436,16 +1443,16 @@ test -n "$HOST_CC" || HOST_CC="""" LDFLAGS="$HOST_LDFLAGS" echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1440: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1447: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6 else @@ -1480,7 +1487,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1484: checking for $ac_word" >&5 +echo "configure:1491: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1514,7 +1521,7 @@ test -n "$CC" || CC="echo" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1518: checking for $ac_word" >&5 +echo "configure:1525: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1544,7 +1551,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1548: checking for $ac_word" >&5 +echo "configure:1555: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1595,7 +1602,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1599: checking for $ac_word" >&5 +echo "configure:1606: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1627,7 +1634,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1631: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1638: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1638,12 +1645,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1642 "configure" +#line 1649 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1669,12 +1676,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1673: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1678: checking whether we are using GNU C" >&5 +echo "configure:1685: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1683,7 +1690,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1702,7 +1709,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1706: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1713: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1739,7 +1746,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1743: checking for $ac_word" >&5 +echo "configure:1750: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1775,7 +1782,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1779: checking for $ac_word" >&5 +echo "configure:1786: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1807,7 +1814,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1811: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1818: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1818,12 +1825,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1822 "configure" +#line 1829 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1849,12 +1856,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1853: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1860: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1858: checking whether we are using GNU C++" >&5 +echo "configure:1865: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1863,7 +1870,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1882,7 +1889,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1886: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1893: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1927,7 +1934,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1931: checking for $ac_word" >&5 +echo "configure:1938: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1962,7 +1969,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1966: checking for $ac_word" >&5 +echo "configure:1973: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1997,7 +2004,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2001: checking for $ac_word" >&5 +echo "configure:2008: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2032,7 +2039,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2036: checking for $ac_word" >&5 +echo "configure:2043: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2067,7 +2074,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2071: checking for $ac_word" >&5 +echo "configure:2078: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2102,7 +2109,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2106: checking for $ac_word" >&5 +echo "configure:2113: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2137,7 +2144,7 @@ else # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2141: checking for $ac_word" >&5 +echo "configure:2148: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2167,7 +2174,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2171: checking for $ac_word" >&5 +echo "configure:2178: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2218,7 +2225,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2222: checking for $ac_word" >&5 +echo "configure:2229: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2250,7 +2257,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2254: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2261: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2261,12 +2268,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2265 "configure" +#line 2272 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2292,12 +2299,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2296: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2303: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2301: checking whether we are using GNU C" >&5 +echo "configure:2308: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2306,7 +2313,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2325,7 +2332,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2329: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2336: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2365,7 +2372,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2369: checking for $ac_word" >&5 +echo "configure:2376: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2397,7 +2404,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2401: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2408: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2408,12 +2415,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 2412 "configure" +#line 2419 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2439,12 +2446,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2443: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2450: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:2448: checking whether we are using GNU C++" >&5 +echo "configure:2455: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2453,7 +2460,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -2472,7 +2479,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:2476: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2483: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2506,7 +2513,7 @@ fi fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2510: checking how to run the C preprocessor" >&5 +echo "configure:2517: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2521,13 +2528,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2538: \"$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 : @@ -2538,13 +2545,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2555: \"$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 : @@ -2555,13 +2562,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2572: \"$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 : @@ -2588,7 +2595,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2592: checking for $ac_word" >&5 +echo "configure:2599: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2620,7 +2627,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2624: checking for $ac_word" >&5 +echo "configure:2631: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2661,7 +2668,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2665: checking for $ac_word" >&5 +echo "configure:2672: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2702,7 +2709,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2706: checking for $ac_word" >&5 +echo "configure:2713: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2743,7 +2750,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2747: checking for $ac_word" >&5 +echo "configure:2754: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2784,7 +2791,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2788: checking for $ac_word" >&5 +echo "configure:2795: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2852,7 +2859,7 @@ else fi echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:2856: checking for gcc -pipe support" >&5 +echo "configure:2863: checking for gcc -pipe support" >&5 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then echo '#include ' > dummy-hello.c echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c @@ -2867,14 +2874,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:2878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _res_gcc_pipe="yes" else @@ -2904,16 +2911,16 @@ _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction" echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 -echo "configure:2908: checking whether C compiler supports -fprofile-generate" >&5 +echo "configure:2915: checking whether C compiler supports -fprofile-generate" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-generate" result="yes" @@ -2936,7 +2943,7 @@ CFLAGS="$_SAVE_CFLAGS" if test "$GNU_CC"; then echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6 -echo "configure:2940: checking for visibility(hidden) attribute" >&5 +echo "configure:2947: checking for visibility(hidden) attribute" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2960,7 +2967,7 @@ echo "$ac_t""$ac_cv_visibility_hidden" 1>&6 EOF echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6 -echo "configure:2964: checking for visibility pragma support" >&5 +echo "configure:2971: checking for visibility pragma support" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3013,7 +3020,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3017: checking for $ac_word" >&5 +echo "configure:3024: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3335,14 +3342,14 @@ no) _SAVE_CFLAGS="$CFLAGS" CFLAGS="$arch_flag" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* MOZ_THUMB2=1 else @@ -3404,16 +3411,16 @@ if test -n "$all_flags"; then _SAVE_CFLAGS="$CFLAGS" CFLAGS="$all_flags" echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6 -echo "configure:3408: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 +echo "configure:3415: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3470,17 +3477,17 @@ EOF DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib' ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6 -echo "configure:3474: checking for sys/atomic_op.h" >&5 +echo "configure:3481: checking for sys/atomic_op.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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3491: \"$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* @@ -3637,7 +3644,7 @@ EOF _DEBUG_FLAGS='-gdwarf-2 -O0' MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6 -echo "configure:3641: checking for gethostbyaddr in -lbind" >&5 +echo "configure:3648: checking for gethostbyaddr in -lbind" >&5 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3645,7 +3652,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3667: \"$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 @@ -3865,17 +3872,17 @@ EOF fi ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6 -echo "configure:3869: checking for crt_externs.h" >&5 +echo "configure:3876: checking for crt_externs.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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3886: \"$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* @@ -4919,17 +4926,17 @@ EOF _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:4923: checking for machine/builtins.h" >&5 +echo "configure:4930: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4940: \"$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* @@ -5488,7 +5495,7 @@ case $target in ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:5492: checking for dlopen in -ldl" >&5 +echo "configure:5499: 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 @@ -5496,7 +5503,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5518: \"$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 @@ -5524,17 +5531,17 @@ 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:5528: checking for dlfcn.h" >&5 +echo "configure:5535: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5545: \"$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* @@ -5567,13 +5574,13 @@ esac if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:5571: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5578: 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 < Autoconf TIOCGETP @@ -5591,7 +5598,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -5617,12 +5624,12 @@ LIBS="$LIBS $OS_LIBS" for ac_func in lchown strerror dladdr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5621: checking for $ac_func" >&5 +echo "configure:5628: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5656: \"$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 @@ -5697,7 +5704,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5701: checking for $ac_word" >&5 +echo "configure:5708: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5756,7 +5763,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5760: checking for +Olit support" >&5 +echo "configure:5767: 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 @@ -5798,7 +5805,7 @@ wince*) *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5802: checking for pthread_create in -lpthreads" >&5 +echo "configure:5809: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { return v; } @@ -5820,7 +5827,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5824: checking for pthread_create in -lpthread" >&5 +echo "configure:5831: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { return v; } @@ -5842,7 +5849,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5846: checking for pthread_create in -lc_r" >&5 +echo "configure:5853: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { return v; } @@ -5864,7 +5871,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5868: checking for pthread_create in -lc" >&5 +echo "configure:5875: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { return v; } @@ -5982,7 +5989,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:5986: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5993: 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 @@ -6005,7 +6012,7 @@ echo "configure:5986: 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:6009: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:6016: 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 diff --git a/nsprpub/configure.in b/nsprpub/configure.in index 079ed871a9b0e..f6992ea864073 100644 --- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -15,7 +15,7 @@ dnl = Defaults dnl ======================================================== MOD_MAJOR_VERSION=4 MOD_MINOR_VERSION=9 -MOD_PATCH_VERSION=5 +MOD_PATCH_VERSION=6 NSPR_MODNAME=nspr20 _HAVE_PTHREADS= USE_PTHREADS= @@ -111,11 +111,20 @@ AC_ARG_WITH(android-toolchain, location of the Android toolchain], android_toolchain=$withval) +dnl The default android_version is different for each target cpu. +case "$target_cpu" in +arm) + android_version=5 + ;; +i?86|mipsel) + android_version=9 + ;; +esac + AC_ARG_WITH(android-version, [ --with-android-version=VER - Android platform version, default 5], - android_version=$withval, - android_version=5) + Android platform version, default 5 for arm, 9 for x86/mips], + android_version=$withval) AC_ARG_WITH(android-platform, [ --with-android-platform=DIR diff --git a/nsprpub/lib/ds/plarena.c b/nsprpub/lib/ds/plarena.c index 5b1e53af1f932..cc2ffb00a89c6 100644 --- a/nsprpub/lib/ds/plarena.c +++ b/nsprpub/lib/ds/plarena.c @@ -345,6 +345,22 @@ PR_IMPLEMENT(void) PL_ArenaFinish(void) once = pristineCallOnce; } +PR_IMPLEMENT(size_t) PL_SizeOfArenaPoolExcludingPool( + PLArenaPool *pool, PLMallocSizeFn mallocSizeOf) +{ + /* + * The first PLArena is within |pool|, so don't measure it. Subsequent + * PLArenas are separate and must measured. + */ + size_t size = 0; + PLArena *arena = pool->first.next; + while (arena) { + size += mallocSizeOf(arena); + arena = arena->next; + } + return size; +} + #ifdef PL_ARENAMETER PR_IMPLEMENT(void) PL_ArenaCountAllocation(PLArenaPool *pool, PRUint32 nb) { diff --git a/nsprpub/lib/ds/plarenas.h b/nsprpub/lib/ds/plarenas.h index b4705624318f5..4cbe32c4c39ef 100644 --- a/nsprpub/lib/ds/plarenas.h +++ b/nsprpub/lib/ds/plarenas.h @@ -60,6 +60,19 @@ PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark); */ PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern); +/* +** A function like malloc_size() or malloc_usable_size() that returns the +** size of a heap block. +*/ +typedef size_t (*PLMallocSizeFn)(const void *ptr); + +/* +** Return all memory used by a PLArenaPool, excluding the PLArenaPool +** structure. +*/ +PR_EXTERN(size_t) PL_SizeOfArenaPoolExcludingPool( + PLArenaPool *pool, PLMallocSizeFn mallocSizeOf); + PR_END_EXTERN_C #endif /* PLARENAS_H */ diff --git a/nsprpub/lib/ds/plds.def b/nsprpub/lib/ds/plds.def index 5c672abb3445f..cc54a4de2e771 100644 --- a/nsprpub/lib/ds/plds.def +++ b/nsprpub/lib/ds/plds.def @@ -54,3 +54,7 @@ PL_HashTableRawLookupConst; ;+ global: PL_ClearArenaPool; ;+} NSPR_4.1; +;+NSPR_4.9.6 { +;+ global: +PL_SizeOfArenaPoolExcludingPool; +;+} NSPR_4.8.5; diff --git a/nsprpub/pr/include/md/_linux.cfg b/nsprpub/pr/include/md/_linux.cfg index d0a3beeb12537..2fdbf63ee8449 100644 --- a/nsprpub/pr/include/md/_linux.cfg +++ b/nsprpub/pr/include/md/_linux.cfg @@ -590,6 +590,59 @@ #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 +#elif defined(__aarch64__) + +#ifdef __AARCH64EB__ +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 +#elif defined(__AARCH64EL__) +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#else +#error "Unknown Aarch64 endianness." +#endif +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 +#define PR_ALIGN_OF_WORD 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + #elif defined(__hppa__) #undef IS_LITTLE_ENDIAN diff --git a/nsprpub/pr/include/md/_linux.h b/nsprpub/pr/include/md/_linux.h index 4992b7735076e..906822fb8416d 100644 --- a/nsprpub/pr/include/md/_linux.h +++ b/nsprpub/pr/include/md/_linux.h @@ -41,6 +41,8 @@ #define _PR_SI_ARCHITECTURE "mips" #elif defined(__arm__) #define _PR_SI_ARCHITECTURE "arm" +#elif defined(__aarch64__) +#define _PR_SI_ARCHITECTURE "aarch64" #elif defined(__hppa__) #define _PR_SI_ARCHITECTURE "hppa" #elif defined(__s390x__) @@ -63,6 +65,10 @@ #define _MD_DEFAULT_STACK_SIZE 65536L #define _MD_MMAP_FLAGS MAP_PRIVATE +#if defined(__aarch64__) +#define _MD_MINIMUM_STACK_SIZE 0x20000 +#endif + #undef HAVE_STACK_GROWING_UP /* @@ -186,7 +192,7 @@ extern PRInt32 _PR_ppc_AtomicSet(PRInt32 *val, PRInt32 newval); }) #endif -#if defined(__arm__) +#if defined(__arm__) || defined(__aarch64__) #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) /* Use GCC built-in functions */ #define _PR_HAVE_ATOMIC_OPS diff --git a/nsprpub/pr/include/md/_win95.h b/nsprpub/pr/include/md/_win95.h index a919e3a02e650..3db340e3de49f 100644 --- a/nsprpub/pr/include/md/_win95.h +++ b/nsprpub/pr/include/md/_win95.h @@ -379,9 +379,9 @@ extern PROsfd _MD_Accept(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen, /* --- Lock stuff --- */ #define _PR_LOCK _MD_LOCK -#define _PR_UNLOCK _MD_UNLOCK +#define _PR_UNLOCK _MD_UNLOCK -#define _MD_NEW_LOCK(lock) (InitializeCriticalSection(&((lock)->mutex)),(lock)->notified.length=0,(lock)->notified.link=NULL,PR_SUCCESS) +#define _MD_NEW_LOCK _PR_MD_NEW_LOCK #define _MD_FREE_LOCK(lock) DeleteCriticalSection(&((lock)->mutex)) #define _MD_LOCK(lock) EnterCriticalSection(&((lock)->mutex)) #define _MD_TEST_AND_LOCK(lock) (EnterCriticalSection(&((lock)->mutex)),0) @@ -499,7 +499,7 @@ extern DWORD _pr_currentCPUIndex; #define _PR_UnlockSched() 0 /* --- Initialization stuff --- */ -#define _MD_INIT_LOCKS() +#define _MD_INIT_LOCKS _PR_MD_INIT_LOCKS /* --- Stack stuff --- */ #define _MD_INIT_STACK(stack, redzone) diff --git a/nsprpub/pr/include/prinit.h b/nsprpub/pr/include/prinit.h index bb1ce011486ae..9e5da3502fdfe 100644 --- a/nsprpub/pr/include/prinit.h +++ b/nsprpub/pr/include/prinit.h @@ -31,11 +31,11 @@ PR_BEGIN_EXTERN_C ** The format of the version string is ** ".[.] []" */ -#define PR_VERSION "4.9.5" +#define PR_VERSION "4.9.6 Beta" #define PR_VMAJOR 4 #define PR_VMINOR 9 -#define PR_VPATCH 5 -#define PR_BETA PR_FALSE +#define PR_VPATCH 6 +#define PR_BETA PR_TRUE /* ** PRVersionCheck diff --git a/nsprpub/pr/src/md/windows/w95cv.c b/nsprpub/pr/src/md/windows/w95cv.c index afff1b70ee0e9..27b34e6916058 100644 --- a/nsprpub/pr/src/md/windows/w95cv.c +++ b/nsprpub/pr/src/md/windows/w95cv.c @@ -304,6 +304,59 @@ void _PR_MD_NOTIFYALL_CV(_MDCVar *cv, _MDLock *lock) return; } +typedef BOOL (WINAPI *INITIALIZECRITICALSECTIONEX)( + CRITICAL_SECTION *lpCriticalSection, + DWORD dwSpinCount, + DWORD Flags); + +static INITIALIZECRITICALSECTIONEX sInitializeCriticalSectionEx; + +void _PR_MD_INIT_LOCKS(void) +{ + /* + * Starting with Windows Vista, every CRITICAL_SECTION allocates an extra + * RTL_CRITICAL_SECTION_DEBUG object. Unfortunately, this debug object is + * not reclaimed by DeleteCriticalSection(), causing an apparent memory + * leak. This is a debugging "feature", not a bug. If we are running on + * Vista or later, use InitializeCriticalSectionEx() to allocate + * CRITICAL_SECTIONs without debug objects. + */ + HMODULE hKernel32 = GetModuleHandle("kernel32.dll"); + PR_ASSERT(hKernel32); + PR_ASSERT(!sInitializeCriticalSectionEx); + sInitializeCriticalSectionEx = (INITIALIZECRITICALSECTIONEX) + GetProcAddress(hKernel32, "InitializeCriticalSectionEx"); +} + +/* + * By default, CRITICAL_SECTIONs are initialized with a spin count of 0. + * Joe Duffy's "Concurrent Programming on Windows" book suggests 1500 is + * a "reasonable starting point". On single-processor systems, the spin + * count is ignored and the critical section spin count is set to 0. + */ +#define LOCK_SPIN_COUNT 1500 + +PRStatus _PR_MD_NEW_LOCK(_MDLock *lock) +{ + CRITICAL_SECTION *cs = &lock->mutex; + BOOL ok; + + if (sInitializeCriticalSectionEx) { + ok = sInitializeCriticalSectionEx(cs, LOCK_SPIN_COUNT, + CRITICAL_SECTION_NO_DEBUG_INFO); + } else { + ok = InitializeCriticalSectionAndSpinCount(cs, LOCK_SPIN_COUNT); + } + if (!ok) { + _PR_MD_MAP_DEFAULT_ERROR(GetLastError()); + return PR_FAILURE; + } + + lock->notified.length = 0; + lock->notified.link = NULL; + return PR_SUCCESS; +} + void _PR_MD_UNLOCK(_MDLock *lock) { if (0 != lock->notified.length) { @@ -311,5 +364,4 @@ void _PR_MD_UNLOCK(_MDLock *lock) } else { LeaveCriticalSection(&lock->mutex); } - return; } diff --git a/nsprpub/pr/tests/vercheck.c b/nsprpub/pr/tests/vercheck.c index 556278fe405cc..3ba852e0aed28 100644 --- a/nsprpub/pr/tests/vercheck.c +++ b/nsprpub/pr/tests/vercheck.c @@ -20,9 +20,9 @@ #include /* - * This release (4.9.5) is backward compatible with the + * This release (4.9.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.x, 4.9, 4.9.1, 4.9.2, 4.9.3, and 4.9.4 releases. + * 4.8.x, 4.9, 4.9.1, 4.9.2, 4.9.3, 4.9.4, and 4.9.5 releases. * It, of course, is compatible with itself. */ static char *compatible_version[] = { @@ -35,7 +35,8 @@ static char *compatible_version[] = { "4.7.6", "4.8", "4.8.1", "4.8.2", "4.8.3", "4.8.4", "4.8.5", "4.8.6", "4.8.7", "4.8.8", "4.8.9", - "4.9", "4.9.1", "4.9.2", "4.9.3", "4.9.4", PR_VERSION + "4.9", "4.9.1", "4.9.2", "4.9.3", "4.9.4", "4.9.5", + PR_VERSION }; /* @@ -50,7 +51,7 @@ static char *incompatible_version[] = { "3.0", "3.0.1", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.5", "3.5.1", - "4.9.6", + "4.9.7", "4.10", "4.10.1", "10.0", "11.1", "12.14.20" };