--- xulrunner-1.9.0.19.orig/configure.in +++ xulrunner-1.9.0.19/configure.in @@ -986,6 +986,7 @@ case "${target_os}" in linux*) OS_ARCH=Linux OS_TARGET=Linux ;; kfreebsd*-gnu) OS_ARCH=GNU_kFreeBSD OS_TARGET=GNU_kFreeBSD ;; + gnu*) OS_ARCH=GNU ;; solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; mingw*) OS_ARCH=WINNT ;; wince*) OS_ARCH=WINCE ;; @@ -1296,6 +1297,7 @@ WARNINGS_AS_ERRORS='-Werror' DSO_CFLAGS='' DSO_PIC_CFLAGS='-fPIC' + ASFLAGS="$ASFLAGS -fPIC" _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti _MOZ_EXCEPTIONS_FLAGS_ON='-fhandle-exceptions' @@ -1528,7 +1530,7 @@ LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc' ;; -*-linux*|*-kfreebsd*-gnu) +*-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" @@ -1824,8 +1826,7 @@ MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1 ;; mips*) - CFLAGS="$CFLAGS -Wa,-xgot" - CXXFLAGS="$CXXFLAGS -Wa,-xgot" + MOZ_DEBUG_FLAGS="-g" # We want inlining ;; esac ;; @@ -2566,7 +2567,7 @@ dnl = Flags to strip unused symbols from .so components dnl ======================================================== case "$target" in - *-linux*|*-kfreebsd*-gnu) + *-linux*|*-kfreebsd*-gnu|*-gnu*) MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' ;; *-solaris*) @@ -2777,7 +2778,7 @@ if test "$ac_cv_have_usable_wchar_v2" = "yes"; then AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T) HAVE_CPP_2BYTE_WCHAR_T=1 -else +elif false; then dnl This is really gcc-only dnl Do this test using CXX only since some versions of gcc dnl 2.95-2.97 have a signed wchar_t in c++ only and some versions @@ -2791,7 +2792,7 @@ AC_CACHE_CHECK(for compiler -fshort-wchar option, ac_cv_have_usable_wchar_option_v2, - [AC_TRY_COMPILE([#include + [AC_TRY_LINK([#include $configure_static_assert_macros], [CONFIGURE_STATIC_ASSERT(sizeof(wchar_t) == 2); CONFIGURE_STATIC_ASSERT((wchar_t)-1 > (wchar_t) 0)], @@ -2801,6 +2802,7 @@ if test "$ac_cv_have_usable_wchar_option_v2" = "yes"; then AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T) HAVE_CPP_2BYTE_WCHAR_T=1 + WCHAR_CFLAGS="-fshort-wchar" else CXXFLAGS=$_SAVE_CXXFLAGS fi @@ -3240,7 +3242,7 @@ fi ;; - *-*-linux*|*-*-kfreebsd*-gnu) + *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*) AC_DEFINE(_REENTRANT) ;; @@ -4051,7 +4053,7 @@ fi if test -n "$MOZ_NATIVE_NSS"; then - NSS_LIBS="$NSS_LIBS -lcrmf" + NSS_LIBS=`echo $NSS_LIBS | sed 's/-l/-lcrmf &/'` else NSS_CFLAGS='-I$(LIBXUL_DIST)/include/nss' NSS_DEP_LIBS="\ @@ -4096,7 +4098,7 @@ AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS"], SYSTEM_JPEG=, $JPEG_LIBS) fi -if test "$SYSTEM_JPEG" = 1; then +if test "$SYSTEM_JPEG" = 0; then LIBS="$JPEG_LIBS $LIBS" AC_TRY_COMPILE([ #include #include @@ -4136,7 +4138,7 @@ AC_CHECK_LIB(z, gzread, [SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS"], [SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=], $ZLIB_LIBS) fi -if test "$SYSTEM_ZLIB" = 1; then +if test "$SYSTEM_ZLIB" = 0; then LIBS="$ZLIB_LIBS $LIBS" AC_TRY_COMPILE([ #include #include @@ -4201,6 +4203,7 @@ CFLAGS="-I${PNG_DIR}/include $CFLAGS" LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" fi +APNG=1 if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then SYSTEM_PNG= else @@ -4209,10 +4212,11 @@ AC_MSG_ERROR([--with-system-png requested but no working libpng found]), $PNG_LIBS) AC_CHECK_LIB(png, png_get_acTL, , - AC_MSG_ERROR([--with-system-png won't work because the system's libpng doesn't have APNG support]), + AC_MSG_WARN([system's libpng doesn't have APNG support]) + APNG=, $_SAVE_PNG_LIBS) fi -if test "$SYSTEM_PNG" = 1; then +if test "$SYSTEM_PNG" = 0; then LIBS="$PNG_LIBS $LIBS" AC_TRY_COMPILE([ #include #include @@ -5981,7 +5985,7 @@ SQLITE_CFLAGS= SQLITE_LIBS='$(call EXPAND_LIBNAME_PATH,sqlite3,$(DIST)/lib)' else - PKG_CHECK_MODULES(SQLITE, sqlite3 >= $SQLITE_VERSION) + PKG_CHECK_MODULES(SQLITE, sqlite3) fi AC_SUBST(MOZ_NATIVE_SQLITE) @@ -6053,6 +6057,40 @@ AC_SUBST(JS_ULTRASPARC_OPTS) dnl ======================================================== +dnl = Enable building of the js standalone binary +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(js-binary, +[ --enable-js-binary Build the standalone JS program], + ENABLE_JS_BINARY=1, + ENABLE_JS_BINARY= ) +AC_SUBST(ENABLE_JS_BINARY) + +if test -n "$ENABLE_JS_BINARY"; then + dnl readline Support + dnl ======================================================== + READLINE_DIR=no + MOZ_ARG_WITH_STRING(readline, + [ --with-readline[=PFX] + Use libreadline [installed at prefix PFX]], + READLINE_DIR=$withval) + + if test -n "${READLINE_DIR}" -a "${READLINE_DIR}" != "no"; then + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="-L${READLINE_DIR}/lib $LDFLAGS" + AC_CHECK_LIB(readline, readline, [HAVE_READLINE=1 READLINE_LIBS="-lreadline"], + [HAVE_READLINE= READLINE_LIBS=]) + LDFLAGS=$_SAVE_LDFLAGS + fi + + if test "${READLINE_DIR}" -a -d "${READLINE_DIR}" -a "$HAVE_READLINE" = 1; then + READLINE_LIBS="-L${READLINE_DIR}/lib ${READLINE_LIBS}" + fi +fi + +AC_SUBST(HAVE_READLINE) +AC_SUBST(READLINE_LIBS) + +dnl ======================================================== dnl = dnl = Feature options that require extra sources to be pulled dnl = @@ -7448,7 +7486,7 @@ LCMS_LIBS='-L$(LIBXUL_DIST)/bin -lmozlcms' fi else - PKG_CHECK_MODULES(LCMS, lcms >= $LCMS_VERSION) + PKG_CHECK_MODULES(LCMS, lcms) fi AC_SUBST(MOZ_NATIVE_LCMS) @@ -7939,6 +7977,7 @@ AC_SUBST(SYSTEM_MAKEDEPEND) AC_SUBST(SYSTEM_JPEG) AC_SUBST(SYSTEM_PNG) +AC_SUBST(APNG) AC_SUBST(SYSTEM_ZLIB) AC_SUBST(SYSTEM_BZ2) @@ -7977,6 +8016,7 @@ AC_SUBST(LDFLAGS) AC_SUBST(LIBS) AC_SUBST(CROSS_COMPILE) +AC_SUBST(WCHAR_CFLAGS) AC_SUBST(HOST_CC) AC_SUBST(HOST_CXX) --- xulrunner-1.9.0.19.orig/configure +++ xulrunner-1.9.0.19/configure @@ -279,6 +279,11 @@ ac_help="$ac_help --enable-js-ultrasparc Use UltraSPARC optimizations in JS" ac_help="$ac_help + --enable-js-binary Build the standalone JS program" +ac_help="$ac_help + --with-readline[=PFX] + Use libreadline [installed at prefix PFX]" +ac_help="$ac_help --enable-debug[=DBG] Enable building with developer debug info (Using compiler flags DBG)" ac_help="$ac_help @@ -998,7 +1003,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1002: checking host system type" >&5 +echo "configure:1007: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1019,7 +1024,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1023: checking target system type" >&5 +echo "configure:1028: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1037,7 +1042,7 @@ echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1041: checking build system type" >&5 +echo "configure:1046: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1112,12 +1117,12 @@ MSMANIFEST_TOOL= MISSING_X= -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk 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:1121: checking for $ac_word" >&5 +echo "configure:1126: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1258,13 +1263,13 @@ _SAVE_LDFLAGS="$LDFLAGS" echo $ac_n "checking for host c compiler""... $ac_c" 1>&6 -echo "configure:1262: checking for host c compiler" >&5 +echo "configure:1267: checking for host c compiler" >&5 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc cl icc 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:1268: checking for $ac_word" >&5 +echo "configure:1273: 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 @@ -1299,13 +1304,13 @@ fi echo "$ac_t""$HOST_CC" 1>&6 echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6 -echo "configure:1303: checking for host c++ compiler" >&5 +echo "configure:1308: checking for host c++ compiler" >&5 for ac_prog in $HOST_CXX $CCC c++ g++ gcc CC cxx cc++ cl icc 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:1309: checking for $ac_word" >&5 +echo "configure:1314: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1354,7 +1359,7 @@ # 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:1358: checking for $ac_word" >&5 +echo "configure:1363: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1389,7 +1394,7 @@ # 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:1393: checking for $ac_word" >&5 +echo "configure:1398: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1424,16 +1429,16 @@ LDFLAGS="$HOST_LDFLAGS" echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1428: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1433: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6 else @@ -1448,16 +1453,16 @@ CFLAGS="$HOST_CXXFLAGS" echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1452: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1457: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6 else @@ -1486,7 +1491,7 @@ # 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:1490: checking for $ac_word" >&5 +echo "configure:1495: 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 @@ -1520,7 +1525,7 @@ # 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:1524: checking for $ac_word" >&5 +echo "configure:1529: 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 @@ -1550,7 +1555,7 @@ # 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:1554: checking for $ac_word" >&5 +echo "configure:1559: 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 @@ -1601,7 +1606,7 @@ # 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:1605: checking for $ac_word" >&5 +echo "configure:1610: 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 @@ -1633,7 +1638,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1637: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1642: 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. @@ -1644,12 +1649,12 @@ cat > conftest.$ac_ext << EOF -#line 1648 "configure" +#line 1653 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1658: \"$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 @@ -1675,12 +1680,12 @@ { 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:1679: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1684: 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:1684: checking whether we are using GNU C" >&5 +echo "configure:1689: 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 @@ -1689,7 +1694,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1693: \"$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:1698: \"$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 @@ -1708,7 +1713,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1712: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1717: 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 @@ -1744,7 +1749,7 @@ # 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:1748: checking for $ac_word" >&5 +echo "configure:1753: 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 @@ -1780,7 +1785,7 @@ # 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:1784: checking for $ac_word" >&5 +echo "configure:1789: 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 @@ -1812,7 +1817,7 @@ echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1816: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1821: 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. @@ -1823,12 +1828,12 @@ cat > conftest.$ac_ext << EOF -#line 1827 "configure" +#line 1832 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1837: \"$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 @@ -1854,12 +1859,12 @@ { 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:1858: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1863: 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:1863: checking whether we are using GNU C++" >&5 +echo "configure:1868: 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 @@ -1868,7 +1873,7 @@ yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1872: \"$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:1877: \"$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 @@ -1887,7 +1892,7 @@ ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1891: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1896: 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 @@ -1918,57 +1923,6 @@ fi fi -for ac_declaration in \ - ''\ - '#include ' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat > conftest.$ac_ext < -$ac_declaration -int main() { -exit (42); -; return 0; } -EOF -if { (eval echo configure:1940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - continue -fi -rm -f conftest* - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - - case "$build:$target" in powerpc-apple-darwin8*:i?86-apple-darwin*) @@ -1982,7 +1936,7 @@ # 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:1986: checking for $ac_word" >&5 +echo "configure:1940: 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 @@ -2017,7 +1971,7 @@ # 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:2021: checking for $ac_word" >&5 +echo "configure:1975: 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 @@ -2052,7 +2006,7 @@ # 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:2056: checking for $ac_word" >&5 +echo "configure:2010: 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 @@ -2093,7 +2047,7 @@ # 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:2097: checking for $ac_word" >&5 +echo "configure:2051: 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 @@ -2128,7 +2082,7 @@ # 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:2132: checking for $ac_word" >&5 +echo "configure:2086: 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 @@ -2163,7 +2117,7 @@ # 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:2167: checking for $ac_word" >&5 +echo "configure:2121: 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 @@ -2201,7 +2155,7 @@ # 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:2205: checking for $ac_word" >&5 +echo "configure:2159: 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 @@ -2231,7 +2185,7 @@ # 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:2235: checking for $ac_word" >&5 +echo "configure:2189: 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 @@ -2282,7 +2236,7 @@ # 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:2286: checking for $ac_word" >&5 +echo "configure:2240: 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 @@ -2314,7 +2268,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2318: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2272: 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. @@ -2325,12 +2279,12 @@ cat > conftest.$ac_ext << EOF -#line 2329 "configure" +#line 2283 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2288: \"$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 @@ -2356,12 +2310,12 @@ { 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:2360: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2314: 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:2365: checking whether we are using GNU C" >&5 +echo "configure:2319: 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 @@ -2370,7 +2324,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2374: \"$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:2328: \"$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 @@ -2389,7 +2343,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2393: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2347: 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 @@ -2425,7 +2379,7 @@ # 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:2429: checking for $ac_word" >&5 +echo "configure:2383: 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 @@ -2457,7 +2411,7 @@ echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2461: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2415: 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. @@ -2468,12 +2422,12 @@ cat > conftest.$ac_ext << EOF -#line 2472 "configure" +#line 2426 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2431: \"$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 @@ -2499,12 +2453,12 @@ { 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:2503: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2457: 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:2508: checking whether we are using GNU C++" >&5 +echo "configure:2462: 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 @@ -2513,7 +2467,7 @@ yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2517: \"$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:2471: \"$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 @@ -2532,7 +2486,7 @@ ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:2536: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2490: 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 @@ -2563,61 +2517,10 @@ fi fi -for ac_declaration in \ - ''\ - '#include ' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat > conftest.$ac_ext < -$ac_declaration -int main() { -exit (42); -; return 0; } -EOF -if { (eval echo configure:2585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - continue -fi -rm -f conftest* - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - - # 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:2621: checking for $ac_word" >&5 +echo "configure:2524: 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 @@ -2649,7 +2552,7 @@ # 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:2653: checking for $ac_word" >&5 +echo "configure:2556: 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 @@ -2690,7 +2593,7 @@ # 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:2694: checking for $ac_word" >&5 +echo "configure:2597: 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 @@ -2725,7 +2628,7 @@ # 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:2729: checking for $ac_word" >&5 +echo "configure:2632: 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 @@ -2760,7 +2663,7 @@ # 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:2764: checking for $ac_word" >&5 +echo "configure:2667: 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 @@ -2795,7 +2698,7 @@ # 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:2799: checking for $ac_word" >&5 +echo "configure:2702: 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 @@ -2928,7 +2831,7 @@ # 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:2932: checking for $ac_word" >&5 +echo "configure:2835: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MIDL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2970,14 +2873,14 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -2995,14 +2898,14 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < int main() { unsigned *test = new unsigned(42); ; return 0; } EOF -if { (eval echo configure:3006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -3118,7 +3021,7 @@ _MIDL_REV_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $3 }'` # Add flags if necessary echo $ac_n "checking for midl flags""... $ac_c" 1>&6 -echo "configure:3122: checking for midl flags" >&5 +echo "configure:3025: checking for midl flags" >&5 if test \( "$_MIDL_MAJOR_VERSION" -gt "6" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" -gt "0" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" = "00" -a "$_MIDL_REV_VERSION" -gt "359" \); then # Starting with MIDL version 6.0.359, the MIDL compiler # generates /Oicf /robust stubs by default, which is not @@ -3140,9 +3043,9 @@ _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 -echo "configure:3144: checking for w32api version >= $W32API_VERSION" >&5 +echo "configure:3047: checking for w32api version >= $W32API_VERSION" >&5 cat > conftest.$ac_ext < int main() { @@ -3154,7 +3057,7 @@ ; return 0; } EOF -if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* res=yes else @@ -3170,7 +3073,7 @@ fi # Check windres version echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6 -echo "configure:3174: checking for windres version >= $WINDRES_VERSION" >&5 +echo "configure:3077: checking for windres version >= $WINDRES_VERSION" >&5 _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'` echo "$ac_t""$_WINDRES_VERSION" 1>&6 _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'` @@ -3209,10 +3112,10 @@ if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; then if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:3213: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:3116: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:3216: checking whether cc understands -c and -o together" >&5 +echo "configure:3119: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" @@ -3224,16 +3127,16 @@ # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:3228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:3229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:3132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:3137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:3236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:3237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:3139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:3140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -3269,7 +3172,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3273: checking how to run the C preprocessor" >&5 +echo "configure:3176: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3284,13 +3187,13 @@ # 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:3294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3197: \"$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 : @@ -3301,13 +3204,13 @@ 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:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3214: \"$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 : @@ -3318,13 +3221,13 @@ 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:3328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3231: \"$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 : @@ -3349,7 +3252,7 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:3353: checking how to run the C++ preprocessor" >&5 +echo "configure:3256: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3362,12 +3265,12 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3274: \"$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 : @@ -3422,7 +3325,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3426: checking for a BSD compatible install" >&5 +echo "configure:3329: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3475,7 +3378,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3479: checking whether ln -s works" >&5 +echo "configure:3382: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3500,7 +3403,7 @@ # 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:3504: checking for $ac_word" >&5 +echo "configure:3407: 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 @@ -3541,7 +3444,7 @@ if test -z "$TINDERBOX_SKIP_PERL_VERSION_CHECK"; then echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6 -echo "configure:3545: checking for minimum required perl version >= $PERL_VERSION" >&5 +echo "configure:3448: checking for minimum required perl version >= $PERL_VERSION" >&5 _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5` _perl_res=$? echo "$ac_t""$_perl_version" 1>&6 @@ -3552,7 +3455,7 @@ fi echo $ac_n "checking for full perl installation""... $ac_c" 1>&6 -echo "configure:3556: checking for full perl installation" >&5 +echo "configure:3459: checking for full perl installation" >&5 _perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5` _perl_res=$? if test "$_perl_res" != 0; then @@ -3567,7 +3470,7 @@ # 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:3571: checking for $ac_word" >&5 +echo "configure:3474: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3612,7 +3515,7 @@ # 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:3616: checking for $ac_word" >&5 +echo "configure:3519: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NSINSTALL_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3657,7 +3560,7 @@ # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3661: checking for $ac_word" >&5 +echo "configure:3564: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3693,7 +3596,7 @@ # Extract the first word of "whoami", so it can be a program name with args. set dummy whoami; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3697: checking for $ac_word" >&5 +echo "configure:3600: 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 @@ -3729,7 +3632,7 @@ # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3733: checking for $ac_word" >&5 +echo "configure:3636: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3765,7 +3668,7 @@ # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3769: checking for $ac_word" >&5 +echo "configure:3672: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3803,7 +3706,7 @@ # 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:3807: checking for $ac_word" >&5 +echo "configure:3710: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3844,7 +3747,7 @@ # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3848: checking for $ac_word" >&5 +echo "configure:3751: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SYSTEM_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3879,7 +3782,7 @@ # Extract the first word of "xargs", so it can be a program name with args. set dummy xargs; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3883: checking for $ac_word" >&5 +echo "configure:3786: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3940,7 +3843,7 @@ # 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:3944: checking for $ac_word" >&5 +echo "configure:3847: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PBBUILD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3990,7 +3893,7 @@ # Extract the first word of "sdp", so it can be a program name with args. set dummy sdp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3994: checking for $ac_word" >&5 +echo "configure:3897: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SDP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4111,7 +4014,7 @@ echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6 -echo "configure:4115: checking for valid compiler/Mac OS X SDK combination" >&5 +echo "configure:4018: checking for valid compiler/Mac OS X SDK combination" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -4120,7 +4023,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < int main() { return 0; } @@ -4128,7 +4031,7 @@ result=yes ; return 0; } EOF -if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result=no else @@ -4159,7 +4062,7 @@ # 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:4163: checking for $ac_word" >&5 +echo "configure:4066: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4202,7 +4105,7 @@ # 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:4206: checking for $ac_word" >&5 +echo "configure:4109: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4270,7 +4173,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4274: checking for X" >&5 +echo "configure:4177: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4332,12 +4235,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4244: \"$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* @@ -4406,14 +4309,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4519,17 +4422,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:4523: checking whether -R must be followed by a space" >&5 +echo "configure:4426: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -4545,14 +4448,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -4584,7 +4487,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4588: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4491: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4592,7 +4495,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4510: \"$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 @@ -4625,7 +4528,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:4629: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4532: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4633,7 +4536,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4551: \"$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 @@ -4673,12 +4576,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4677: checking for gethostbyname" >&5 +echo "configure:4580: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+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:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4722,7 +4625,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4726: checking for gethostbyname in -lnsl" >&5 +echo "configure:4629: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4730,7 +4633,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4648: \"$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 @@ -4771,12 +4674,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4775: checking for connect" >&5 +echo "configure:4678: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+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:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4820,7 +4723,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4824: checking for connect in -lsocket" >&5 +echo "configure:4727: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4828,7 +4731,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4746: \"$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 @@ -4863,12 +4766,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:4867: checking for remove" >&5 +echo "configure:4770: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+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:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -4912,7 +4815,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:4916: checking for remove in -lposix" >&5 +echo "configure:4819: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4920,7 +4823,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4838: \"$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 @@ -4955,12 +4858,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:4959: checking for shmat" >&5 +echo "configure:4862: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+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:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -5004,7 +4907,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5008: checking for shmat in -lipc" >&5 +echo "configure:4911: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5012,7 +4915,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4930: \"$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 @@ -5056,7 +4959,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:5060: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:4963: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5064,7 +4967,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4982: \"$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 @@ -5164,6 +5067,7 @@ case "${target_os}" in linux*) OS_ARCH=Linux OS_TARGET=Linux ;; kfreebsd*-gnu) OS_ARCH=GNU_kFreeBSD OS_TARGET=GNU_kFreeBSD ;; + gnu*) OS_ARCH=GNU ;; solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; mingw*) OS_ARCH=WINNT ;; wince*) OS_ARCH=WINCE ;; @@ -5471,6 +5375,7 @@ WARNINGS_AS_ERRORS='-Werror' DSO_CFLAGS='' DSO_PIC_CFLAGS='-fPIC' + ASFLAGS="$ASFLAGS -fPIC" _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti _MOZ_EXCEPTIONS_FLAGS_ON='-fhandle-exceptions' @@ -5543,7 +5448,7 @@ if test "$COMPILE_ENVIRONMENT"; then if test "$GNU_CC"; then echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6 -echo "configure:5547: checking whether ld has archive extraction flags" >&5 +echo "configure:5452: checking whether ld has archive extraction flags" >&5 if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5560,14 +5465,14 @@ LDFLAGS=$force LIBS=$unforce cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_mkshlib_force_and_unforce=$line; break else @@ -5600,7 +5505,7 @@ ' echo $ac_n "checking that static assertion macros used in autoconf tests work""... $ac_c" 1>&6 -echo "configure:5604: checking that static assertion macros used in autoconf tests work" >&5 +echo "configure:5509: checking that static assertion macros used in autoconf tests work" >&5 if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5614,14 +5519,14 @@ ac_cv_static_assertion_macros_work="yes" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -5631,14 +5536,14 @@ fi rm -f conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_static_assertion_macros_work="no" else @@ -5654,14 +5559,14 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -5671,14 +5576,14 @@ fi rm -f conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_static_assertion_macros_work="no" else @@ -5713,16 +5618,16 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6 -echo "configure:5717: checking for 64-bit OS" >&5 +echo "configure:5622: checking for 64-bit OS" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result="yes" else @@ -5814,7 +5719,7 @@ LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc' ;; -*-linux*|*-kfreebsd*-gnu) +*-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" @@ -5895,9 +5800,9 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for VisualAge C++ compiler version >= 6.0.0.3""... $ac_c" 1>&6 -echo "configure:5899: checking for VisualAge C++ compiler version >= 6.0.0.3" >&5 +echo "configure:5804: checking for VisualAge C++ compiler version >= 6.0.0.3" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _BAD_COMPILER= else @@ -5944,17 +5849,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5948: checking for $ac_hdr" >&5 +echo "configure:5853: checking for $ac_hdr" >&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:5958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5863: \"$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* @@ -5996,7 +5901,7 @@ LIBS="$LIBS -lbe" if test "$COMPILE_ENVIRONMENT"; then echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6 -echo "configure:6000: checking for main in -lbind" >&5 +echo "configure:5905: checking for main in -lbind" >&5 ac_lib_var=`echo bind'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6004,14 +5909,14 @@ 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:5920: \"$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 @@ -6032,7 +5937,7 @@ fi echo $ac_n "checking for main in -lzeta""... $ac_c" 1>&6 -echo "configure:6036: checking for main in -lzeta" >&5 +echo "configure:5941: checking for main in -lzeta" >&5 ac_lib_var=`echo zeta'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6040,14 +5945,14 @@ ac_save_LIBS="$LIBS" LIBS="-lzeta $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5956: \"$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 @@ -6116,18 +6021,18 @@ MACOSX=1 echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 -echo "configure:6120: checking for -dead_strip option to ld" >&5 +echo "configure:6025: checking for -dead_strip option to ld" >&5 _SAVE_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-dead_strip" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* _HAVE_DEAD_STRIP=1 else @@ -6280,8 +6185,7 @@ MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1 ;; mips*) - CFLAGS="$CFLAGS -Wa,-xgot" - CXXFLAGS="$CXXFLAGS -Wa,-xgot" + MOZ_DEBUG_FLAGS="-g" # We want inlining ;; esac ;; @@ -6652,17 +6556,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6656: checking for $ac_hdr" >&5 +echo "configure:6560: checking for $ac_hdr" >&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:6666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6570: \"$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* @@ -6701,17 +6605,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6705: checking for $ac_hdr" >&5 +echo "configure:6609: checking for $ac_hdr" >&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:6715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6619: \"$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* @@ -6957,19 +6861,19 @@ _DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__" echo $ac_n "checking for __declspec(dllexport)""... $ac_c" 1>&6 -echo "configure:6961: checking for __declspec(dllexport)" >&5 +echo "configure:6865: checking for __declspec(dllexport)" >&5 if eval "test \"`echo '$''{'ac_os2_declspec'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_os2_declspec="yes" else @@ -7155,14 +7059,14 @@ _SAVE_LDFLAGS=$LDFLAGS LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 @@ -7191,7 +7095,7 @@ CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'` CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'` echo $ac_n "checking for Forte compiler version >= WS6U2""... $ac_c" 1>&6 -echo "configure:7195: checking for Forte compiler version >= WS6U2" >&5 +echo "configure:7099: checking for Forte compiler version >= WS6U2" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -7201,7 +7105,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _BAD_COMPILER= else @@ -7320,7 +7224,7 @@ esac case "$target" in - *-linux*|*-kfreebsd*-gnu) + *-linux*|*-kfreebsd*-gnu|*-gnu*) MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' ;; *-solaris*) @@ -7361,12 +7265,12 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7365: checking for ANSI C header files" >&5 +echo "configure:7269: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7374,7 +7278,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7282: \"$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* @@ -7391,7 +7295,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -7409,7 +7313,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -7430,7 +7334,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -7441,7 +7345,7 @@ exit (0); } EOF -if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7465,12 +7369,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:7469: checking for working const" >&5 +echo "configure:7373: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -7540,12 +7444,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:7544: checking for mode_t" >&5 +echo "configure:7448: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7573,12 +7477,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:7577: checking for off_t" >&5 +echo "configure:7481: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7606,12 +7510,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:7610: checking for pid_t" >&5 +echo "configure:7514: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7639,12 +7543,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:7643: checking for size_t" >&5 +echo "configure:7547: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7672,12 +7576,12 @@ fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:7676: checking for st_blksize in struct stat" >&5 +echo "configure:7580: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7685,7 +7589,7 @@ struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:7689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -7706,12 +7610,12 @@ fi echo $ac_n "checking for siginfo_t""... $ac_c" 1>&6 -echo "configure:7710: checking for siginfo_t" >&5 +echo "configure:7614: checking for siginfo_t" >&5 if eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -7719,7 +7623,7 @@ siginfo_t* info; ; return 0; } EOF -if { (eval echo configure:7723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_siginfo_t=true else @@ -7753,12 +7657,12 @@ fi echo $ac_n "checking for int16_t""... $ac_c" 1>&6 -echo "configure:7757: checking for int16_t" >&5 +echo "configure:7661: checking for int16_t" >&5 if eval "test \"`echo '$''{'ac_cv_int16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7766,7 +7670,7 @@ int16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int16_t=true else @@ -7788,12 +7692,12 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int32_t""... $ac_c" 1>&6 -echo "configure:7792: checking for int32_t" >&5 +echo "configure:7696: checking for int32_t" >&5 if eval "test \"`echo '$''{'ac_cv_int32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7801,7 +7705,7 @@ int32_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int32_t=true else @@ -7823,12 +7727,12 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64_t""... $ac_c" 1>&6 -echo "configure:7827: checking for int64_t" >&5 +echo "configure:7731: checking for int64_t" >&5 if eval "test \"`echo '$''{'ac_cv_int64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7836,7 +7740,7 @@ int64_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64_t=true else @@ -7858,12 +7762,12 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64""... $ac_c" 1>&6 -echo "configure:7862: checking for int64" >&5 +echo "configure:7766: checking for int64" >&5 if eval "test \"`echo '$''{'ac_cv_int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7871,7 +7775,7 @@ int64 foo = 0; ; return 0; } EOF -if { (eval echo configure:7875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64=true else @@ -7893,12 +7797,12 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint""... $ac_c" 1>&6 -echo "configure:7897: checking for uint" >&5 +echo "configure:7801: checking for uint" >&5 if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7906,7 +7810,7 @@ uint foo = 0; ; return 0; } EOF -if { (eval echo configure:7910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint=true else @@ -7928,12 +7832,12 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint_t""... $ac_c" 1>&6 -echo "configure:7932: checking for uint_t" >&5 +echo "configure:7836: checking for uint_t" >&5 if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7941,7 +7845,7 @@ uint_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint_t=true else @@ -7963,12 +7867,12 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 -echo "configure:7967: checking for uint16_t" >&5 +echo "configure:7871: checking for uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7976,7 +7880,7 @@ uint16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint16_t=true else @@ -8007,12 +7911,12 @@ echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6 -echo "configure:8011: checking for uname.domainname" >&5 +echo "configure:7915: checking for uname.domainname" >&5 if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -8020,7 +7924,7 @@ (void)uname(res); if (res != 0) { domain = res->domainname; } ; return 0; } EOF -if { (eval echo configure:8024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_domainname_field=true else @@ -8044,12 +7948,12 @@ fi echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6 -echo "configure:8048: checking for uname.__domainname" >&5 +echo "configure:7952: checking for uname.__domainname" >&5 if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -8057,7 +7961,7 @@ (void)uname(res); if (res != 0) { domain = res->__domainname; } ; return 0; } EOF -if { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_us_domainname_field=true else @@ -8090,12 +7994,12 @@ echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6 -echo "configure:8094: checking for usable wchar_t (2 bytes, unsigned)" >&5 +echo "configure:7998: checking for usable wchar_t (2 bytes, unsigned)" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_v2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < $configure_static_assert_macros @@ -8104,7 +8008,7 @@ CONFIGURE_STATIC_ASSERT((wchar_t)-1 > (wchar_t) 0) ; return 0; } EOF -if { (eval echo configure:8108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_usable_wchar_v2="yes" else @@ -8123,7 +8027,7 @@ EOF HAVE_CPP_2BYTE_WCHAR_T=1 -else +elif false; then ac_ext=C @@ -8137,12 +8041,12 @@ CXXFLAGS="$CXXFLAGS -fshort-wchar" echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6 -echo "configure:8141: checking for compiler -fshort-wchar option" >&5 +echo "configure:8045: checking for compiler -fshort-wchar option" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_option_v2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < $configure_static_assert_macros @@ -8151,7 +8055,7 @@ CONFIGURE_STATIC_ASSERT((wchar_t)-1 > (wchar_t) 0) ; return 0; } EOF -if { (eval echo configure:8155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_have_usable_wchar_option_v2="yes" else @@ -8171,6 +8075,7 @@ EOF HAVE_CPP_2BYTE_WCHAR_T=1 + WCHAR_CFLAGS="-fshort-wchar" else CXXFLAGS=$_SAVE_CXXFLAGS fi @@ -8185,7 +8090,7 @@ if test "$GNU_CC"; then echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6 -echo "configure:8189: checking for visibility(hidden) attribute" >&5 +echo "configure:8094: 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 @@ -8210,7 +8115,7 @@ echo $ac_n "checking for visibility(default) attribute""... $ac_c" 1>&6 -echo "configure:8214: checking for visibility(default) attribute" >&5 +echo "configure:8119: checking for visibility(default) attribute" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_default'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8235,7 +8140,7 @@ echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6 -echo "configure:8239: checking for visibility pragma support" >&5 +echo "configure:8144: 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 @@ -8260,7 +8165,7 @@ echo "$ac_t""$ac_cv_visibility_pragma" 1>&6 if test "$ac_cv_visibility_pragma" = "yes"; then echo $ac_n "checking For gcc visibility bug with class-level attributes (GCC bug 26905)""... $ac_c" 1>&6 -echo "configure:8264: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5 +echo "configure:8169: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5 if eval "test \"`echo '$''{'ac_cv_have_visibility_class_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8288,7 +8193,7 @@ echo "$ac_t""$ac_cv_have_visibility_class_bug" 1>&6 echo $ac_n "checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)""... $ac_c" 1>&6 -echo "configure:8292: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5 +echo "configure:8197: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5 if eval "test \"`echo '$''{'ac_cv_have_visibility_builtin_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8336,12 +8241,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:8340: checking for $ac_hdr that defines DIR" >&5 +echo "configure:8245: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -8349,7 +8254,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:8353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -8374,7 +8279,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:8378: checking for opendir in -ldir" >&5 +echo "configure:8283: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8382,7 +8287,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8302: \"$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 @@ -8415,7 +8320,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8419: checking for opendir in -lx" >&5 +echo "configure:8324: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8423,7 +8328,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8343: \"$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 @@ -8466,17 +8371,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8470: checking for $ac_hdr" >&5 +echo "configure:8375: checking for $ac_hdr" >&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:8480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8385: \"$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* @@ -8506,17 +8411,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8510: checking for $ac_hdr" >&5 +echo "configure:8415: checking for $ac_hdr" >&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:8520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8425: \"$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* @@ -8546,17 +8451,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8550: checking for $ac_hdr" >&5 +echo "configure:8455: checking for $ac_hdr" >&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:8560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8465: \"$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* @@ -8586,17 +8491,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8590: checking for $ac_hdr" >&5 +echo "configure:8495: checking for $ac_hdr" >&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:8600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8505: \"$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* @@ -8626,17 +8531,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8630: checking for $ac_hdr" >&5 +echo "configure:8535: checking for $ac_hdr" >&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:8640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8545: \"$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* @@ -8667,17 +8572,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8671: checking for $ac_hdr" >&5 +echo "configure:8576: checking for $ac_hdr" >&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:8681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8586: \"$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* @@ -8708,17 +8613,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8712: checking for $ac_hdr" >&5 +echo "configure:8617: checking for $ac_hdr" >&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:8722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8627: \"$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* @@ -8755,17 +8660,17 @@ NEW_H=new.h ac_safe=`echo "new" | sed 'y%./+-%__p_%'` echo $ac_n "checking for new""... $ac_c" 1>&6 -echo "configure:8759: checking for new" >&5 +echo "configure:8664: checking for new" >&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:8769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8674: \"$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* @@ -8807,17 +8712,17 @@ if test "x$enable_dtrace" = "xyes"; then ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 -echo "configure:8811: checking for sys/sdt.h" >&5 +echo "configure:8716: checking for sys/sdt.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:8821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8726: \"$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* @@ -8857,17 +8762,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8861: checking for $ac_hdr" >&5 +echo "configure:8766: checking for $ac_hdr" >&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:8871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8776: \"$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* @@ -8901,7 +8806,7 @@ ;; *) echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 -echo "configure:8905: checking for gethostbyname_r in -lc_r" >&5 +echo "configure:8810: checking for gethostbyname_r in -lc_r" >&5 ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8909,7 +8814,7 @@ ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8829: \"$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 @@ -8957,7 +8862,7 @@ ;; *) echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6 -echo "configure:8961: checking for atan in -lm" >&5 +echo "configure:8866: checking for atan in -lm" >&5 ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8965,7 +8870,7 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8885: \"$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 @@ -9004,7 +8909,7 @@ fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:9008: checking for dlopen in -ldl" >&5 +echo "configure:8913: 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 @@ -9012,7 +8917,7 @@ 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:8932: \"$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 @@ -9040,17 +8945,17 @@ 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:9044: checking for dlfcn.h" >&5 +echo "configure:8949: 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:9054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8959: \"$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* @@ -9087,12 +8992,12 @@ for ac_func in dladdr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9091: checking for $ac_func" >&5 +echo "configure:8996: 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:9024: \"$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 @@ -9146,7 +9051,7 @@ case $target in *-aix*) echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6 -echo "configure:9150: checking for demangle in -lC_r" >&5 +echo "configure:9055: checking for demangle in -lC_r" >&5 ac_lib_var=`echo C_r'_'demangle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9154,7 +9059,7 @@ ac_save_LIBS="$LIBS" LIBS="-lC_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9074: \"$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 @@ -9195,7 +9100,7 @@ ;; *) echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 -echo "configure:9199: checking for demangle in -lC" >&5 +echo "configure:9104: checking for demangle in -lC" >&5 ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9203,7 +9108,7 @@ ac_save_LIBS="$LIBS" LIBS="-lC $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9123: \"$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 @@ -9245,7 +9150,7 @@ esac fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:9249: checking for socket in -lsocket" >&5 +echo "configure:9154: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9253,7 +9158,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9173: \"$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 @@ -9309,7 +9214,7 @@ _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6 -echo "configure:9313: checking for XDrawLines in -lX11" >&5 +echo "configure:9218: checking for XDrawLines in -lX11" >&5 ac_lib_var=`echo X11'_'XDrawLines | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9317,7 +9222,7 @@ ac_save_LIBS="$LIBS" LIBS="-lX11 $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9237: \"$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 @@ -9350,7 +9255,7 @@ fi echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6 -echo "configure:9354: checking for XextAddDisplay in -lXext" >&5 +echo "configure:9259: checking for XextAddDisplay in -lXext" >&5 ac_lib_var=`echo Xext'_'XextAddDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9358,7 +9263,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXext $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9278: \"$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 @@ -9393,7 +9298,7 @@ echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 -echo "configure:9397: checking for XtFree in -lXt" >&5 +echo "configure:9302: checking for XtFree in -lXt" >&5 ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9401,7 +9306,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9321: \"$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 @@ -9433,7 +9338,7 @@ unset ac_cv_lib_Xt_XtFree echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6 -echo "configure:9437: checking for IceFlush in -lICE" >&5 +echo "configure:9342: checking for IceFlush in -lICE" >&5 ac_lib_var=`echo ICE'_'IceFlush | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9441,7 +9346,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $XT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9361: \"$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 @@ -9473,7 +9378,7 @@ fi echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6 -echo "configure:9477: checking for SmcCloseConnection in -lSM" >&5 +echo "configure:9382: checking for SmcCloseConnection in -lSM" >&5 ac_lib_var=`echo SM'_'SmcCloseConnection | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9481,7 +9386,7 @@ ac_save_LIBS="$LIBS" LIBS="-lSM $XT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9401: \"$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 @@ -9513,7 +9418,7 @@ fi echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 -echo "configure:9517: checking for XtFree in -lXt" >&5 +echo "configure:9422: checking for XtFree in -lXt" >&5 ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9521,7 +9426,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $XT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9441: \"$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 @@ -9566,7 +9471,7 @@ esac echo $ac_n "checking for XShmCreateImage in -lXext""... $ac_c" 1>&6 -echo "configure:9570: checking for XShmCreateImage in -lXext" >&5 +echo "configure:9475: checking for XShmCreateImage in -lXext" >&5 ac_lib_var=`echo Xext'_'XShmCreateImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9574,7 +9479,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXext $XLIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9494: \"$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 @@ -9607,17 +9512,17 @@ ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6 -echo "configure:9611: checking for X11/extensions/XShm.h" >&5 +echo "configure:9516: checking for X11/extensions/XShm.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:9621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9526: \"$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* @@ -9647,7 +9552,7 @@ fi echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6 -echo "configure:9651: checking for XieFloGeometry in -lXIE" >&5 +echo "configure:9556: checking for XieFloGeometry in -lXIE" >&5 ac_lib_var=`echo XIE'_'XieFloGeometry | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9655,7 +9560,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXIE $XLIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9575: \"$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 @@ -9688,17 +9593,17 @@ ac_safe=`echo "X11/extensions/XIElib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XIElib.h""... $ac_c" 1>&6 -echo "configure:9692: checking for X11/extensions/XIElib.h" >&5 +echo "configure:9597: checking for X11/extensions/XIElib.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:9702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9607: \"$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* @@ -9772,7 +9677,7 @@ # Extract the first word of "freetype-config", so it can be a program name with args. set dummy freetype-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9776: checking for $ac_word" >&5 +echo "configure:9681: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FT2_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9808,7 +9713,7 @@ min_ft_version=6.1.0 echo $ac_n "checking for FreeType - version >= $min_ft_version""... $ac_c" 1>&6 -echo "configure:9812: checking for FreeType - version >= $min_ft_version" >&5 +echo "configure:9717: checking for FreeType - version >= $min_ft_version" >&5 no_ft="" if test "$FT2_CONFIG" = "no" ; then no_ft=yes @@ -9856,7 +9761,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -9882,7 +9787,7 @@ } EOF -if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -9932,12 +9837,12 @@ CFLAGS="$CFLAGS $FT2_CFLAGS" echo $ac_n "checking for FT_Bitmap_Size.y_ppem""... $ac_c" 1>&6 -echo "configure:9936: checking for FT_Bitmap_Size.y_ppem" >&5 +echo "configure:9841: checking for FT_Bitmap_Size.y_ppem" >&5 if eval "test \"`echo '$''{'ac_cv_member_FT_Bitmap_Size_y_ppem'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include FT_FREETYPE_H @@ -9947,7 +9852,7 @@ return 1 ; return 0; } EOF -if { (eval echo configure:9951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_member_FT_Bitmap_Size_y_ppem=yes else @@ -9973,12 +9878,12 @@ for ac_func in FT_GlyphSlot_Embolden FT_Load_Sfnt_Table FT_Select_Size do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9977: checking for $ac_func" >&5 +echo "configure:9882: 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:9910: \"$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 @@ -10044,7 +9949,7 @@ *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:10048: checking for pthread_create in -lpthreads" >&5 +echo "configure:9953: checking for pthread_create in -lpthreads" >&5 echo " #include #include @@ -10067,7 +9972,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:10071: checking for pthread_create in -lpthread" >&5 +echo "configure:9976: checking for pthread_create in -lpthread" >&5 echo " #include #include @@ -10090,7 +9995,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:10094: checking for pthread_create in -lc_r" >&5 +echo "configure:9999: checking for pthread_create in -lc_r" >&5 echo " #include #include @@ -10113,7 +10018,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:10117: checking for pthread_create in -lc" >&5 +echo "configure:10022: checking for pthread_create in -lc" >&5 echo " #include #include @@ -10172,7 +10077,7 @@ rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:10176: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:10081: 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 @@ -10195,7 +10100,7 @@ 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:10199: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:10104: 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 @@ -10240,7 +10145,7 @@ fi ;; - *-*-linux*|*-*-kfreebsd*-gnu) + *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*) cat >> confdefs.h <<\EOF #define _REENTRANT 1 EOF @@ -10290,7 +10195,7 @@ fi echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6 -echo "configure:10294: checking whether mmap() sees write()s" >&5 +echo "configure:10199: checking whether mmap() sees write()s" >&5 mmap_test_prog=' @@ -10329,11 +10234,11 @@ result="yes" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -10358,13 +10263,13 @@ if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:10362: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:10267: 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 @@ -10382,7 +10287,7 @@ if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -10404,7 +10309,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:10408: checking for 8-bit clean memcmp" >&5 +echo "configure:10313: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10412,7 +10317,7 @@ ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -10442,12 +10347,12 @@ for ac_func in random strerror lchown fchmod snprintf statvfs memmove rint stat64 lstat64 truncate64 statvfs64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10446: checking for $ac_func" >&5 +echo "configure:10351: 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:10379: \"$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 @@ -10497,12 +10402,12 @@ for ac_func in flockfile getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10501: checking for $ac_func" >&5 +echo "configure:10406: 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:10434: \"$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 @@ -10554,12 +10459,12 @@ for ac_func in localtime_r strtok_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10558: checking for $ac_func" >&5 +echo "configure:10463: 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:10491: \"$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 @@ -10618,19 +10523,19 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6 -echo "configure:10622: checking for wcrtomb" >&5 +echo "configure:10527: checking for wcrtomb" >&5 if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { mbstate_t ps={0};wcrtomb(0,'f',&ps); ; return 0; } EOF -if { (eval echo configure:10634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_have_wcrtomb="yes" else @@ -10650,19 +10555,19 @@ fi echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6 -echo "configure:10654: checking for mbrtowc" >&5 +echo "configure:10559: checking for mbrtowc" >&5 if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { mbstate_t ps={0};mbrtowc(0,0,0,&ps); ; return 0; } EOF -if { (eval echo configure:10666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_have_mbrtowc="yes" else @@ -10691,12 +10596,12 @@ fi echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 -echo "configure:10695: checking for res_ninit()" >&5 +echo "configure:10600: checking for res_ninit()" >&5 if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+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:10617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_res_ninit=yes else @@ -10738,12 +10643,12 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6 -echo "configure:10742: checking for gnu_get_libc_version()" >&5 +echo "configure:10647: checking for gnu_get_libc_version()" >&5 if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+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:10663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_gnu_get_libc_version=yes else @@ -10783,7 +10688,7 @@ *) echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6 -echo "configure:10787: checking for iconv in -lc" >&5 +echo "configure:10692: checking for iconv in -lc" >&5 ac_lib_var=`echo c'_'iconv | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10791,7 +10696,7 @@ ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10714: \"$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 @@ -10824,7 +10729,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6 -echo "configure:10828: checking for iconv in -liconv" >&5 +echo "configure:10733: checking for iconv in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10832,7 +10737,7 @@ ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10755: \"$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 @@ -10865,7 +10770,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6 -echo "configure:10869: checking for libiconv in -liconv" >&5 +echo "configure:10774: checking for libiconv in -liconv" >&5 ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10873,7 +10778,7 @@ ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10796: \"$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 @@ -10914,12 +10819,12 @@ _SAVE_LIBS=$LIBS LIBS="$LIBS $_ICONV_LIBS" echo $ac_n "checking for iconv()""... $ac_c" 1>&6 -echo "configure:10918: checking for iconv()" >&5 +echo "configure:10823: checking for iconv()" >&5 if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10933,7 +10838,7 @@ ; return 0; } EOF -if { (eval echo configure:10937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_iconv=yes else @@ -10957,12 +10862,12 @@ LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS" LIBICONV="$_ICONV_LIBS" echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6 -echo "configure:10961: checking for iconv() with const input" >&5 +echo "configure:10866: checking for iconv() with const input" >&5 if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10977,7 +10882,7 @@ ; return 0; } EOF -if { (eval echo configure:10981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_const_iconv=yes else @@ -11006,19 +10911,19 @@ echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 -echo "configure:11010: checking for nl_langinfo and CODESET" >&5 +echo "configure:10915: checking for nl_langinfo and CODESET" >&5 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char* cs = nl_langinfo(CODESET); ; return 0; } EOF -if { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_langinfo_codeset=yes else @@ -11050,7 +10955,7 @@ echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 -echo "configure:11054: checking for an implementation of va_copy()" >&5 +echo "configure:10959: checking for an implementation of va_copy()" >&5 if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11060,7 +10965,7 @@ else cat > conftest.$ac_ext < @@ -11074,7 +10979,7 @@ } int main() { f (0, 42); return 0; } EOF -if { (eval echo configure:11078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_va_copy=yes else @@ -11091,7 +10996,7 @@ echo "$ac_t""$ac_cv_va_copy" 1>&6 echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6 -echo "configure:11095: checking for an implementation of __va_copy()" >&5 +echo "configure:11000: checking for an implementation of __va_copy()" >&5 if eval "test \"`echo '$''{'ac_cv___va_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11101,7 +11006,7 @@ else cat > conftest.$ac_ext < @@ -11115,7 +11020,7 @@ } int main() { f (0, 42); return 0; } EOF -if { (eval echo configure:11119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv___va_copy=yes else @@ -11132,7 +11037,7 @@ echo "$ac_t""$ac_cv___va_copy" 1>&6 echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6 -echo "configure:11136: checking whether va_lists can be copied by value" >&5 +echo "configure:11041: checking whether va_lists can be copied by value" >&5 if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11142,7 +11047,7 @@ else cat > conftest.$ac_ext < @@ -11156,7 +11061,7 @@ } int main() { f (0, 42); return 0; } EOF -if { (eval echo configure:11160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_va_val_copy=yes else @@ -11255,7 +11160,7 @@ if test "$GNU_CXX"; then echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6 -echo "configure:11259: checking for C++ exceptions flag" >&5 +echo "configure:11164: checking for C++ exceptions flag" >&5 if eval "test \"`echo '$''{'ac_cv_cxx_exceptions_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11290,12 +11195,12 @@ HAVE_GCC3_ABI= if test "$GNU_CC"; then echo $ac_n "checking for gcc 3.0 ABI""... $ac_c" 1>&6 -echo "configure:11294: checking for gcc 3.0 ABI" >&5 +echo "configure:11199: checking for gcc 3.0 ABI" >&5 if eval "test \"`echo '$''{'ac_cv_gcc_three_abi'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_gcc_three_abi="yes" else @@ -11332,12 +11237,12 @@ echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6 -echo "configure:11336: checking for C++ \"explicit\" keyword" >&5 +echo "configure:11241: checking for C++ \"explicit\" keyword" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_explicit=yes else @@ -11368,12 +11273,12 @@ fi echo $ac_n "checking for C++ \"typename\" keyword""... $ac_c" 1>&6 -echo "configure:11372: checking for C++ \"typename\" keyword" >&5 +echo "configure:11277: checking for C++ \"typename\" keyword" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_typename'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_typename=yes else @@ -11413,12 +11318,12 @@ fi echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6 -echo "configure:11417: checking for modern C++ template specialization syntax support" >&5 +echo "configure:11322: checking for modern C++ template specialization syntax support" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct X { int a; }; class Y {}; @@ -11428,7 +11333,7 @@ X y_x; ; return 0; } EOF -if { (eval echo configure:11432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_modern_specialize_template_syntax=yes else @@ -11450,12 +11355,12 @@ echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6 -echo "configure:11454: checking whether partial template specialization works" >&5 +echo "configure:11359: checking whether partial template specialization works" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Foo {}; template class Foo {}; @@ -11463,7 +11368,7 @@ return 0; ; return 0; } EOF -if { (eval echo configure:11467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_partial_specialization=yes else @@ -11484,12 +11389,12 @@ fi echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6 -echo "configure:11488: checking whether operators must be re-defined for templates derived from templates" >&5 +echo "configure:11393: checking whether operators must be re-defined for templates derived from templates" >&5 if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Base { }; template @@ -11501,7 +11406,7 @@ return 0; ; return 0; } EOF -if { (eval echo configure:11505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_derived_template_operators=no else @@ -11523,12 +11428,12 @@ echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6 -echo "configure:11527: checking whether we need to cast a derived template to pass as its base class" >&5 +echo "configure:11432: checking whether we need to cast a derived template to pass as its base class" >&5 if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Base { }; template class Derived : public Base { }; @@ -11537,7 +11442,7 @@ Derived bar; return foo(bar); ; return 0; } EOF -if { (eval echo configure:11541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_cpp_template_cast_to_base=no else @@ -11558,12 +11463,12 @@ fi echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6 -echo "configure:11562: checking whether the compiler can resolve const ambiguities for templates" >&5 +echo "configure:11467: checking whether the compiler can resolve const ambiguities for templates" >&5 if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class ptrClass { @@ -11584,7 +11489,7 @@ a(&i); ; return 0; } EOF -if { (eval echo configure:11588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_can_resolve_const_ambiguity=yes else @@ -11606,12 +11511,12 @@ echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6 -echo "configure:11610: checking whether the C++ \"using\" keyword can change access" >&5 +echo "configure:11515: checking whether the C++ \"using\" keyword can change access" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_access_changing_using2=no else @@ -11658,12 +11563,12 @@ fi echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 -echo "configure:11662: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 +echo "configure:11567: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_ambiguity_resolving_using=yes else @@ -11700,19 +11605,19 @@ fi echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6 -echo "configure:11704: checking for \"std::\" namespace" >&5 +echo "configure:11609: checking for \"std::\" namespace" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return std::min(0, 1); ; return 0; } EOF -if { (eval echo configure:11716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_namespace_std=yes else @@ -11733,12 +11638,12 @@ fi echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6 -echo "configure:11737: checking whether standard template operator!=() is ambiguous" >&5 +echo "configure:11642: checking whether standard template operator!=() is ambiguous" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct T1 {}; @@ -11748,7 +11653,7 @@ T1 a,b; return a != b; ; return 0; } EOF -if { (eval echo configure:11752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_unambiguous_std_notequal=unambiguous else @@ -11770,12 +11675,12 @@ echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6 -echo "configure:11774: checking for C++ reinterpret_cast" >&5 +echo "configure:11679: checking for C++ reinterpret_cast" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <(z); ; return 0; } EOF -if { (eval echo configure:11787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_reinterpret_cast=yes else @@ -11804,7 +11709,7 @@ fi echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 -echo "configure:11808: checking for C++ dynamic_cast to void*" >&5 +echo "configure:11713: checking for C++ dynamic_cast to void*" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11812,8 +11717,11 @@ ac_cv_cpp_dynamic_cast_void_ptr=no else cat > conftest.$ac_ext <(suby)))); } EOF -if { (eval echo configure:11832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_cpp_dynamic_cast_void_ptr=yes else @@ -11852,19 +11760,19 @@ echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6 -echo "configure:11856: checking whether C++ requires implementation of unused virtual methods" >&5 +echo "configure:11764: checking whether C++ requires implementation of unused virtual methods" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+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:11776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_cpp_unused_required=no else @@ -11887,12 +11795,12 @@ echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6 -echo "configure:11891: checking for trouble comparing to zero near std::operator!=()" >&5 +echo "configure:11799: checking for trouble comparing to zero near std::operator!=()" >&5 if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < template class Foo {}; @@ -11903,7 +11811,7 @@ Foo f; return (0 != f); ; return 0; } EOF -if { (eval echo configure:11907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_trouble_comparing_to_zero=no else @@ -11935,19 +11843,19 @@ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:11939: checking for LC_MESSAGES" >&5 +echo "configure:11847: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int category = LC_MESSAGES; ; return 0; } EOF -if { (eval echo configure:11951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_i18n_lc_messages=yes else @@ -12050,7 +11958,7 @@ # Extract the first word of "nspr-config", so it can be a program name with args. set dummy nspr-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12054: checking for $ac_word" >&5 +echo "configure:11962: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12085,7 +11993,7 @@ min_nspr_version=4.7.0 echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6 -echo "configure:12089: checking for NSPR - version >= $min_nspr_version" >&5 +echo "configure:11997: checking for NSPR - version >= $min_nspr_version" >&5 no_nspr="" if test "$NSPR_CONFIG" = "no"; then @@ -12136,7 +12044,7 @@ _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $NSPR_CFLAGS" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* MOZ_NATIVE_NSPR=1 else @@ -12227,7 +12135,7 @@ # Extract the first word of "nss-config", so it can be a program name with args. set dummy nss-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12231: checking for $ac_word" >&5 +echo "configure:12139: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NSS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12262,7 +12170,7 @@ min_nss_version=3.12.0 echo $ac_n "checking for NSS - version >= $min_nss_version""... $ac_c" 1>&6 -echo "configure:12266: checking for NSS - version >= $min_nss_version" >&5 +echo "configure:12174: checking for NSS - version >= $min_nss_version" >&5 no_nss="" if test "$NSS_CONFIG" = "no"; then @@ -12310,7 +12218,7 @@ fi if test -n "$MOZ_NATIVE_NSS"; then - NSS_LIBS="$NSS_LIBS -lcrmf" + NSS_LIBS=`echo $NSS_LIBS | sed 's/-l/-lcrmf &/'` else NSS_CFLAGS='-I$(LIBXUL_DIST)/include/nss' NSS_DEP_LIBS="\ @@ -12353,7 +12261,7 @@ SYSTEM_JPEG= else echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 -echo "configure:12357: checking for jpeg_destroy_compress in -ljpeg" >&5 +echo "configure:12265: checking for jpeg_destroy_compress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12361,7 +12269,7 @@ ac_save_LIBS="$LIBS" LIBS="-ljpeg $JPEG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12284: \"$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 @@ -12395,10 +12303,10 @@ fi -if test "$SYSTEM_JPEG" = 1; then +if test "$SYSTEM_JPEG" = 0; then LIBS="$JPEG_LIBS $LIBS" cat > conftest.$ac_ext < #include @@ -12409,7 +12317,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:12413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* SYSTEM_JPEG=1 else @@ -12447,7 +12355,7 @@ SYSTEM_ZLIB= else echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 -echo "configure:12451: checking for gzread in -lz" >&5 +echo "configure:12359: checking for gzread in -lz" >&5 ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12455,7 +12363,7 @@ ac_save_LIBS="$LIBS" LIBS="-lz $ZLIB_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12378: \"$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 @@ -12488,10 +12396,10 @@ fi fi -if test "$SYSTEM_ZLIB" = 1; then +if test "$SYSTEM_ZLIB" = 0; then LIBS="$ZLIB_LIBS $LIBS" cat > conftest.$ac_ext < #include @@ -12502,7 +12410,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:12506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* SYSTEM_ZLIB=1 else @@ -12540,7 +12448,7 @@ SYSTEM_BZ2= else echo $ac_n "checking for BZ2_bzread in -lbz2""... $ac_c" 1>&6 -echo "configure:12544: checking for BZ2_bzread in -lbz2" >&5 +echo "configure:12452: checking for BZ2_bzread in -lbz2" >&5 ac_lib_var=`echo bz2'_'BZ2_bzread | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12548,7 +12456,7 @@ ac_save_LIBS="$LIBS" LIBS="-lbz2 $BZ2_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12471: \"$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 @@ -12606,12 +12514,13 @@ CFLAGS="-I${PNG_DIR}/include $CFLAGS" LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" fi +APNG=1 if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then SYSTEM_PNG= else _SAVE_PNG_LIBS=$PNG_LIBS echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 -echo "configure:12615: checking for png_get_valid in -lpng" >&5 +echo "configure:12524: checking for png_get_valid in -lpng" >&5 ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12619,7 +12528,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpng $PNG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12543: \"$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 @@ -12652,7 +12561,7 @@ fi echo $ac_n "checking for png_get_acTL in -lpng""... $ac_c" 1>&6 -echo "configure:12656: checking for png_get_acTL in -lpng" >&5 +echo "configure:12565: checking for png_get_acTL in -lpng" >&5 ac_lib_var=`echo png'_'png_get_acTL | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12660,7 +12569,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpng $_SAVE_PNG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12584: \"$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 @@ -12696,14 +12605,15 @@ else echo "$ac_t""no" 1>&6 -{ echo "configure: error: --with-system-png won't work because the system's libpng doesn't have APNG support" 1>&2; exit 1; } +echo "configure: warning: system's libpng doesn't have APNG support" 1>&2 + APNG= fi fi -if test "$SYSTEM_PNG" = 1; then +if test "$SYSTEM_PNG" = 0; then LIBS="$PNG_LIBS $LIBS" cat > conftest.$ac_ext < #include @@ -12717,7 +12627,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:12721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* SYSTEM_PNG=1 else @@ -12759,7 +12669,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12763: checking for $ac_word" >&5 +echo "configure:12673: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12803,19 +12713,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for hunspell""... $ac_c" 1>&6 -echo "configure:12807: checking for hunspell" >&5 +echo "configure:12717: checking for hunspell" >&5 if $PKG_CONFIG --exists "hunspell" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_HUNSPELL_CFLAGS""... $ac_c" 1>&6 -echo "configure:12814: checking MOZ_HUNSPELL_CFLAGS" >&5 +echo "configure:12724: checking MOZ_HUNSPELL_CFLAGS" >&5 MOZ_HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"` echo "$ac_t""$MOZ_HUNSPELL_CFLAGS" 1>&6 echo $ac_n "checking MOZ_HUNSPELL_LIBS""... $ac_c" 1>&6 -echo "configure:12819: checking MOZ_HUNSPELL_LIBS" >&5 +echo "configure:12729: checking MOZ_HUNSPELL_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_HUNSPELL_LIBS="`$PKG_CONFIG --libs \"hunspell\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_HUNSPELL_LIBS" 1>&6 @@ -13183,7 +13093,7 @@ # Allow the application to influence configure with a confvars.sh script. echo $ac_n "checking if app-specific confvars.sh exists""... $ac_c" 1>&6 -echo "configure:13187: checking if app-specific confvars.sh exists" >&5 +echo "configure:13097: checking if app-specific confvars.sh exists" >&5 if test -f "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" ; then echo "$ac_t""${srcdir}/${MOZ_BUILD_APP}/confvars.sh" 1>&6 . "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" @@ -13426,7 +13336,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13430: checking for $ac_word" >&5 +echo "configure:13340: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13470,19 +13380,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0""... $ac_c" 1>&6 -echo "configure:13474: checking for gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0" >&5 +echo "configure:13384: checking for gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0" >&5 if $PKG_CONFIG --exists "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6 -echo "configure:13481: checking MOZ_GTK2_CFLAGS" >&5 +echo "configure:13391: checking MOZ_GTK2_CFLAGS" >&5 MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0"` echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6 -echo "configure:13486: checking MOZ_GTK2_LIBS" >&5 +echo "configure:13396: checking MOZ_GTK2_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GTK2_LIBS="`$PKG_CONFIG --libs \"gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 gdk-x11-2.0 glib-2.0 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GTK2_LIBS" 1>&6 @@ -13541,7 +13451,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13545: checking for $ac_word" >&5 +echo "configure:13455: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13585,19 +13495,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION""... $ac_c" 1>&6 -echo "configure:13589: checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" >&5 +echo "configure:13499: checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" >&5 if $PKG_CONFIG --exists "libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_STARTUP_NOTIFICATION_CFLAGS""... $ac_c" 1>&6 -echo "configure:13596: checking MOZ_STARTUP_NOTIFICATION_CFLAGS" >&5 +echo "configure:13506: checking MOZ_STARTUP_NOTIFICATION_CFLAGS" >&5 MOZ_STARTUP_NOTIFICATION_CFLAGS=`$PKG_CONFIG --cflags "libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"` echo "$ac_t""$MOZ_STARTUP_NOTIFICATION_CFLAGS" 1>&6 echo $ac_n "checking MOZ_STARTUP_NOTIFICATION_LIBS""... $ac_c" 1>&6 -echo "configure:13601: checking MOZ_STARTUP_NOTIFICATION_LIBS" >&5 +echo "configure:13511: checking MOZ_STARTUP_NOTIFICATION_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_STARTUP_NOTIFICATION_LIBS="`$PKG_CONFIG --libs \"libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_STARTUP_NOTIFICATION_LIBS" 1>&6 @@ -13809,7 +13719,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13813: checking for $ac_word" >&5 +echo "configure:13723: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13853,19 +13763,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for xft""... $ac_c" 1>&6 -echo "configure:13857: checking for xft" >&5 +echo "configure:13767: checking for xft" >&5 if $PKG_CONFIG --exists "xft" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_XFT_CFLAGS""... $ac_c" 1>&6 -echo "configure:13864: checking MOZ_XFT_CFLAGS" >&5 +echo "configure:13774: checking MOZ_XFT_CFLAGS" >&5 MOZ_XFT_CFLAGS=`$PKG_CONFIG --cflags "xft"` echo "$ac_t""$MOZ_XFT_CFLAGS" 1>&6 echo $ac_n "checking MOZ_XFT_LIBS""... $ac_c" 1>&6 -echo "configure:13869: checking MOZ_XFT_LIBS" >&5 +echo "configure:13779: checking MOZ_XFT_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_XFT_LIBS="`$PKG_CONFIG --libs \"xft\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_XFT_LIBS" 1>&6 @@ -13903,7 +13813,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13907: checking for $ac_word" >&5 +echo "configure:13817: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13947,19 +13857,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= $PANGO_VERSION""... $ac_c" 1>&6 -echo "configure:13951: checking for pango >= $PANGO_VERSION" >&5 +echo "configure:13861: checking for pango >= $PANGO_VERSION" >&5 if $PKG_CONFIG --exists "pango >= $PANGO_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking _PANGOCHK_CFLAGS""... $ac_c" 1>&6 -echo "configure:13958: checking _PANGOCHK_CFLAGS" >&5 +echo "configure:13868: checking _PANGOCHK_CFLAGS" >&5 _PANGOCHK_CFLAGS=`$PKG_CONFIG --cflags "pango >= $PANGO_VERSION"` echo "$ac_t""$_PANGOCHK_CFLAGS" 1>&6 echo $ac_n "checking _PANGOCHK_LIBS""... $ac_c" 1>&6 -echo "configure:13963: checking _PANGOCHK_LIBS" >&5 +echo "configure:13873: checking _PANGOCHK_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic _PANGOCHK_LIBS="`$PKG_CONFIG --libs \"pango >= $PANGO_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$_PANGOCHK_LIBS" 1>&6 @@ -13994,7 +13904,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13998: checking for $ac_word" >&5 +echo "configure:13908: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14038,19 +13948,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= $PANGO_VERSION pangocairo >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION""... $ac_c" 1>&6 -echo "configure:14042: checking for pango >= $PANGO_VERSION pangocairo >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION" >&5 +echo "configure:13952: checking for pango >= $PANGO_VERSION pangocairo >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION" >&5 if $PKG_CONFIG --exists "pango >= $PANGO_VERSION pangocairo >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_PANGO_CFLAGS""... $ac_c" 1>&6 -echo "configure:14049: checking MOZ_PANGO_CFLAGS" >&5 +echo "configure:13959: checking MOZ_PANGO_CFLAGS" >&5 MOZ_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= $PANGO_VERSION pangocairo >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION"` echo "$ac_t""$MOZ_PANGO_CFLAGS" 1>&6 echo $ac_n "checking MOZ_PANGO_LIBS""... $ac_c" 1>&6 -echo "configure:14054: checking MOZ_PANGO_LIBS" >&5 +echo "configure:13964: checking MOZ_PANGO_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_PANGO_LIBS="`$PKG_CONFIG --libs \"pango >= $PANGO_VERSION pangocairo >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_PANGO_LIBS" 1>&6 @@ -14127,7 +14037,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14131: checking for $ac_word" >&5 +echo "configure:14041: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14171,19 +14081,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION""... $ac_c" 1>&6 -echo "configure:14175: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5 +echo "configure:14085: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5 if $PKG_CONFIG --exists "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GNOMEVFS_CFLAGS""... $ac_c" 1>&6 -echo "configure:14182: checking MOZ_GNOMEVFS_CFLAGS" >&5 +echo "configure:14092: checking MOZ_GNOMEVFS_CFLAGS" >&5 MOZ_GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION"` echo "$ac_t""$MOZ_GNOMEVFS_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GNOMEVFS_LIBS""... $ac_c" 1>&6 -echo "configure:14187: checking MOZ_GNOMEVFS_LIBS" >&5 +echo "configure:14097: checking MOZ_GNOMEVFS_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GNOMEVFS_LIBS="`$PKG_CONFIG --libs \"gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GNOMEVFS_LIBS" 1>&6 @@ -14234,7 +14144,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14238: checking for $ac_word" >&5 +echo "configure:14148: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14278,19 +14188,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gconf-2.0 >= $GCONF_VERSION""... $ac_c" 1>&6 -echo "configure:14282: checking for gconf-2.0 >= $GCONF_VERSION" >&5 +echo "configure:14192: checking for gconf-2.0 >= $GCONF_VERSION" >&5 if $PKG_CONFIG --exists "gconf-2.0 >= $GCONF_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GCONF_CFLAGS""... $ac_c" 1>&6 -echo "configure:14289: checking MOZ_GCONF_CFLAGS" >&5 +echo "configure:14199: checking MOZ_GCONF_CFLAGS" >&5 MOZ_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= $GCONF_VERSION"` echo "$ac_t""$MOZ_GCONF_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GCONF_LIBS""... $ac_c" 1>&6 -echo "configure:14294: checking MOZ_GCONF_LIBS" >&5 +echo "configure:14204: checking MOZ_GCONF_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GCONF_LIBS="`$PKG_CONFIG --libs \"gconf-2.0 >= $GCONF_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GCONF_LIBS" 1>&6 @@ -14345,7 +14255,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14349: checking for $ac_word" >&5 +echo "configure:14259: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14389,19 +14299,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libgnome-2.0 >= $LIBGNOME_VERSION""... $ac_c" 1>&6 -echo "configure:14393: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5 +echo "configure:14303: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5 if $PKG_CONFIG --exists "libgnome-2.0 >= $LIBGNOME_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_LIBGNOME_CFLAGS""... $ac_c" 1>&6 -echo "configure:14400: checking MOZ_LIBGNOME_CFLAGS" >&5 +echo "configure:14310: checking MOZ_LIBGNOME_CFLAGS" >&5 MOZ_LIBGNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnome-2.0 >= $LIBGNOME_VERSION"` echo "$ac_t""$MOZ_LIBGNOME_CFLAGS" 1>&6 echo $ac_n "checking MOZ_LIBGNOME_LIBS""... $ac_c" 1>&6 -echo "configure:14405: checking MOZ_LIBGNOME_LIBS" >&5 +echo "configure:14315: checking MOZ_LIBGNOME_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_LIBGNOME_LIBS="`$PKG_CONFIG --libs \"libgnome-2.0 >= $LIBGNOME_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_LIBGNOME_LIBS" 1>&6 @@ -14479,7 +14389,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14483: checking for $ac_word" >&5 +echo "configure:14393: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14523,19 +14433,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libgnomeui-2.0 >= $GNOMEUI_VERSION""... $ac_c" 1>&6 -echo "configure:14527: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 +echo "configure:14437: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 if $PKG_CONFIG --exists "libgnomeui-2.0 >= $GNOMEUI_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GNOMEUI_CFLAGS""... $ac_c" 1>&6 -echo "configure:14534: checking MOZ_GNOMEUI_CFLAGS" >&5 +echo "configure:14444: checking MOZ_GNOMEUI_CFLAGS" >&5 MOZ_GNOMEUI_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 >= $GNOMEUI_VERSION"` echo "$ac_t""$MOZ_GNOMEUI_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GNOMEUI_LIBS""... $ac_c" 1>&6 -echo "configure:14539: checking MOZ_GNOMEUI_LIBS" >&5 +echo "configure:14449: checking MOZ_GNOMEUI_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GNOMEUI_LIBS="`$PKG_CONFIG --libs \"libgnomeui-2.0 >= $GNOMEUI_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GNOMEUI_LIBS" 1>&6 @@ -14612,7 +14522,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14616: checking for $ac_word" >&5 +echo "configure:14526: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14656,19 +14566,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for dbus-glib-1 >= $DBUS_VERSION""... $ac_c" 1>&6 -echo "configure:14660: checking for dbus-glib-1 >= $DBUS_VERSION" >&5 +echo "configure:14570: checking for dbus-glib-1 >= $DBUS_VERSION" >&5 if $PKG_CONFIG --exists "dbus-glib-1 >= $DBUS_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_DBUS_GLIB_CFLAGS""... $ac_c" 1>&6 -echo "configure:14667: checking MOZ_DBUS_GLIB_CFLAGS" >&5 +echo "configure:14577: checking MOZ_DBUS_GLIB_CFLAGS" >&5 MOZ_DBUS_GLIB_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= $DBUS_VERSION"` echo "$ac_t""$MOZ_DBUS_GLIB_CFLAGS" 1>&6 echo $ac_n "checking MOZ_DBUS_GLIB_LIBS""... $ac_c" 1>&6 -echo "configure:14672: checking MOZ_DBUS_GLIB_LIBS" >&5 +echo "configure:14582: checking MOZ_DBUS_GLIB_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_DBUS_GLIB_LIBS="`$PKG_CONFIG --libs \"dbus-glib-1 >= $DBUS_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_DBUS_GLIB_LIBS" 1>&6 @@ -15171,7 +15081,7 @@ # Extract the first word of "java", so it can be a program name with args. set dummy java; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15175: checking for $ac_word" >&5 +echo "configure:15085: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAVA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15207,7 +15117,7 @@ # Extract the first word of "javac", so it can be a program name with args. set dummy javac; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15211: checking for $ac_word" >&5 +echo "configure:15121: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAVAC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15243,7 +15153,7 @@ # Extract the first word of "jar", so it can be a program name with args. set dummy jar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15247: checking for $ac_word" >&5 +echo "configure:15157: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15317,7 +15227,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15321: checking for $ac_word" >&5 +echo "configure:15231: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15361,19 +15271,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gthread-2.0""... $ac_c" 1>&6 -echo "configure:15365: checking for gthread-2.0" >&5 +echo "configure:15275: checking for gthread-2.0" >&5 if $PKG_CONFIG --exists "gthread-2.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GTHREAD_CFLAGS""... $ac_c" 1>&6 -echo "configure:15372: checking MOZ_GTHREAD_CFLAGS" >&5 +echo "configure:15282: checking MOZ_GTHREAD_CFLAGS" >&5 MOZ_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0"` echo "$ac_t""$MOZ_GTHREAD_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GTHREAD_LIBS""... $ac_c" 1>&6 -echo "configure:15377: checking MOZ_GTHREAD_LIBS" >&5 +echo "configure:15287: checking MOZ_GTHREAD_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GTHREAD_LIBS="`$PKG_CONFIG --libs \"gthread-2.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GTHREAD_LIBS" 1>&6 @@ -15409,17 +15319,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15413: checking for $ac_hdr" >&5 +echo "configure:15323: checking for $ac_hdr" >&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:15423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15333: \"$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* @@ -15769,7 +15679,7 @@ # 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:15773: checking for $ac_word" >&5 +echo "configure:15683: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKENSIS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15814,7 +15724,7 @@ # 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:15818: checking for $ac_word" >&5 +echo "configure:15728: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_HOST_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15862,13 +15772,13 @@ echo $ac_n "checking for tar archiver""... $ac_c" 1>&6 -echo "configure:15866: checking for tar archiver" >&5 +echo "configure:15776: checking for tar archiver" >&5 for ac_prog in gnutar gtar tar 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:15872: checking for $ac_word" >&5 +echo "configure:15782: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15905,13 +15815,13 @@ echo $ac_n "checking for wget""... $ac_c" 1>&6 -echo "configure:15909: checking for wget" >&5 +echo "configure:15819: checking for wget" >&5 for ac_prog in wget 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:15915: checking for $ac_word" >&5 +echo "configure:15825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15963,13 +15873,13 @@ msvc*|mks*|cygwin*|mingw*|wince*) if test -n "$MOZ_UPDATER"; then echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:15967: checking for iconv" >&5 +echo "configure:15877: checking for iconv" >&5 for ac_prog in $HOST_ICONV "iconv" 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:15973: checking for $ac_word" >&5 +echo "configure:15883: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16309,7 +16219,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:16313: checking for $ac_word" >&5 +echo "configure:16223: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16352,29 +16262,29 @@ else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo $ac_n "checking for sqlite3 >= $SQLITE_VERSION""... $ac_c" 1>&6 -echo "configure:16357: checking for sqlite3 >= $SQLITE_VERSION" >&5 + echo $ac_n "checking for sqlite3""... $ac_c" 1>&6 +echo "configure:16267: checking for sqlite3" >&5 - if $PKG_CONFIG --exists "sqlite3 >= $SQLITE_VERSION" ; then + if $PKG_CONFIG --exists "sqlite3" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking SQLITE_CFLAGS""... $ac_c" 1>&6 -echo "configure:16364: checking SQLITE_CFLAGS" >&5 - SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3 >= $SQLITE_VERSION"` +echo "configure:16274: checking SQLITE_CFLAGS" >&5 + SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3"` echo "$ac_t""$SQLITE_CFLAGS" 1>&6 echo $ac_n "checking SQLITE_LIBS""... $ac_c" 1>&6 -echo "configure:16369: checking SQLITE_LIBS" >&5 +echo "configure:16279: checking SQLITE_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic - SQLITE_LIBS="`$PKG_CONFIG --libs \"sqlite3 >= $SQLITE_VERSION\" |sed s/-Wl,--export-dynamic//g`" + SQLITE_LIBS="`$PKG_CONFIG --libs \"sqlite3\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$SQLITE_LIBS" 1>&6 else SQLITE_CFLAGS="" SQLITE_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. - SQLITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sqlite3 >= $SQLITE_VERSION"` + SQLITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sqlite3"` echo $SQLITE_PKG_ERRORS fi @@ -16390,7 +16300,7 @@ : else if test "$COMPILE_ENVIRONMENT"; then - { echo "configure: error: Library requirements (sqlite3 >= $SQLITE_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } + { echo "configure: error: Library requirements (sqlite3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } fi fi @@ -16497,6 +16407,84 @@ fi +# Check whether --enable-js-binary or --disable-js-binary was given. +if test "${enable_js_binary+set}" = set; then + enableval="$enable_js_binary" + if test "$enableval" = "yes"; then + ENABLE_JS_BINARY=1 + elif test "$enableval" = "no"; then + ENABLE_JS_BINARY= + else + { echo "configure: error: Option, js-binary, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + + +if test -n "$ENABLE_JS_BINARY"; then + READLINE_DIR=no + # Check whether --with-readline or --without-readline was given. +if test "${with_readline+set}" = set; then + withval="$with_readline" + READLINE_DIR=$withval +fi + + + if test -n "${READLINE_DIR}" -a "${READLINE_DIR}" != "no"; then + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="-L${READLINE_DIR}/lib $LDFLAGS" + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:16438: checking for readline in -lreadline" >&5 +ac_lib_var=`echo readline'_'readline | 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="-lreadline $LIBS" +cat > conftest.$ac_ext <&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 + HAVE_READLINE=1 READLINE_LIBS="-lreadline" +else + echo "$ac_t""no" 1>&6 +HAVE_READLINE= READLINE_LIBS= +fi + + LDFLAGS=$_SAVE_LDFLAGS + fi + + if test "${READLINE_DIR}" -a -d "${READLINE_DIR}" -a "$HAVE_READLINE" = 1; then + READLINE_LIBS="-L${READLINE_DIR}/lib ${READLINE_LIBS}" + fi +fi + + + + # Debugging and Optimizations @@ -16558,18 +16546,18 @@ if test -n "$MOZ_DEBUG"; then echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 -echo "configure:16562: checking for valid debug flags" >&5 +echo "configure:16550: checking for valid debug flags" >&5 _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:16573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _results=yes else @@ -16610,18 +16598,18 @@ if test "$COMPILE_ENVIRONMENT"; then if test -n "$MOZ_OPTIMIZE"; then echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 -echo "configure:16614: checking for valid optimization flags" >&5 +echo "configure:16602: checking for valid optimization flags" >&5 _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:16625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _results=yes else @@ -16791,7 +16779,7 @@ fi else echo $ac_n "checking size of int *""... $ac_c" 1>&6 -echo "configure:16795: checking size of int *" >&5 +echo "configure:16783: checking size of int *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16799,18 +16787,19 @@ ac_cv_sizeof_int_p=4 else cat > conftest.$ac_ext < -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int *)); - return(0); + exit(0); } EOF -if { (eval echo configure:16814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int_p=`cat conftestval` else @@ -16940,17 +16929,17 @@ ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6 -echo "configure:16944: checking for valgrind/valgrind.h" >&5 +echo "configure:16933: checking for valgrind/valgrind.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:16954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16943: \"$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* @@ -17027,7 +17016,7 @@ if test -n "$_ENABLE_EFENCE"; then echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6 -echo "configure:17031: checking for malloc in -lefence" >&5 +echo "configure:17020: checking for malloc in -lefence" >&5 ac_lib_var=`echo efence'_'malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17035,7 +17024,7 @@ ac_save_LIBS="$LIBS" LIBS="-lefence $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17039: \"$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 @@ -17178,12 +17167,12 @@ for ac_func in __builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17182: checking for $ac_func" >&5 +echo "configure:17171: 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:17202: \"$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 @@ -17428,12 +17417,12 @@ for ac_func in __cxa_demangle do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17432: checking for $ac_func" >&5 +echo "configure:17421: 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:17452: \"$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 @@ -17507,17 +17496,17 @@ if test "$HAVE_GCC3_ABI" && test -z "$SKIP_LIBRARY_CHECKS"; then ac_safe=`echo "unwind.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for unwind.h""... $ac_c" 1>&6 -echo "configure:17511: checking for unwind.h" >&5 +echo "configure:17500: checking for unwind.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:17521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:17510: \"$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* @@ -17536,12 +17525,12 @@ for ac_func in _Unwind_Backtrace do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17540: checking for $ac_func" >&5 +echo "configure:17529: 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:17557: \"$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 @@ -17686,7 +17675,7 @@ # Compiler Options echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:17690: checking for gcc -pipe support" >&5 +echo "configure:17679: 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"); exit(0); }' >> dummy-hello.c @@ -17701,14 +17690,14 @@ _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:17712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _res_gcc_pipe="yes" else @@ -17750,16 +17739,16 @@ _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long" echo $ac_n "checking whether compiler supports -Wno-long-long""... $ac_c" 1>&6 -echo "configure:17754: checking whether compiler supports -Wno-long-long" >&5 +echo "configure:17743: checking whether compiler supports -Wno-long-long" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" @@ -17795,16 +17784,16 @@ CFLAGS="$CFLAGS -fprofile-generate" echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 -echo "configure:17799: checking whether C compiler supports -fprofile-generate" >&5 +echo "configure:17788: checking whether C compiler supports -fprofile-generate" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-generate" result="yes" @@ -17824,16 +17813,16 @@ else CFLAGS="$_SAVE_CFLAGS -fprofile-arcs" echo $ac_n "checking whether C compiler supports -fprofile-arcs""... $ac_c" 1>&6 -echo "configure:17828: checking whether C compiler supports -fprofile-arcs" >&5 +echo "configure:17817: checking whether C compiler supports -fprofile-arcs" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-arcs" result="yes" @@ -17903,16 +17892,16 @@ _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6 -echo "configure:17907: checking whether C++ compiler has -pedantic long long bug" >&5 +echo "configure:17896: checking whether C++ compiler has -pedantic long long bug" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result="no" else @@ -17937,13 +17926,16 @@ fi echo $ac_n "checking for correct temporary object destruction order""... $ac_c" 1>&6 -echo "configure:17941: checking for correct temporary object destruction order" >&5 +echo "configure:17930: checking for correct temporary object destruction order" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:17958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -17983,12 +17975,12 @@ _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}" echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6 -echo "configure:17987: checking for correct overload resolution with const and templates" >&5 +echo "configure:17979: checking for correct overload resolution with const and templates" >&5 if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -18018,7 +18010,7 @@ ; return 0; } EOF -if { (eval echo configure:18022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_nscap_nonconst_opeq_bug="no" else @@ -18321,7 +18313,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18325: checking for $ac_word" >&5 +echo "configure:18317: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18365,19 +18357,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0""... $ac_c" 1>&6 -echo "configure:18369: checking for libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0" >&5 +echo "configure:18361: checking for libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0" >&5 if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking LIBIDL_CFLAGS""... $ac_c" 1>&6 -echo "configure:18376: checking LIBIDL_CFLAGS" >&5 +echo "configure:18368: checking LIBIDL_CFLAGS" >&5 LIBIDL_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0"` echo "$ac_t""$LIBIDL_CFLAGS" 1>&6 echo $ac_n "checking LIBIDL_LIBS""... $ac_c" 1>&6 -echo "configure:18381: checking LIBIDL_LIBS" >&5 +echo "configure:18373: checking LIBIDL_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic LIBIDL_LIBS="`$PKG_CONFIG --libs \"libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$LIBIDL_LIBS" 1>&6 @@ -18501,7 +18493,7 @@ # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18505: checking for $ac_word" >&5 +echo "configure:18497: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18536,7 +18528,7 @@ min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:18540: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:18532: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -18559,7 +18551,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -18635,7 +18627,7 @@ } EOF -if { (eval echo configure:18639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:18631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -18669,7 +18661,7 @@ CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -18679,7 +18671,7 @@ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:18683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -18723,7 +18715,7 @@ # Extract the first word of "libIDL-config", so it can be a program name with args. set dummy libIDL-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18727: checking for $ac_word" >&5 +echo "configure:18719: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18758,7 +18750,7 @@ min_libIDL_version=$LIBIDL_VERSION echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6 -echo "configure:18762: checking for libIDL - version >= $min_libIDL_version" >&5 +echo "configure:18754: checking for libIDL - version >= $min_libIDL_version" >&5 no_libIDL="" if test "$LIBIDL_CONFIG" = "no" ; then no_libIDL=yes @@ -18785,7 +18777,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -18871,7 +18863,7 @@ } EOF -if { (eval echo configure:18875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:18867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -18905,7 +18897,7 @@ CFLAGS="$CFLAGS $LIBIDL_CFLAGS" LIBS="$LIBS $LIBIDL_LIBS" cat > conftest.$ac_ext < @@ -18916,7 +18908,7 @@ return IDL_get_libver_string ? 1 : 0; ; return 0; } EOF -if { (eval echo configure:18920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libIDL or finding the wrong" @@ -18956,7 +18948,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18960: checking for $ac_word" >&5 +echo "configure:18952: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19000,19 +18992,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libIDL-2.0 >= 0.8.0""... $ac_c" 1>&6 -echo "configure:19004: checking for libIDL-2.0 >= 0.8.0" >&5 +echo "configure:18996: checking for libIDL-2.0 >= 0.8.0" >&5 if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking LIBIDL_CFLAGS""... $ac_c" 1>&6 -echo "configure:19011: checking LIBIDL_CFLAGS" >&5 +echo "configure:19003: checking LIBIDL_CFLAGS" >&5 LIBIDL_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` echo "$ac_t""$LIBIDL_CFLAGS" 1>&6 echo $ac_n "checking LIBIDL_LIBS""... $ac_c" 1>&6 -echo "configure:19016: checking LIBIDL_LIBS" >&5 +echo "configure:19008: checking LIBIDL_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic LIBIDL_LIBS="`$PKG_CONFIG --libs \"libIDL-2.0 >= 0.8.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$LIBIDL_LIBS" 1>&6 @@ -19049,7 +19041,7 @@ # 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:19053: checking for $ac_word" >&5 +echo "configure:19045: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19086,7 +19078,7 @@ if test -n "$ORBIT_CONFIG"; then echo $ac_n "checking for ORBit libIDL usability""... $ac_c" 1>&6 -echo "configure:19090: checking for ORBit libIDL usability" >&5 +echo "configure:19082: checking for ORBit libIDL usability" >&5 _ORBIT_CFLAGS=`${ORBIT_CONFIG} client --cflags` _ORBIT_LIBS=`${ORBIT_CONFIG} client --libs` _ORBIT_INC_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-I/); } }' -- ${_ORBIT_CFLAGS}` @@ -19103,7 +19095,7 @@ result="maybe" else cat > conftest.$ac_ext < @@ -19118,7 +19110,7 @@ } EOF -if { (eval echo configure:19122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:19114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then _LIBIDL_FOUND=1 result="yes" @@ -19174,7 +19166,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:19178: checking for $ac_word" >&5 +echo "configure:19170: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19218,19 +19210,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for glib-2.0 >= 1.3.7 gobject-2.0""... $ac_c" 1>&6 -echo "configure:19222: checking for glib-2.0 >= 1.3.7 gobject-2.0" >&5 +echo "configure:19214: checking for glib-2.0 >= 1.3.7 gobject-2.0" >&5 if $PKG_CONFIG --exists "glib-2.0 >= 1.3.7 gobject-2.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking GLIB_CFLAGS""... $ac_c" 1>&6 -echo "configure:19229: checking GLIB_CFLAGS" >&5 +echo "configure:19221: checking GLIB_CFLAGS" >&5 GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 1.3.7 gobject-2.0"` echo "$ac_t""$GLIB_CFLAGS" 1>&6 echo $ac_n "checking GLIB_LIBS""... $ac_c" 1>&6 -echo "configure:19234: checking GLIB_LIBS" >&5 +echo "configure:19226: checking GLIB_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic GLIB_LIBS="`$PKG_CONFIG --libs \"glib-2.0 >= 1.3.7 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$GLIB_LIBS" 1>&6 @@ -19315,7 +19307,7 @@ # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:19319: checking for $ac_word" >&5 +echo "configure:19311: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19350,7 +19342,7 @@ min_glib_version=${GLIB_VERSION} echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:19354: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:19346: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -19373,7 +19365,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -19449,7 +19441,7 @@ } EOF -if { (eval echo configure:19453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:19445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -19483,7 +19475,7 @@ CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -19493,7 +19485,7 @@ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:19497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -19573,19 +19565,19 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:19577: checking for working alloca.h" >&5 +echo "configure:19569: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:19589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -19606,12 +19598,12 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:19610: checking for alloca" >&5 +echo "configure:19602: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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:19635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -19671,12 +19663,12 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:19675: checking whether alloca needs Cray hooks" >&5 +echo "configure:19667: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:19705: checking for $ac_func" >&5 +echo "configure:19697: 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:19725: \"$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 @@ -19756,7 +19748,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:19760: checking stack direction for C alloca" >&5 +echo "configure:19752: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19764,7 +19756,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:19779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -19830,17 +19822,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:19834: checking for $ac_hdr" >&5 +echo "configure:19826: checking for $ac_hdr" >&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:19844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:19836: \"$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* @@ -19918,7 +19910,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:19922: checking for $ac_word" >&5 +echo "configure:19914: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19962,19 +19954,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for fontconfig freetype2""... $ac_c" 1>&6 -echo "configure:19966: checking for fontconfig freetype2" >&5 +echo "configure:19958: checking for fontconfig freetype2" >&5 if $PKG_CONFIG --exists "fontconfig freetype2" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking CAIRO_FT_CFLAGS""... $ac_c" 1>&6 -echo "configure:19973: checking CAIRO_FT_CFLAGS" >&5 +echo "configure:19965: checking CAIRO_FT_CFLAGS" >&5 CAIRO_FT_CFLAGS=`$PKG_CONFIG --cflags "fontconfig freetype2"` echo "$ac_t""$CAIRO_FT_CFLAGS" 1>&6 echo $ac_n "checking CAIRO_FT_LIBS""... $ac_c" 1>&6 -echo "configure:19978: checking CAIRO_FT_LIBS" >&5 +echo "configure:19970: checking CAIRO_FT_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic CAIRO_FT_LIBS="`$PKG_CONFIG --libs \"fontconfig freetype2\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$CAIRO_FT_LIBS" 1>&6 @@ -20065,7 +20057,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:20069: checking for $ac_word" >&5 +echo "configure:20061: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -20109,19 +20101,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for cairo >= $CAIRO_VERSION freetype2 fontconfig""... $ac_c" 1>&6 -echo "configure:20113: checking for cairo >= $CAIRO_VERSION freetype2 fontconfig" >&5 +echo "configure:20105: checking for cairo >= $CAIRO_VERSION freetype2 fontconfig" >&5 if $PKG_CONFIG --exists "cairo >= $CAIRO_VERSION freetype2 fontconfig" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6 -echo "configure:20120: checking CAIRO_CFLAGS" >&5 +echo "configure:20112: checking CAIRO_CFLAGS" >&5 CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION freetype2 fontconfig"` echo "$ac_t""$CAIRO_CFLAGS" 1>&6 echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6 -echo "configure:20125: checking CAIRO_LIBS" >&5 +echo "configure:20117: checking CAIRO_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic CAIRO_LIBS="`$PKG_CONFIG --libs \"cairo >= $CAIRO_VERSION freetype2 fontconfig\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$CAIRO_LIBS" 1>&6 @@ -20159,7 +20151,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:20163: checking for $ac_word" >&5 +echo "configure:20155: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -20203,19 +20195,19 @@ PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for cairo-xlib-xrender >= $CAIRO_VERSION""... $ac_c" 1>&6 -echo "configure:20207: checking for cairo-xlib-xrender >= $CAIRO_VERSION" >&5 +echo "configure:20199: checking for cairo-xlib-xrender >= $CAIRO_VERSION" >&5 if $PKG_CONFIG --exists "cairo-xlib-xrender >= $CAIRO_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking CAIRO_XRENDER_CFLAGS""... $ac_c" 1>&6 -echo "configure:20214: checking CAIRO_XRENDER_CFLAGS" >&5 +echo "configure:20206: checking CAIRO_XRENDER_CFLAGS" >&5 CAIRO_XRENDER_CFLAGS=`$PKG_CONFIG --cflags "cairo-xlib-xrender >= $CAIRO_VERSION"` echo "$ac_t""$CAIRO_XRENDER_CFLAGS" 1>&6 echo $ac_n "checking CAIRO_XRENDER_LIBS""... $ac_c" 1>&6 -echo "configure:20219: checking CAIRO_XRENDER_LIBS" >&5 +echo "configure:20211: checking CAIRO_XRENDER_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic CAIRO_XRENDER_LIBS="`$PKG_CONFIG --libs \"cairo-xlib-xrender >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$CAIRO_XRENDER_LIBS" 1>&6 @@ -20286,7 +20278,7 @@ # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:20290: checking for $ac_word" >&5 +echo "configure:20282: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -20329,29 +20321,29 @@ else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo $ac_n "checking for lcms >= $LCMS_VERSION""... $ac_c" 1>&6 -echo "configure:20334: checking for lcms >= $LCMS_VERSION" >&5 + echo $ac_n "checking for lcms""... $ac_c" 1>&6 +echo "configure:20326: checking for lcms" >&5 - if $PKG_CONFIG --exists "lcms >= $LCMS_VERSION" ; then + if $PKG_CONFIG --exists "lcms" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking LCMS_CFLAGS""... $ac_c" 1>&6 -echo "configure:20341: checking LCMS_CFLAGS" >&5 - LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms >= $LCMS_VERSION"` +echo "configure:20333: checking LCMS_CFLAGS" >&5 + LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms"` echo "$ac_t""$LCMS_CFLAGS" 1>&6 echo $ac_n "checking LCMS_LIBS""... $ac_c" 1>&6 -echo "configure:20346: checking LCMS_LIBS" >&5 +echo "configure:20338: checking LCMS_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic - LCMS_LIBS="`$PKG_CONFIG --libs \"lcms >= $LCMS_VERSION\" |sed s/-Wl,--export-dynamic//g`" + LCMS_LIBS="`$PKG_CONFIG --libs \"lcms\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$LCMS_LIBS" 1>&6 else LCMS_CFLAGS="" LCMS_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. - LCMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lcms >= $LCMS_VERSION"` + LCMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lcms"` echo $LCMS_PKG_ERRORS fi @@ -20367,7 +20359,7 @@ : else if test "$COMPILE_ENVIRONMENT"; then - { echo "configure: error: Library requirements (lcms >= $LCMS_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } + { echo "configure: error: Library requirements (lcms) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } fi fi @@ -20690,14 +20682,14 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < int main() { int x = 1; x++; ; return 0; } EOF -if { (eval echo configure:20701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -20983,6 +20975,8 @@ + + cat >> confdefs.h < conftest.$ac_ext < @@ -21029,7 +21023,7 @@ ; return 0; } EOF -if { (eval echo configure:21033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:21027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -21252,34 +21246,15 @@ # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs MOZ_DEFINES=$DEFS @@ -21610,6 +21585,9 @@ s%@MOZ_URL_CLASSIFIER@%$MOZ_URL_CLASSIFIER%g s%@MOZ_ZIPWRITER@%$MOZ_ZIPWRITER%g s%@JS_ULTRASPARC_OPTS@%$JS_ULTRASPARC_OPTS%g +s%@ENABLE_JS_BINARY@%$ENABLE_JS_BINARY%g +s%@HAVE_READLINE@%$HAVE_READLINE%g +s%@READLINE_LIBS@%$READLINE_LIBS%g s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g s%@MOZ_OPTIMIZE_FLAGS@%$MOZ_OPTIMIZE_FLAGS%g s%@MOZ_OPTIMIZE_LDFLAGS@%$MOZ_OPTIMIZE_LDFLAGS%g @@ -21839,6 +21817,7 @@ s%@WIN32_REDIST_DIR@%$WIN32_REDIST_DIR%g s%@SYSTEM_JPEG@%$SYSTEM_JPEG%g s%@SYSTEM_PNG@%$SYSTEM_PNG%g +s%@APNG@%$APNG%g s%@SYSTEM_ZLIB@%$SYSTEM_ZLIB%g s%@SYSTEM_BZ2@%$SYSTEM_BZ2%g s%@JPEG_CFLAGS@%$JPEG_CFLAGS%g @@ -21863,6 +21842,7 @@ s%@COMPILE_CFLAGS@%$COMPILE_CFLAGS%g s%@COMPILE_CXXFLAGS@%$COMPILE_CXXFLAGS%g s%@CROSS_COMPILE@%$CROSS_COMPILE%g +s%@WCHAR_CFLAGS@%$WCHAR_CFLAGS%g s%@HOST_CFLAGS@%$HOST_CFLAGS%g s%@HOST_CXXFLAGS@%$HOST_CXXFLAGS%g s%@HOST_OPTIMIZE_FLAGS@%$HOST_OPTIMIZE_FLAGS%g @@ -22257,7 +22237,7 @@ fi fi - cd $ac_popdir + cd "$ac_popdir" done fi @@ -22400,7 +22380,7 @@ fi fi - cd $ac_popdir + cd "$ac_popdir" done fi --- xulrunner-1.9.0.19.orig/dom/tests/mochitest/bugs/test_bug531176.html +++ xulrunner-1.9.0.19/dom/tests/mochitest/bugs/test_bug531176.html @@ -0,0 +1,61 @@ + + + + + Test for Bug 531176 + + + + + +Mozilla Bug 531176 +

+ +
+
+
+
+
+ + --- xulrunner-1.9.0.19.orig/dom/tests/mochitest/bugs/Makefile.in +++ xulrunner-1.9.0.19/dom/tests/mochitest/bugs/Makefile.in @@ -81,6 +81,7 @@ iframe_bug440572.html \ test_bug504862.html \ file_bug504862.html \ + test_bug531176.html \ $(NULL) libs:: $(_TEST_FILES) --- xulrunner-1.9.0.19.orig/dom/public/idl/base/nsIDOMWindowUtils.idl +++ xulrunner-1.9.0.19/dom/public/idl/base/nsIDOMWindowUtils.idl @@ -179,3 +179,13 @@ */ void garbageCollect(); }; + +[scriptable, uuid(e947d605-6d3c-40fe-a0b1-4429df635b8b)] +interface nsIDOMWindowUtils_1_9 : nsISupports +{ + /** + * Exposes the CSS parser's "initial syntax is valid" heuristic for + * testing. + */ + boolean cssInitialSyntaxIsValid(in AString aSheet); +}; --- xulrunner-1.9.0.19.orig/dom/src/base/nsGlobalWindow.cpp +++ xulrunner-1.9.0.19/dom/src/base/nsGlobalWindow.cpp @@ -2120,13 +2120,30 @@ if (mScreen) mScreen->SetDocShell(aDocShell); + + // tell our member elements about the new browserwindow + nsCOMPtr browserChrome; + GetWebBrowserChrome(getter_AddRefs(browserChrome)); + if (mMenubar) { + mMenubar->SetWebBrowserChrome(browserChrome); + } + if (mToolbar) { + mToolbar->SetWebBrowserChrome(browserChrome); + } + if (mLocationbar) { + mLocationbar->SetWebBrowserChrome(browserChrome); + } + if (mPersonalbar) { + mPersonalbar->SetWebBrowserChrome(browserChrome); + } + if (mStatusbar) { + mStatusbar->SetWebBrowserChrome(browserChrome); + } + if (mScrollbars) { + mScrollbars->SetWebBrowserChrome(browserChrome); + } + if (mDocShell) { - // tell our member elements about the new browserwindow - if (mMenubar) { - nsCOMPtr browserChrome; - GetWebBrowserChrome(getter_AddRefs(browserChrome)); - mMenubar->SetWebBrowserChrome(browserChrome); - } // Get our enclosing chrome shell and retrieve its global window impl, so // that we can do some forwarding to the chrome document. @@ -6156,6 +6173,22 @@ return NS_OK; } +class CommandDispatcher : public nsRunnable +{ +public: + CommandDispatcher(nsIDOMXULCommandDispatcher* aDispatcher, + const nsAString& aAction) + : mDispatcher(aDispatcher), mAction(aAction) {} + + NS_IMETHOD Run() + { + return mDispatcher->UpdateCommands(mAction); + } + + nsCOMPtr mDispatcher; + nsString mAction; +}; + NS_IMETHODIMP nsGlobalWindow::UpdateCommands(const nsAString& anAction) { @@ -6170,7 +6203,10 @@ // Retrieve the command dispatcher and call updateCommands on it. nsCOMPtr xulCommandDispatcher; xulDoc->GetCommandDispatcher(getter_AddRefs(xulCommandDispatcher)); - xulCommandDispatcher->UpdateCommands(anAction); + if (xulCommandDispatcher) { + nsContentUtils::AddScriptRunner(new CommandDispatcher(xulCommandDispatcher, + anAction)); + } } return NS_OK; @@ -9099,6 +9135,10 @@ nsNavigator::nsNavigator(nsIDocShell *aDocShell) : mDocShell(aDocShell) { + if (mMimeTypes) + mMimeTypes->Invalidate(); + if (mPlugins) + mPlugins->Invalidate(); } nsNavigator::~nsNavigator() @@ -9649,8 +9689,15 @@ // Release these so that they will be recreated for the // new document (if requested). The plugins or mime types // arrays may have changed. See bug 150087. - mMimeTypes = nsnull; - mPlugins = nsnull; + if (mMimeTypes) { + mMimeTypes->Invalidate(); + mMimeTypes = nsnull; + } + + if (mPlugins) { + mPlugins->Invalidate(); + mPlugins = nsnull; + } } nsresult --- xulrunner-1.9.0.19.orig/dom/src/base/nsMimeTypeArray.h +++ xulrunner-1.9.0.19/dom/src/base/nsMimeTypeArray.h @@ -1,4 +1,5 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=2 sw=2 et tw=79: */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -45,6 +46,8 @@ class nsIDOMNavigator; +// NB: Due to weak references, nsNavigator has intimate knowledge of our +// members. class nsMimeTypeArray : public nsIDOMMimeTypeArray { public: @@ -56,6 +59,13 @@ nsresult Refresh(); + void Invalidate() + { + // NB: This will cause GetMimeTypes to fail from now on. + mNavigator = nsnull; + Clear(); + } + private: nsresult GetMimeTypes(); void Clear(); --- xulrunner-1.9.0.19.orig/dom/src/base/nsBarProps.cpp +++ xulrunner-1.9.0.19/dom/src/base/nsBarProps.cpp @@ -82,10 +82,10 @@ NS_IMETHODIMP nsBarProp::GetVisibleByFlag(PRBool *aVisible, PRUint32 aChromeFlag) { - NS_ENSURE_TRUE(mBrowserChrome, NS_ERROR_FAILURE); + *aVisible = PR_FALSE; + NS_ENSURE_TRUE(mBrowserChrome, NS_OK); PRUint32 chromeFlags; - *aVisible = PR_FALSE; NS_ENSURE_SUCCESS(mBrowserChrome->GetChromeFlags(&chromeFlags), NS_ERROR_FAILURE); @@ -98,7 +98,7 @@ NS_IMETHODIMP nsBarProp::SetVisibleByFlag(PRBool aVisible, PRUint32 aChromeFlag) { - NS_ENSURE_TRUE(mBrowserChrome, NS_ERROR_FAILURE); + NS_ENSURE_TRUE(mBrowserChrome, NS_OK); PRBool enabled = PR_FALSE; --- xulrunner-1.9.0.19.orig/dom/src/base/nsJSEnvironment.cpp +++ xulrunner-1.9.0.19/dom/src/base/nsJSEnvironment.cpp @@ -218,7 +218,7 @@ static PRTime sMaxScriptRunTime; static PRTime sMaxChromeScriptRunTime; -static nsIScriptSecurityManager *sSecurityManager; +static nsIScriptSecurityManager_1_9_2 *sSecurityManager; static nsICollation *gCollation; @@ -420,6 +420,136 @@ return called; } +class ScriptErrorEvent : public nsRunnable +{ +public: + ScriptErrorEvent(nsIScriptGlobalObject* aScriptGlobal, + PRUint32 aLineNr, PRUint32 aColumn, PRUint32 aFlags, + const nsAString& aErrorMsg, + const nsAString& aFileName, + const nsAString& aSourceLine, + PRBool aDispatchEvent) + : mScriptGlobal(aScriptGlobal), mLineNr(aLineNr), mColumn(aColumn), + mFlags(aFlags), mErrorMsg(aErrorMsg), mFileName(aFileName), + mSourceLine(aSourceLine), mDispatchEvent(aDispatchEvent) {} + + NS_IMETHOD Run() + { + nsEventStatus status = nsEventStatus_eIgnore; + // First, notify the DOM that we have a script error. + if (mDispatchEvent) { + nsCOMPtr win(do_QueryInterface(mScriptGlobal)); + nsIDocShell* docShell = win ? win->GetDocShell() : nsnull; + if (docShell && + !JSREPORT_IS_WARNING(mFlags) && + !sHandlingScriptError) { + sHandlingScriptError = PR_TRUE; // Recursion prevention + + nsCOMPtr presContext; + docShell->GetPresContext(getter_AddRefs(presContext)); + + if (presContext) { + nsScriptErrorEvent errorevent(PR_TRUE, NS_LOAD_ERROR); + + errorevent.fileName = mFileName.get(); + + nsCOMPtr sop(do_QueryInterface(win)); + NS_ENSURE_STATE(sop); + nsIPrincipal* p = sop->GetPrincipal(); + NS_ENSURE_STATE(p); + + PRBool sameOrigin = mFileName.IsVoid(); + + if (p && !sameOrigin) { + nsCOMPtr errorURI; + NS_NewURI(getter_AddRefs(errorURI), mFileName); + if (errorURI) { + // FIXME: Once error reports contain the origin of the + // error (principals) we should change this to do the + // security check based on the principals and not + // URIs. See bug 387476. + sameOrigin = NS_SUCCEEDED(p->CheckMayLoad(errorURI, PR_FALSE)); + } + } + + NS_NAMED_LITERAL_STRING(xoriginMsg, "Script error."); + if (sameOrigin) { + errorevent.errorMsg = mErrorMsg.get(); + errorevent.lineNr = mLineNr; + } else { + NS_WARNING("Not same origin error!"); + errorevent.errorMsg = xoriginMsg.get(); + errorevent.lineNr = 0; + // FIXME: once the principal of the script is not tied to + // the filename, we can stop using the post-redirect + // filename if we want and remove this line. Note that + // apparently we can't handle null filenames in the error + // event dispatching code. + static PRUnichar nullFilename[] = { PRUnichar(0) }; + errorevent.fileName = nullFilename; + } + + nsEventDispatcher::Dispatch(win, presContext, &errorevent, nsnull, + &status); + } + + sHandlingScriptError = PR_FALSE; + } + } + + if (status != nsEventStatus_eConsumeNoDefault) { + // Make an nsIScriptError and populate it with information from + // this error. + nsCOMPtr errorObject = + do_CreateInstance("@mozilla.org/scripterror;1"); + + if (errorObject != nsnull) { + nsresult rv = NS_ERROR_NOT_AVAILABLE; + + // Set category to chrome or content + nsCOMPtr scriptPrincipal = + do_QueryInterface(mScriptGlobal); + NS_ASSERTION(scriptPrincipal, "Global objects must implement " + "nsIScriptObjectPrincipal"); + nsCOMPtr systemPrincipal; + sSecurityManager->GetSystemPrincipal(getter_AddRefs(systemPrincipal)); + const char * category = + scriptPrincipal->GetPrincipal() == systemPrincipal + ? "chrome javascript" + : "content javascript"; + + rv = errorObject->Init(mErrorMsg.get(), mFileName.get(), + mSourceLine.get(), + mLineNr, mColumn, mFlags, + category); + + if (NS_SUCCEEDED(rv)) { + nsCOMPtr consoleService = + do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv); + if (NS_SUCCEEDED(rv)) { + consoleService->LogMessage(errorObject); + } + } + } + } + return NS_OK; + } + + + nsCOMPtr mScriptGlobal; + PRUint32 mLineNr; + PRUint32 mColumn; + PRUint32 mFlags; + nsString mErrorMsg; + nsString mFileName; + nsString mSourceLine; + PRBool mDispatchEvent; + + static PRBool sHandlingScriptError; +}; + +PRBool ScriptErrorEvent::sHandlingScriptError = PR_FALSE; + // NOTE: This function could be refactored to use the above. The only reason // it has not been done is that the code below only fills the error event // after it has a good nsPresContext - whereas using the above function @@ -432,8 +562,6 @@ // XXX this means we are not going to get error reports on non DOM contexts nsIScriptContext *context = nsJSUtils::GetDynamicScriptContext(cx); - nsEventStatus status = nsEventStatus_eIgnore; - // Note: we must do this before running any more code on cx (if cx is the // dynamic script context). ::JS_ClearPendingException(cx); @@ -443,9 +571,11 @@ if (globalObject) { nsAutoString fileName, msg; - NS_NAMED_LITERAL_STRING(xoriginMsg, "Script error."); - - fileName.AssignWithConversion(report->filename); + if (!report->filename) { + fileName.SetIsVoid(PR_TRUE); + } else { + fileName.AssignWithConversion(report->filename); + } const PRUnichar *m = reinterpret_cast (report->ucmessage); @@ -457,113 +587,20 @@ msg.AssignWithConversion(message); } - // First, notify the DOM that we have a script error. + /* We do not try to report Out Of Memory via a dom * event because the dom event handler would encounter * an OOM exception trying to process the event, and * then we'd need to generate a new OOM event for that * new OOM instance -- this isn't pretty. */ - { - // Scope to make sure we're not using |win| in the rest of - // this function when we should be using |globalObject|. We - // only need |win| for the event dispatch. - nsCOMPtr win(do_QueryInterface(globalObject)); - nsIDocShell *docShell = win ? win->GetDocShell() : nsnull; - if (docShell && - (report->errorNumber != JSMSG_OUT_OF_MEMORY && - !JSREPORT_IS_WARNING(report->flags))) { - static PRInt32 errorDepth; // Recursion prevention - ++errorDepth; - - nsCOMPtr presContext; - docShell->GetPresContext(getter_AddRefs(presContext)); - - if (presContext && errorDepth < 2) { - nsScriptErrorEvent errorevent(PR_TRUE, NS_LOAD_ERROR); - - errorevent.fileName = fileName.get(); - - nsCOMPtr sop(do_QueryInterface(win)); - nsIPrincipal *p = sop->GetPrincipal(); - - PRBool sameOrigin = (report->filename == nsnull); - - if (p && !sameOrigin) { - nsCOMPtr errorURI; - NS_NewURI(getter_AddRefs(errorURI), report->filename); - - nsCOMPtr codebase; - p->GetURI(getter_AddRefs(codebase)); - - if (errorURI && codebase) { - // FIXME: Once error reports contain the origin of the - // error (principals) we should change this to do the - // security check based on the principals and not - // URIs. See bug 387476. - sameOrigin = - NS_SUCCEEDED(sSecurityManager-> - CheckSameOriginURI(errorURI, codebase, - PR_FALSE)); - } - } - - if (sameOrigin) { - errorevent.errorMsg = msg.get(); - errorevent.lineNr = report->lineno; - } else { - errorevent.errorMsg = xoriginMsg.get(); - errorevent.lineNr = 0; - } - - // Dispatch() must be synchronous for the recursion block - // (errorDepth) to work. - nsEventDispatcher::Dispatch(win, presContext, &errorevent, nsnull, - &status); - } - - --errorDepth; - } - } - - if (status != nsEventStatus_eConsumeNoDefault) { - // Make an nsIScriptError and populate it with information from - // this error. - nsCOMPtr errorObject = - do_CreateInstance("@mozilla.org/scripterror;1"); - - if (errorObject != nsnull) { - nsresult rv = NS_ERROR_NOT_AVAILABLE; - - // Set category to chrome or content - nsCOMPtr scriptPrincipal = - do_QueryInterface(globalObject); - NS_ASSERTION(scriptPrincipal, "Global objects must implement " - "nsIScriptObjectPrincipal"); - nsCOMPtr systemPrincipal; - sSecurityManager->GetSystemPrincipal(getter_AddRefs(systemPrincipal)); - const char * category = - scriptPrincipal->GetPrincipal() == systemPrincipal - ? "chrome javascript" - : "content javascript"; - - PRUint32 column = report->uctokenptr - report->uclinebuf; - - rv = errorObject->Init(msg.get(), fileName.get(), - reinterpret_cast - (report->uclinebuf), - report->lineno, column, report->flags, - category); - - if (NS_SUCCEEDED(rv)) { - nsCOMPtr consoleService = - do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv); - if (NS_SUCCEEDED(rv)) { - consoleService->LogMessage(errorObject); - } - } - } - } + nsAutoString sourceLine; + sourceLine.Assign(reinterpret_cast(report->uclinebuf)); + nsContentUtils::AddScriptRunner( + new ScriptErrorEvent(globalObject, report->lineno, + report->uctokenptr - report->uclinebuf, + report->flags, msg, fileName, sourceLine, + report->errorNumber != JSMSG_OUT_OF_MEMORY)); } } @@ -588,8 +625,7 @@ } else { error.Append(message); } - if (status != nsEventStatus_eIgnore && !JSREPORT_IS_WARNING(report->flags)) - error.Append(" Error was suppressed by event handler\n"); + fprintf(stderr, "%s\n", error.get()); fflush(stderr); #endif @@ -1331,6 +1367,9 @@ jsval val; + rv = sSecurityManager->PushContextPrincipal(mContext, nsnull, principal); + NS_ENSURE_SUCCESS(rv, rv); + nsJSContext::TerminationFuncHolder holder(this); // SecurityManager said "ok", but don't compile if aVersion is unknown. @@ -1379,6 +1418,8 @@ } } + sSecurityManager->PopContextPrincipal(mContext); + // Pop here, after JS_ValueToString and any other possible evaluation. if (NS_FAILED(stack->Pop(nsnull))) rv = NS_ERROR_FAILURE; @@ -1511,6 +1552,9 @@ // execution on any thread. jsval val; + rv = sSecurityManager->PushContextPrincipal(mContext, nsnull, principal); + NS_ENSURE_SUCCESS(rv, rv); + nsJSContext::TerminationFuncHolder holder(this); // SecurityManager said "ok", but don't compile if aVersion is unknown. @@ -1556,6 +1600,8 @@ } } + sSecurityManager->PopContextPrincipal(mContext); + // Pop here, after JS_ValueToString and any other possible evaluation. if (NS_FAILED(stack->Pop(nsnull))) rv = NS_ERROR_FAILURE; @@ -1672,12 +1718,20 @@ jsval val; JSBool ok; + JSObject *scriptObj = (JSObject*)aScriptObject; + nsCOMPtr principal; + + rv = sSecurityManager->GetObjectPrincipal(mContext, scriptObj, getter_AddRefs(principal)); + NS_ENSURE_SUCCESS(rv, rv); + + rv = sSecurityManager->PushContextPrincipal(mContext, nsnull, principal); + NS_ENSURE_SUCCESS(rv, rv); + nsJSContext::TerminationFuncHolder holder(this); JSAutoRequest ar(mContext); ok = ::JS_ExecuteScript(mContext, (JSObject *)aScopeObject, - (JSScript*)::JS_GetPrivate(mContext, - (JSObject*)aScriptObject), + (JSScript*)::JS_GetPrivate(mContext, scriptObj), &val); if (ok) { @@ -1699,6 +1753,8 @@ nsContentUtils::NotifyXPCIfExceptionPending(mContext); } + sSecurityManager->PopContextPrincipal(mContext); + // Pop here, after JS_ValueToString and any other possible evaluation. if (NS_FAILED(stack->Pop(nsnull))) rv = NS_ERROR_FAILURE; --- xulrunner-1.9.0.19.orig/dom/src/base/nsDOMWindowUtils.cpp +++ xulrunner-1.9.0.19/dom/src/base/nsDOMWindowUtils.cpp @@ -55,6 +55,12 @@ #include "nsIParser.h" #include "nsJSEnvironment.h" +#include "nsICSSLoader.h" +#include "nsICSSParser.h" +#include "nsICSSStyleSheet.h" +#include "nsUnicharInputStream.h" +#include "nsNetUtil.h" + #ifdef MOZ_ENABLE_GTK2 #include #endif @@ -63,6 +69,7 @@ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMWindowUtils) NS_INTERFACE_MAP_ENTRY(nsIDOMWindowUtils) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) + NS_INTERFACE_MAP_ENTRY(nsIDOMWindowUtils_1_9) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WindowUtils) NS_INTERFACE_MAP_END @@ -367,3 +374,65 @@ return NS_OK; } + +NS_IMETHODIMP +nsDOMWindowUtils::CssInitialSyntaxIsValid(const nsAString& aSheet, + PRBool *aRetVal) +{ + PRBool hasCap = PR_FALSE; + if (NS_FAILED(nsContentUtils::GetSecurityManager()-> + IsCapabilityEnabled("UniversalXPConnect", &hasCap)) || !hasCap) + return NS_ERROR_DOM_SECURITY_ERR; + + nsCOMPtr stream; + nsresult rv = nsSimpleUnicharStreamFactory::GetInstance()-> + CreateInstanceFromString(aSheet, getter_AddRefs(stream)); + NS_ENSURE_SUCCESS(rv, rv); + + nsCOMPtr uri; + nsCAutoString uriContents("data:text/css,"); + AppendUTF16toUTF8(aSheet, uriContents); + rv = NS_NewURI(getter_AddRefs(uri), uriContents.get()); + NS_ENSURE_SUCCESS(rv, rv); + + nsCOMPtr principal; + rv = nsContentUtils::GetSecurityManager()-> + GetCodebasePrincipal(uri, getter_AddRefs(principal)); + NS_ENSURE_SUCCESS(rv, rv); + + nsCOMPtr parsedSheet; + rv = NS_NewCSSStyleSheet(getter_AddRefs(parsedSheet)); + NS_ENSURE_SUCCESS(rv, rv); + parsedSheet->SetURIs(uri, uri, uri); + parsedSheet->SetPrincipal(principal); + + nsCOMPtr loader; + rv = NS_NewCSSLoader(getter_AddRefs(loader)); + NS_ENSURE_SUCCESS(rv, rv); + loader->SetCompatibilityMode(eCompatibility_NavQuirks); + + nsCOMPtr parser; + rv = loader->GetParserFor(parsedSheet, getter_AddRefs(parser)); + NS_ENSURE_SUCCESS(rv, rv); + + nsCOMPtr pext(do_QueryInterface(parser)); + NS_ABORT_IF_FALSE(pext, "nsICSSParser_1_9 missing from parser impl"); + + rv = pext->ParseWithInitialSyntaxCheck(stream, uri, uri, principal, 0, + PR_FALSE); + loader->RecycleParser(parser); + + // In CheckInitialSyntax mode, the parser will return + // NS_ERROR_DOM_SYNTAX_ERR when the sheet has been rejected. + if (rv == NS_OK) { + *aRetVal = PR_TRUE; + return NS_OK; + } else if (rv == NS_ERROR_DOM_SYNTAX_ERR) { + *aRetVal = PR_FALSE; + return NS_OK; + } else { + NS_ABORT_IF_FALSE(NS_FAILED(rv), + "CSS parser produced a success code other than NS_OK?!"); + return rv; + } +} --- xulrunner-1.9.0.19.orig/dom/src/base/nsDOMWindowUtils.h +++ xulrunner-1.9.0.19/dom/src/base/nsDOMWindowUtils.h @@ -43,13 +43,15 @@ class nsGlobalWindow; class nsDOMWindowUtils : public nsIDOMWindowUtils, - public nsSupportsWeakReference + public nsSupportsWeakReference, + public nsIDOMWindowUtils_1_9 { public: nsDOMWindowUtils(nsGlobalWindow *aWindow); ~nsDOMWindowUtils(); NS_DECL_ISUPPORTS NS_DECL_NSIDOMWINDOWUTILS + NS_DECL_NSIDOMWINDOWUTILS_1_9 protected: nsRefPtr mWindow; --- xulrunner-1.9.0.19.orig/dom/src/base/nsPluginArray.cpp +++ xulrunner-1.9.0.19/dom/src/base/nsPluginArray.cpp @@ -181,11 +181,18 @@ } void -nsPluginArray::SetDocShell(nsIDocShell* aDocShell) +nsPluginArray::SetDocShell(nsIDocShell *aDocShell) { mDocShell = aDocShell; } +void +nsPluginArray::Invalidate() +{ + mDocShell = nsnull; + mNavigator = nsnull; +} + NS_IMETHODIMP nsPluginArray::Refresh(PRBool aReloadDocuments) { --- xulrunner-1.9.0.19.orig/dom/src/base/Makefile.in +++ xulrunner-1.9.0.19/dom/src/base/Makefile.in @@ -145,3 +145,7 @@ endif include $(topsrcdir)/config/rules.mk + +LOCAL_INCLUDES += \ + -I$(topsrcdir)/xpcom/io \ + $(NULL) --- xulrunner-1.9.0.19.orig/dom/src/base/nsPluginArray.h +++ xulrunner-1.9.0.19/dom/src/base/nsPluginArray.h @@ -69,7 +69,8 @@ PRBool AllowPlugins(); public: - void SetDocShell(nsIDocShell* aDocShell); + void SetDocShell(nsIDocShell *aDocShell); + void Invalidate(); protected: nsNavigator* mNavigator; --- xulrunner-1.9.0.19.orig/dom/src/base/nsDOMClassInfo.cpp +++ xulrunner-1.9.0.19/dom/src/base/nsDOMClassInfo.cpp @@ -602,8 +602,7 @@ DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(DOMException, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) - NS_DEFINE_CLASSINFO_DATA(DocumentFragment, nsDOMGenericSH, - DOM_DEFAULT_SCRIPTABLE_FLAGS) + NS_DEFINE_CLASSINFO_DATA(DocumentFragment, nsNodeSH, NODE_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(Element, nsElementSH, ELEMENT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(Attr, nsAttributeSH, @@ -1890,6 +1889,7 @@ DOM_CLASSINFO_MAP_BEGIN(WindowUtils, nsIDOMWindowUtils) DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowUtils) + DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowUtils_1_9) DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_BEGIN(Location, nsIDOMLocation) --- xulrunner-1.9.0.19.orig/dom/src/base/nsMimeTypeArray.cpp +++ xulrunner-1.9.0.19/dom/src/base/nsMimeTypeArray.cpp @@ -1,4 +1,5 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=2 sw=2 et tw=79: */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -198,6 +199,10 @@ NS_PRECONDITION(!mMimeTypeArray && mMimeTypeCount==0, "already initialized"); + if (!mNavigator) { + return NS_ERROR_NOT_AVAILABLE; + } + nsIDOMPluginArray* pluginArray = nsnull; nsresult rv = mNavigator->GetPlugins(&pluginArray); if (rv == NS_OK) { --- xulrunner-1.9.0.19.orig/netwerk/base/public/nsNetUtil.h +++ xulrunner-1.9.0.19/netwerk/base/public/nsNetUtil.h @@ -47,8 +47,10 @@ #include "nsMemory.h" #include "nsCOMPtr.h" #include "prio.h" // for read/write flags, permissions, etc. - +#include "plstr.h" #include "nsIURI.h" +#include "nsIURLParser.h" +#include "nsIUUIDGenerator.h" #include "nsIInputStream.h" #include "nsIOutputStream.h" #include "nsISafeOutputStream.h" @@ -1455,4 +1457,81 @@ return channel->GetOriginalURI(uri); } +/** + * Helper function to create a random URL string that's properly formed + * but guaranteed to be invalid. + */ +#define NS_FAKE_SCHEME "http://" +#define NS_FAKE_TLD ".invalid" +inline nsresult +NS_MakeRandomInvalidURLString(nsCString& result) +{ + nsresult rv; + nsCOMPtr uuidgen = + do_GetService("@mozilla.org/uuid-generator;1", &rv); + NS_ENSURE_SUCCESS(rv, rv); + + nsID idee; + rv = uuidgen->GenerateUUIDInPlace(&idee); + NS_ENSURE_SUCCESS(rv, rv); + + char chars[NSID_LENGTH]; + idee.ToProvidedString(chars); + + result.AssignLiteral(NS_FAKE_SCHEME); + // Strip off the '{' and '}' at the beginning and end of the UUID + result.Append(chars + 1, NSID_LENGTH - 3); + result.AppendLiteral(NS_FAKE_TLD); + + return NS_OK; +} +#undef NS_FAKE_SCHEME +#undef NS_FAKE_TLD + +/** + * Helper function to determine whether urlString is Java-compatible -- + * whether it can be passed to the Java URL(String) constructor without the + * latter throwing a MalformedURLException, or without Java otherwise + * mishandling it. + */ +inline nsresult +NS_CheckIsJavaCompatibleURLString(nsCString& urlString, PRBool *result) +{ + *result = PR_FALSE; // Default to "no" + + nsresult rv = NS_OK; + nsCOMPtr urlParser = + do_GetService(NS_STDURLPARSER_CONTRACTID, &rv); + if (NS_FAILED(rv) || !urlParser) + return NS_ERROR_FAILURE; + + PRBool compatible = PR_TRUE; + PRUint32 schemePos = 0; + PRInt32 schemeLen = 0; + urlParser->ParseURL(urlString.get(), -1, &schemePos, &schemeLen, + nsnull, nsnull, nsnull, nsnull); + if (schemeLen != -1) { + nsCString scheme; + scheme.Assign(urlString.get() + schemePos, schemeLen); + // By default Java only understands a small number of URL schemes, and of + // these only some are likely to represent user input (for example from a + // link or the location bar) that Java can legitimately be expected to + // handle. (Besides those listed below, Java also understands the "jar", + // "mailto" and "netdoc" schemes. But it probably doesn't expect these + // from a browser, and is therefore likely to mishandle them.) + if (PL_strcasecmp(scheme.get(), "http") && + PL_strcasecmp(scheme.get(), "https") && + PL_strcasecmp(scheme.get(), "file") && + PL_strcasecmp(scheme.get(), "ftp") && + PL_strcasecmp(scheme.get(), "gopher")) + compatible = PR_FALSE; + } else { + compatible = PR_FALSE; + } + + *result = compatible; + + return NS_OK; +} + #endif // !nsNetUtil_h__ --- xulrunner-1.9.0.19.orig/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ xulrunner-1.9.0.19/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -48,6 +48,7 @@ #include "nsCRT.h" #include "nsIHttpChannelInternal.h" #include "nsURLHelper.h" +#include "nsIStreamConverterService.h" // // Helper function for determining the length of data bytes up to @@ -67,7 +68,10 @@ return len; } -nsPartChannel::nsPartChannel(nsIChannel *aMultipartChannel, PRUint32 aPartID) : +nsPartChannel::nsPartChannel(nsIChannel *aMultipartChannel, PRUint32 aPartID, + nsIStreamListener* aListener) : + mMultipartChannel(aMultipartChannel), + mListener(aListener), mStatus(NS_OK), mContentLength(LL_MAXUINT), mIsByteRangeRequest(PR_FALSE), @@ -96,6 +100,26 @@ mByteRangeEnd = aEnd; } +nsresult nsPartChannel::SendOnStartRequest(nsISupports* aContext) +{ + return mListener->OnStartRequest(this, aContext); +} + +nsresult nsPartChannel::SendOnDataAvailable(nsISupports* aContext, + nsIInputStream* aStream, + PRUint32 aOffset, PRUint32 aLen) +{ + return mListener->OnDataAvailable(this, aContext, aStream, aOffset, aLen); +} + +nsresult nsPartChannel::SendOnStopRequest(nsISupports* aContext, + nsresult aStatus) +{ + // Drop the listener + nsCOMPtr listener; + listener.swap(mListener); + return listener->OnStopRequest(this, aContext, aStatus); +} // // nsISupports implementation... @@ -734,15 +758,30 @@ nsMultiMixedConv::SendStart(nsIChannel *aChannel) { nsresult rv = NS_OK; - if (mContentType.IsEmpty()) + nsCOMPtr partListener(mFinalListener); + if (mContentType.IsEmpty()) { mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE); + nsCOMPtr serv = + do_GetService(NS_STREAMCONVERTERSERVICE_CONTRACTID, &rv); + if (NS_SUCCEEDED(rv)) { + nsCOMPtr converter; + rv = serv->AsyncConvertData(UNKNOWN_CONTENT_TYPE, + "*/*", + mFinalListener, + mContext, + getter_AddRefs(converter)); + if (NS_SUCCEEDED(rv)) { + partListener = converter; + } + } + } // if we already have an mPartChannel, that means we never sent a Stop() // before starting up another "part." that would be bad. NS_ASSERTION(!mPartChannel, "tisk tisk, shouldn't be overwriting a channel"); nsPartChannel *newChannel; - newChannel = new nsPartChannel(aChannel, mCurrentPartID++); + newChannel = new nsPartChannel(aChannel, mCurrentPartID++, partListener); if (!newChannel) return NS_ERROR_OUT_OF_MEMORY; @@ -780,7 +819,7 @@ // Let's start off the load. NOTE: we don't forward on the channel passed // into our OnDataAvailable() as it's the root channel for the raw stream. - return mFinalListener->OnStartRequest(mPartChannel, mContext); + return mPartChannel->SendOnStartRequest(mContext); } @@ -789,7 +828,7 @@ nsresult rv = NS_OK; if (mPartChannel) { - rv = mFinalListener->OnStopRequest(mPartChannel, mContext, aStatus); + rv = mPartChannel->SendOnStopRequest(mContext, aStatus); // don't check for failure here, we need to remove the channel from // the loadgroup. @@ -836,7 +875,7 @@ nsCOMPtr inStream(do_QueryInterface(ss, &rv)); if (NS_FAILED(rv)) return rv; - return mFinalListener->OnDataAvailable(mPartChannel, mContext, inStream, offset, aLen); + return mPartChannel->SendOnDataAvailable(mContext, inStream, offset, aLen); } PRInt32 --- xulrunner-1.9.0.19.orig/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp +++ xulrunner-1.9.0.19/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp @@ -37,6 +37,7 @@ #include "nsTXTToHTMLConv.h" #include "nsNetUtil.h" +#include "nsEscape.h" #include "nsStringStream.h" #include "nsAutoPtr.h" @@ -315,11 +316,24 @@ nsString linkText; // href is implied mBuffer.Mid(linkText, front, back-front); + mBuffer.Insert(NS_LITERAL_STRING("modText, cursor); - cursor += modLen-front+back; + cursor += modLen; + } + + NS_ConvertUTF16toUTF8 linkTextUTF8(linkText); + nsCString escaped; + if (NS_EscapeURL(linkTextUTF8.Data(), linkTextUTF8.Length(), esc_Minimal, escaped)) { + mBuffer.Cut(cursor, back - front); + CopyUTF8toUTF16(escaped, linkText); + mBuffer.Insert(linkText, cursor); + back = front + linkText.Length(); + } + + cursor += back-front; mBuffer.Insert(NS_LITERAL_STRING("\">"), cursor); cursor += 2; mBuffer.Insert(linkText, cursor); --- xulrunner-1.9.0.19.orig/netwerk/streamconv/converters/nsMultiMixedConv.h +++ xulrunner-1.9.0.19/netwerk/streamconv/converters/nsMultiMixedConv.h @@ -68,10 +68,15 @@ public nsIMultiPartChannel { public: - nsPartChannel(nsIChannel *aMultipartChannel, PRUint32 aPartID); + nsPartChannel(nsIChannel *aMultipartChannel, PRUint32 aPartID, + nsIStreamListener* aListener); void InitializeByteRange(PRInt64 aStart, PRInt64 aEnd); void SetIsLastPart() { mIsLastPart = PR_TRUE; } + nsresult SendOnStartRequest(nsISupports* aContext); + nsresult SendOnDataAvailable(nsISupports* aContext, nsIInputStream* aStream, + PRUint32 aOffset, PRUint32 aLen); + nsresult SendOnStopRequest(nsISupports* aContext, nsresult aStatus); NS_DECL_ISUPPORTS NS_DECL_NSIREQUEST @@ -84,6 +89,7 @@ protected: nsCOMPtr mMultipartChannel; + nsCOMPtr mListener; nsresult mStatus; nsLoadFlags mLoadFlags; --- xulrunner-1.9.0.19.orig/netwerk/test/unit/test_multipart_streamconv.js +++ xulrunner-1.9.0.19/netwerk/test/unit/test_multipart_streamconv.js @@ -0,0 +1,93 @@ +do_load_httpd_js(); + +var httpserver = null; +var uri = "http://localhost:4444/multipart"; + +function make_channel(url) { + var ios = Cc["@mozilla.org/network/io-service;1"]. + getService(Ci.nsIIOService); + return ios.newChannel(url, "", null); +} + +var multipartBody = "--boundary\r\n\r\nSome text\r\n--boundary\r\n\r\n\r\n--boundary--"; + +function make_channel(url) { + var ios = Cc["@mozilla.org/network/io-service;1"]. + getService(Ci.nsIIOService); + return ios.newChannel(url, "", null); +} + +function contentHandler(metadata, response) +{ + response.setHeader("Content-Type", 'multipart/mixed; boundary="boundary"'); + response.bodyOutputStream.write(multipartBody, multipartBody.length); +} + +var numTests = 2; +var testNum = 0; + +var testData = + [ + { data: "Some text", type: "text/plain" }, + { data: "", type: "text/xml" } + ]; + +function responseHandler(request, buffer) +{ + do_check_eq(buffer, testData[testNum].data); + do_check_eq(request.QueryInterface(Ci.nsIChannel).contentType, + testData[testNum].type); + if (++testNum == numTests) + httpserver.stop(do_test_finished); +} + +var multipartListener = { + _buffer: "", + + QueryInterface: function(iid) { + if (iid.equals(Components.interfaces.nsIStreamListener) || + iid.equals(Components.interfaces.nsIRequestObserver) || + iid.equals(Components.interfaces.nsISupports)) + return this; + throw Components.results.NS_ERROR_NO_INTERFACE; + }, + + onStartRequest: function(request, context) { + this._buffer = ""; + }, + + onDataAvailable: function(request, context, stream, offset, count) { + try { + this._buffer = this._buffer.concat(read_stream(stream, count)); + dump("BUFFEEE: " + this._buffer + "\n\n"); + } catch (ex) { + do_throw("Error in onDataAvailable: " + ex); + } + }, + + onStopRequest: function(request, context, status) { + try { + responseHandler(request, this._buffer); + } catch (ex) { + do_throw("Error in closure function: " + ex); + } + } +}; + +function run_test() +{ + httpserver = new nsHttpServer(); + httpserver.registerPathHandler("/multipart", contentHandler); + httpserver.start(4444); + + var streamConv = Cc["@mozilla.org/streamConverters;1"] + .getService(Ci.nsIStreamConverterService); + var conv = streamConv.asyncConvertData("multipart/mixed", + "*/*", + multipartListener, + null); + + var chan = make_channel(uri); + chan.asyncOpen(conv, null); + do_test_pending(); +} --- xulrunner-1.9.0.19.orig/netwerk/cookie/src/Makefile.in +++ xulrunner-1.9.0.19/netwerk/cookie/src/Makefile.in @@ -60,5 +60,4 @@ include $(topsrcdir)/config/rules.mk -CXXFLAGS += $(WARNINGS_AS_ERRORS) DEFINES += -DIMPL_NS_NET --- xulrunner-1.9.0.19.orig/netwerk/protocol/http/src/nsHttpChannel.cpp +++ xulrunner-1.9.0.19/netwerk/protocol/http/src/nsHttpChannel.cpp @@ -836,6 +836,7 @@ LOG(("Cancelling failed SSL proxy connection [this=%x httpStatus=%u]\n", this, httpStatus)); Cancel(rv); + CallOnStartRequest(); return rv; } --- xulrunner-1.9.0.19.orig/browser/app/mozilla.in +++ xulrunner-1.9.0.19/browser/app/mozilla.in @@ -135,8 +135,5 @@ then echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@" fi -"$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@" -exitcode=$? - -exit $exitcode +exec "$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@" # EOF. --- xulrunner-1.9.0.19.orig/gfx/thebes/src/gfxWindowsFonts.cpp +++ xulrunner-1.9.0.19/gfx/thebes/src/gfxWindowsFonts.cpp @@ -970,9 +970,9 @@ nsAutoString utf16; AppendASCIItoUTF16(cString, utf16); if (isComplex) { - InitTextRunUniscribe(aParams->mContext, textRun, utf16.get(), aLength); + InitTextRunUniscribe(aParams->mContext, textRun, utf16.get(), utf16.Length()); } else { - InitTextRunGDI(aParams->mContext, textRun, utf16.get(), aLength); + InitTextRunGDI(aParams->mContext, textRun, utf16.get(), utf16.Length()); } } @@ -2000,9 +2000,13 @@ }; -#define MAX_ITEM_LENGTH 32768 - +// This is _slightly less_ than half of the maximum analysis window +// we use with ScriptBreak, so that in typical cases we end up re-processing +// only a small amount of overlap when we move the analysis window forward. +#define MAX_ITEM_LENGTH 32499 +// Limit length of text passed to Uniscribe APIs, to avoid failure there. +#define MAX_UNISCRIBE_LENGTH 65000 static PRUint32 FindNextItemStart(int aOffset, int aLimit, nsTArray &aLogAttr, @@ -2065,28 +2069,53 @@ nsresult CopyItemSplitOversize(int aIndex, nsTArray &aDest) { aDest.AppendElement(mItems[aIndex]); const int itemLength = mItems[aIndex+1].iCharPos - mItems[aIndex].iCharPos; - if (ESTIMATE_MAX_GLYPHS(itemLength) > 65535) { + if (ESTIMATE_MAX_GLYPHS(itemLength) > MAX_UNISCRIBE_LENGTH) { // This items length would cause ScriptShape() to fail. We need to // add extra items here so that no item's length could cause the fail. // Get cluster boundaries, so we can break cleanly if possible. nsTArray logAttr; - if (!logAttr.SetLength(itemLength)) - return NS_ERROR_FAILURE; - HRESULT rv= ScriptBreak(mString+mItems[aIndex].iCharPos, itemLength, - &mItems[aIndex].a, logAttr.Elements()); - if (FAILED(rv)) - return NS_ERROR_FAILURE; const int nextItemStart = mItems[aIndex+1].iCharPos; - int start = FindNextItemStart(mItems[aIndex].iCharPos, - nextItemStart, logAttr, mString); + int start = mItems[aIndex].iCharPos; while (start < nextItemStart) { - SCRIPT_ITEM item = mItems[aIndex]; - item.iCharPos = start; - aDest.AppendElement(item); - start = FindNextItemStart(start, nextItemStart, logAttr, mString); + // ScriptBreak will fail for strings longer than 64K, + // so we do the analysis using a "sliding window" over the + // huge item. + int analysisLen = PR_MIN(nextItemStart - start, + MAX_UNISCRIBE_LENGTH); + if (!logAttr.SetLength(analysisLen)) { + return NS_ERROR_FAILURE; + } + HRESULT rv = ScriptBreak(mString + start, + analysisLen, + &mItems[aIndex].a, + logAttr.Elements()); + if (FAILED(rv)) { + return NS_ERROR_FAILURE; + } + + int analysisLimit = start + analysisLen; + start = FindNextItemStart(start, analysisLimit, + logAttr, mString); + int prevStart = start; + while (start < analysisLimit) { + SCRIPT_ITEM item = mItems[aIndex]; + item.iCharPos = start; + aDest.AppendElement(item); + prevStart = start; + start = FindNextItemStart(start, analysisLimit, + logAttr, mString); + } + + // If the analysis window didn't reach the end of the entire + // original item, reset start so that the final (perhaps + // badly-terminated) item we just created will be merged with + // the following section of the text. + if (start < nextItemStart) { + start = prevStart; + } } } return NS_OK; @@ -2115,7 +2144,7 @@ Init(); } - if (ESTIMATE_MAX_GLYPHS(mLength) > 65535) { + if (ESTIMATE_MAX_GLYPHS(mLength) > MAX_UNISCRIBE_LENGTH) { // Any item of length > 43680 will cause ScriptShape() to fail, as its // mMaxGlyphs value will be greater than 65535 (43680*1.5+16>65535). So we // need to break up items which are longer than that upon cluster boundaries. --- xulrunner-1.9.0.19.orig/config/config.mk +++ xulrunner-1.9.0.19/config/config.mk @@ -508,7 +508,7 @@ JAVA_DIST_DIR = $(DEPTH)/$(JAVA_GEN_DIR) JAVA_IFACES_PKG_NAME = org/mozilla/interfaces -REQ_INCLUDES = -I$(srcdir) -I. $(foreach d,$(REQUIRES),-I$(DIST)/include/$d) -I$(DIST)/include +REQ_INCLUDES = $(foreach d,$(REQUIRES),-I$(DIST)/include/$d) -I$(DIST)/include ifdef LIBXUL_SDK REQ_INCLUDES_SDK = $(foreach d,$(REQUIRES),-I$(LIBXUL_SDK)/include/$d) -I$(LIBXUL_SDK)/include endif --- xulrunner-1.9.0.19.orig/config/rules.mk +++ xulrunner-1.9.0.19/config/rules.mk @@ -155,6 +155,18 @@ SHARED_LIBRARY := $(DLL_PREFIX)$(LIBRARY_NAME)$(DLL_SUFFIX) endif +ifdef SO_VERSION +UNVERSIONED_LIBRARY := $(notdir $(SHARED_LIBRARY)) + +ifeq ($(strip $(SHARED_LIBRARY)),$(strip $(SDK_LIBRARY))) +SDK_LIBRARY := $(SHARED_LIBRARY) +endif + +SHARED_LIBRARY := $(SHARED_LIBRARY).$(SO_VERSION) + +MKSHLINKS = rm -f $(1)/$(UNVERSIONED_LIBRARY); ln -s $(SHARED_LIBRARY) $(1)/$(UNVERSIONED_LIBRARY) +endif + ifeq ($(OS_ARCH),OS2) DEF_FILE := $(SHARED_LIBRARY:.dll=.def) endif @@ -264,7 +276,7 @@ endif ifndef TARGETS -TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(JAVA_LIBRARY) +TARGETS = $(LIBRARY) $(UNVERSIONED_LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(JAVA_LIBRARY) endif ifndef OBJS @@ -482,15 +494,6 @@ endif endif -ifeq ($(OS_ARCH),Linux) -ifneq (,$(filter mips mipsel,$(OS_TEST))) -ifeq ($(MODULE),layout) -OS_CFLAGS += -Wa,-xgot -OS_CXXFLAGS += -Wa,-xgot -endif -endif -endif - # # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag # which uses internal symbols first @@ -541,6 +544,14 @@ endif # +# GNU doesn't have path length limitation +# + +ifeq ($(OS_ARCH),GNU) +OS_CPPFLAGS += -DPATH_MAX=1024 -DMAXPATHLEN=1024 +endif + +# # MINGW32 # ifeq ($(OS_ARCH),WINNT) @@ -717,7 +728,7 @@ DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)) ############################################## -libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY) +libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(UNVERSIONED_LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY) ifndef NO_DIST_INSTALL ifdef LIBRARY ifdef EXPORT_LIBRARY # Stage libs that will be linked into a static build @@ -747,8 +758,10 @@ $(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib else $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib + $(call MKSHLINKS,$(DIST)/lib) endif $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET) + $(call MKSHLINKS,$(FINAL_TARGET)) ifdef BEOS_ADDON_WORKAROUND ( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) ) endif @@ -945,7 +958,7 @@ ifeq ($(CPP_PROG_LINK),1) $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS) else - $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS) + $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS) $(PROG_LIBS) endif # CPP_PROG_LINK endif # WINNT && !GNU_CC endif # OS/2 VACPP @@ -1101,6 +1114,8 @@ # so instead of deleting .o files after repacking them into a dylib, we make # symlinks back to the originals. The symlinks are a no-op for stabs debugging, # so no need to conditionalize on OS version or debugging format. +$(UNVERSIONED_LIBRARY): $(SHARED_LIBRARY) + $(call MKSHLINKS,.) $(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) Makefile Makefile.in ifndef INCREMENTAL_LINKER --- xulrunner-1.9.0.19.orig/config/autoconf.mk.in +++ xulrunner-1.9.0.19/config/autoconf.mk.in @@ -58,14 +58,14 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ -includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +includedir = @includedir@/$(MOZ_APP_NAME)-1.9 libdir = @libdir@ datadir = @datadir@ mandir = @mandir@ -idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +idldir = $(datadir)/idl/$(MOZ_APP_NAME)-1.9 -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME)-1.9 +sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-1.9 DIST = $(DEPTH)/dist LIBXUL_SDK = @LIBXUL_SDK@ @@ -87,6 +87,9 @@ MOZ_X11 = @MOZ_X11@ MOZ_JS_LIBS = @MOZ_JS_LIBS@ +ENABLE_JS_BINARY = @ENABLE_JS_BINARY@ +HAVE_READLINE = @HAVE_READLINE@ +READLINE_LIBS = @READLINE_LIBS@ MOZ_DEBUG = @MOZ_DEBUG@ MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@ @@ -220,6 +223,7 @@ MOZ_NATIVE_BZ2 = @SYSTEM_BZ2@ MOZ_NATIVE_JPEG = @SYSTEM_JPEG@ MOZ_NATIVE_PNG = @SYSTEM_PNG@ +APNG = @APNG@ MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@ MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@ @@ -270,6 +274,8 @@ CROSS_COMPILE = @CROSS_COMPILE@ +WCHAR_CFLAGS = @WCHAR_CFLAGS@ + OS_CPPFLAGS = @CPPFLAGS@ OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@ OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@ --- xulrunner-1.9.0.19.orig/xpfe/appshell/src/Makefile.in +++ xulrunner-1.9.0.19/xpfe/appshell/src/Makefile.in @@ -86,7 +86,6 @@ nsAppShellWindowEnumerator.cpp \ nsWebShellWindow.cpp \ nsWindowMediator.cpp \ - nsAbout.cpp \ nsAppShellFactory.cpp \ $(NULL) --- xulrunner-1.9.0.19.orig/xpfe/appshell/src/nsAppShellFactory.cpp +++ xulrunner-1.9.0.19/xpfe/appshell/src/nsAppShellFactory.cpp @@ -40,7 +40,6 @@ #include "nscore.h" #include "nsIComponentManager.h" #include "nsIWindowMediator.h" -#include "nsAbout.h" #include "nsIGenericFactory.h" #include "nsIAppShellService.h" @@ -63,11 +62,6 @@ NS_WINDOWMEDIATOR_CID, NS_WINDOWMEDIATOR_CONTRACTID, nsWindowMediatorConstructor, - }, - { "kAboutModuleCID", - NS_ABOUT_CID, - NS_ABOUT_MODULE_CONTRACTID_PREFIX, - nsAbout::Create, } }; --- xulrunner-1.9.0.19.orig/xpfe/components/intl/nsCharsetMenu.cpp +++ xulrunner-1.9.0.19/xpfe/components/intl/nsCharsetMenu.cpp @@ -1252,6 +1252,10 @@ NS_TIMELINE_START_TIMER("nsCharsetMenu::InitMoreSubmenus"); nsresult res = NS_OK; + + // remove charsets "not for browser" + res = RemoveFlaggedCharsets(aDecs, NS_LITERAL_STRING(".notForBrowser")); + if (NS_FAILED(res)) return res; nsCOMPtr container1; nsCOMPtr container2; --- xulrunner-1.9.0.19.orig/testing/crashtest/crashtests.list +++ xulrunner-1.9.0.19/testing/crashtest/crashtests.list @@ -25,6 +25,7 @@ include ../../editor/libeditor/html/crashtests/crashtests.list include ../../editor/libeditor/base/crashtests/crashtests.list +include ../../editor/libeditor/text/crashtests/crashtests.list include ../../editor/composer/src/crashtests/crashtests.list include ../../intl/lwbrk/src/crashtests/crashtests.list --- xulrunner-1.9.0.19.orig/parser/htmlparser/public/nsIFragmentContentSink.h +++ xulrunner-1.9.0.19/parser/htmlparser/public/nsIFragmentContentSink.h @@ -46,6 +46,10 @@ { 0x1ecdb30d, 0x1f10, 0x45d2, \ { 0xa4, 0xf4, 0xec, 0xbc, 0x03, 0x52, 0x9a, 0x7e } } +#define NS_I_PARANOID_FRAGMENT_CONTENT_SINK_IID \ + { 0x86b5390d, 0xd80e, 0x4a86, \ + { 0x83, 0xec, 0xda, 0x44, 0xac, 0x5b, 0x8c, 0x5f } } + /** * The fragment sink allows a client to parse a fragment of sink, possibly * surrounded in context. Also see nsIParser::ParseFragment(). @@ -102,6 +106,28 @@ NS_I_FRAGMENT_CONTENT_SINK_IID) /** + * This interface is implemented by paranoid content sinks, and allows consumers + * to add tags and attributes to the default white-list set. + */ +class nsIParanoidFragmentContentSink : public nsISupports { +public: + NS_DECLARE_STATIC_IID_ACCESSOR(NS_I_PARANOID_FRAGMENT_CONTENT_SINK_IID) + + /** + * Allow the content sink to accept style elements and attributes. + */ + virtual void AllowStyles() = 0; + + /** + * Allow the content sink to accept comments. + */ + virtual void AllowComments() = 0; +}; + +NS_DEFINE_STATIC_IID_ACCESSOR(nsIParanoidFragmentContentSink, + NS_I_PARANOID_FRAGMENT_CONTENT_SINK_IID) + +/** * Base version takes string nested in context, content surrounded by * WillBuildContent()/DidBuildContent() calls. The 2nd version just loads * the whole string. @@ -111,11 +137,15 @@ #define NS_HTMLFRAGMENTSINK2_CONTRACTID "@mozilla.org/layout/htmlfragmentsink;2" #define NS_HTMLPARANOIDFRAGMENTSINK_CONTRACTID \ "@mozilla.org/htmlparanoidfragmentsink;1" +#define NS_HTMLPARANOIDFRAGMENTSINK2_CONTRACTID \ +"@mozilla.org/htmlparanoidfragmentsink;2" #define NS_XMLFRAGMENTSINK_CONTRACTID "@mozilla.org/layout/xmlfragmentsink;1" #define NS_XMLFRAGMENTSINK2_CONTRACTID "@mozilla.org/layout/xmlfragmentsink;2" #define NS_XHTMLPARANOIDFRAGMENTSINK_CONTRACTID \ "@mozilla.org/xhtmlparanoidfragmentsink;1" +#define NS_XHTMLPARANOIDFRAGMENTSINK2_CONTRACTID \ +"@mozilla.org/xhtmlparanoidfragmentsink;2" // the HTML versions are in nsHTMLParts.h @@ -128,6 +158,8 @@ // in nsContentSink.h nsresult NS_NewXHTMLParanoidFragmentSink(nsIFragmentContentSink** aInstancePtrResult); +nsresult +NS_NewXHTMLParanoidFragmentSink2(nsIFragmentContentSink** aInstancePtrResult); void NS_XHTMLParanoidFragmentSinkShutdown(); #endif --- xulrunner-1.9.0.19.orig/parser/htmlparser/src/nsScanner.cpp +++ xulrunner-1.9.0.19/parser/htmlparser/src/nsScanner.cpp @@ -187,14 +187,22 @@ nsIUnicodeDecoder * decoder = nsnull; res = nsParser::GetCharsetConverterManager()-> - GetUnicodeDecoderRaw(mCharset.get(), &decoder); + GetUnicodeDecoderRaw(mCharset.get(), &decoder); + if (NS_FAILED(res)) + { + // GetUnicodeDecoderRaw can fail if the charset has the .isXSSVulnerable + // flag. Try to fallback to ISO-8859-1 + mCharset.AssignLiteral("ISO-8859-1"); + mCharsetSource = kCharsetFromWeakDocTypeDefault; + res = nsParser::GetCharsetConverterManager()-> + GetUnicodeDecoderRaw(mCharset.get(), &decoder); + } if(NS_SUCCEEDED(res) && (nsnull != decoder)) { NS_IF_RELEASE(mUnicodeDecoder); mUnicodeDecoder = decoder; } - return res; } --- xulrunner-1.9.0.19.orig/parser/xml/src/nsSAXXMLReader.cpp +++ xulrunner-1.9.0.19/parser/xml/src/nsSAXXMLReader.cpp @@ -627,11 +627,7 @@ TryChannelCharset(aChannel, charsetSource, charset); parser->SetDocumentCharset(charset, charsetSource); -#ifdef MOZILLA_1_8_BRANCH - rv = parser->Parse(mBaseURI, aObserver, PR_FALSE); -#else rv = parser->Parse(mBaseURI, aObserver); -#endif NS_ENSURE_SUCCESS(rv, rv); mListener = do_QueryInterface(parser, &rv); --- xulrunner-1.9.0.19.orig/layout/forms/nsIsIndexFrame.cpp +++ xulrunner-1.9.0.19/layout/forms/nsIsIndexFrame.cpp @@ -60,7 +60,6 @@ #include "nsIComponentManager.h" #include "nsHTMLParts.h" #include "nsLinebreakConverter.h" -#include "nsILinkHandler.h" #include "nsIHTMLDocument.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" @@ -348,8 +347,6 @@ // End ProcessAsURLEncoded // make the url string - nsILinkHandler *handler = aPresContext->GetLinkHandler(); - nsAutoString href; // Get the document. @@ -427,10 +424,9 @@ flatDocCharset.get(), baseURI); if (NS_FAILED(result)) return result; - // Now pass on absolute url to the click handler - if (handler) { - handler->OnLinkClick(mContent, uri, nsnull); - } + // Now pretend we're triggering a link + nsContentUtils::TriggerLink(mContent, aPresContext, uri, + EmptyString(), PR_TRUE, PR_TRUE); return result; } --- xulrunner-1.9.0.19.orig/layout/forms/nsComboboxControlFrame.cpp +++ xulrunner-1.9.0.19/layout/forms/nsComboboxControlFrame.cpp @@ -90,6 +90,7 @@ #include "nsDisplayList.h" #include "nsITheme.h" #include "nsThemeConstants.h" +#include "nsPLDOMEvent.h" NS_IMETHODIMP nsComboboxControlFrame::RedisplayTextEvent::Run() @@ -1485,18 +1486,9 @@ void nsComboboxControlFrame::FireValueChangeEvent() { // Fire ValueChange event to indicate data value of combo box has changed - nsCOMPtr event; - nsPresContext* presContext = PresContext(); - if (NS_SUCCEEDED(nsEventDispatcher::CreateEvent(presContext, nsnull, - NS_LITERAL_STRING("Events"), - getter_AddRefs(event)))) { - event->InitEvent(NS_LITERAL_STRING("ValueChange"), PR_TRUE, PR_TRUE); - - nsCOMPtr privateEvent(do_QueryInterface(event)); - privateEvent->SetTrusted(PR_TRUE); - nsEventDispatcher::DispatchDOMEvent(mContent, nsnull, event, nsnull, - nsnull); - } + nsCOMPtr node = do_QueryInterface(mContent); + nsContentUtils::AddScriptRunner(new nsPLDOMEvent(node, + NS_LITERAL_STRING("ValueChange"))); } void --- xulrunner-1.9.0.19.orig/layout/reftests/mathml/reftest.list +++ xulrunner-1.9.0.19/layout/reftests/mathml/reftest.list @@ -1,6 +1,7 @@ == mi-mathvariant-1.xhtml mi-mathvariant-1-ref.xhtml == mi-mathvariant-2.xhtml mi-mathvariant-2-ref.xhtml -== table-width-1.xhtml table-width-1-ref.xhtml -== overbar-width-1.xhtml overbar-width-1-ref.xhtml != non-spacing-accent-1.xhtml non-spacing-accent-1-ref.xhtml +== overbar-width-1.xhtml overbar-width-1-ref.xhtml +== quotes-1.xhtml quotes-1-ref.xhtml != stretchy-underbar-1.xhtml stretchy-underbar-1-ref.xhtml +== table-width-1.xhtml table-width-1-ref.xhtml --- xulrunner-1.9.0.19.orig/layout/reftests/mathml/quotes-1.xhtml +++ xulrunner-1.9.0.19/layout/reftests/mathml/quotes-1.xhtml @@ -0,0 +1,22 @@ + + +

:_

+

:_

+

:_

+

:_

+

:_

+ + + --- xulrunner-1.9.0.19.orig/layout/reftests/mathml/quotes-1-ref.xhtml +++ xulrunner-1.9.0.19/layout/reftests/mathml/quotes-1-ref.xhtml @@ -0,0 +1,9 @@ + + +

:L_R

+

:L_”

+

:“_R

+

:L_”

+

:“_R

+ + --- xulrunner-1.9.0.19.orig/layout/mathml/crashtests/476547-1.xhtml +++ xulrunner-1.9.0.19/layout/mathml/crashtests/476547-1.xhtml @@ -0,0 +1,5 @@ + + + + + --- xulrunner-1.9.0.19.orig/layout/mathml/crashtests/crashtests.list +++ xulrunner-1.9.0.19/layout/mathml/crashtests/crashtests.list @@ -41,3 +41,4 @@ load 420420-1.xhtml load 463763-1.xhtml load 463763-2.xhtml +load 476547-1.xhtml --- xulrunner-1.9.0.19.orig/layout/mathml/base/src/nsMathMLTokenFrame.h +++ xulrunner-1.9.0.19/layout/mathml/base/src/nsMathMLTokenFrame.h @@ -100,7 +100,7 @@ PRBool SetTextStyle(); // helper to set the quotes of - void SetQuotes(); + void SetQuotes(PRBool aNotify); }; #endif /* nsMathMLTokentFrame_h___ */ --- xulrunner-1.9.0.19.orig/layout/mathml/base/src/nsMathMLTokenFrame.cpp +++ xulrunner-1.9.0.19/layout/mathml/base/src/nsMathMLTokenFrame.cpp @@ -139,7 +139,7 @@ if (NS_FAILED(rv)) return rv; - SetQuotes(); + SetQuotes(PR_FALSE); ProcessTextData(); return rv; } @@ -259,7 +259,7 @@ { if (nsGkAtoms::lquote_ == aAttribute || nsGkAtoms::rquote_ == aAttribute) { - SetQuotes(); + SetQuotes(PR_TRUE); } return nsMathMLContainerFrame:: @@ -378,57 +378,44 @@ // So the main idea in this code is to see if there are lquote and // rquote attributes. If these are there, we ovewrite the default // quotes in the text frames. +// XXX this is somewhat bogus, we probably should map lquote and rquote +// to 'content' style rules // // But what if the mathml.css file wasn't loaded? // We also check that we are not relying on null pointers... static void -SetQuote(nsIFrame* aFrame, - nsString& aValue) +SetQuote(nsIFrame* aFrame, nsString& aValue, PRBool aNotify) { - nsIFrame* textFrame; - do { - // walk down the hierarchy of first children because they could be wrapped - textFrame = aFrame->GetFirstChild(nsnull); - if (textFrame) { - if (textFrame->GetType() == nsGkAtoms::textFrame) - break; - } - aFrame = textFrame; - } while (textFrame); - if (textFrame) { - nsIContent* quoteContent = textFrame->GetContent(); - if (quoteContent && quoteContent->IsNodeOfType(nsINode::eTEXT)) { - quoteContent->SetText(aValue, PR_FALSE); // no notify since we don't want a reflow yet - } - } + if (!aFrame) + return; + + nsIFrame* textFrame = aFrame->GetFirstChild(nsnull); + if (!textFrame) + return; + + nsIContent* quoteContent = textFrame->GetContent(); + if (!quoteContent->IsNodeOfType(nsINode::eTEXT)) + return; + + quoteContent->SetText(aValue, aNotify); } void -nsMathMLTokenFrame::SetQuotes() +nsMathMLTokenFrame::SetQuotes(PRBool aNotify) { if (mContent->Tag() != nsGkAtoms::ms_) return; - nsIFrame* rightFrame = nsnull; - nsIFrame* baseFrame = nsnull; - nsIFrame* leftFrame = mFrames.FirstChild(); - if (leftFrame) - baseFrame = leftFrame->GetNextSibling(); - if (baseFrame) - rightFrame = baseFrame->GetNextSibling(); - if (!leftFrame || !baseFrame || !rightFrame) - return; - nsAutoString value; // lquote if (GetAttribute(mContent, mPresentationData.mstyle, nsGkAtoms::lquote_, value)) { - SetQuote(leftFrame, value); + SetQuote(nsLayoutUtils::GetBeforeFrame(this), value, aNotify); } // rquote if (GetAttribute(mContent, mPresentationData.mstyle, nsGkAtoms::rquote_, value)) { - SetQuote(rightFrame, value); + SetQuote(nsLayoutUtils::GetAfterFrame(this), value, aNotify); } } --- xulrunner-1.9.0.19.orig/layout/build/nsLayoutModule.cpp +++ xulrunner-1.9.0.19/layout/build/nsLayoutModule.cpp @@ -100,6 +100,7 @@ #include "nsILanguageAtomService.h" #include "nsStyleSheetService.h" #include "nsXULPopupManager.h" +#include "nsIContentUtils.h" // Transformiix stuff #include "nsXPathEvaluator.h" @@ -499,9 +500,11 @@ MAKE_CTOR(CreateHTMLFragmentSink, nsIFragmentContentSink, NS_NewHTMLFragmentContentSink) MAKE_CTOR(CreateHTMLFragmentSink2, nsIFragmentContentSink, NS_NewHTMLFragmentContentSink2) MAKE_CTOR(CreateHTMLParanoidFragmentSink, nsIFragmentContentSink, NS_NewHTMLParanoidFragmentSink) +MAKE_CTOR(CreateHTMLParanoidFragmentSink2,nsIFragmentContentSink, NS_NewHTMLParanoidFragmentSink2) MAKE_CTOR(CreateXMLFragmentSink, nsIFragmentContentSink, NS_NewXMLFragmentContentSink) MAKE_CTOR(CreateXMLFragmentSink2, nsIFragmentContentSink, NS_NewXMLFragmentContentSink2) MAKE_CTOR(CreateXHTMLParanoidFragmentSink,nsIFragmentContentSink, NS_NewXHTMLParanoidFragmentSink) +MAKE_CTOR(CreateXHTMLParanoidFragmentSink2,nsIFragmentContentSink, NS_NewXHTMLParanoidFragmentSink2) MAKE_CTOR(CreateSanitizingHTMLSerializer, nsIContentSerializer, NS_NewSanitizingHTMLSerializer) MAKE_CTOR(CreateXBLService, nsIXBLService, NS_NewXBLService) MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy) @@ -530,6 +533,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSyncLoadService) MAKE_CTOR(CreatePluginDocument, nsIDocument, NS_NewPluginDocument) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsIContentUtils) + #ifdef MOZ_ENABLE_CANVAS MAKE_CTOR(CreateCanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D, NS_NewCanvasRenderingContext2D) #endif @@ -1117,6 +1122,11 @@ NS_HTMLPARANOIDFRAGMENTSINK_CONTRACTID, CreateHTMLParanoidFragmentSink }, + { "html paranoid fragment sink 2", + NS_HTMLPARANOIDFRAGMENTSINK2_CID, + NS_HTMLPARANOIDFRAGMENTSINK2_CONTRACTID, + CreateHTMLParanoidFragmentSink2 }, + { "HTML sanitizing content serializer", MOZ_SANITIZINGHTMLSERIALIZER_CID, MOZ_SANITIZINGHTMLSERIALIZER_CONTRACTID, @@ -1137,6 +1147,11 @@ NS_XHTMLPARANOIDFRAGMENTSINK_CONTRACTID, CreateXHTMLParanoidFragmentSink }, + { "xhtml paranoid fragment sink 2", + NS_XHTMLPARANOIDFRAGMENTSINK2_CID, + NS_XHTMLPARANOIDFRAGMENTSINK2_CONTRACTID, + CreateXHTMLParanoidFragmentSink2 }, + { "XBL Service", NS_XBLSERVICE_CID, "@mozilla.org/xbl;1", @@ -1379,6 +1394,11 @@ "@mozilla.org/textservices/textservicesdocument;1", nsTextServicesDocumentConstructor }, #endif + + { "Content Utils", + NS_ICONTENTUTILS_CID, + "@mozilla.org/content/contentutils;1", + nsIContentUtilsConstructor }, }; NS_IMPL_NSGETMODULE_WITH_CTOR(nsLayoutModule, gComponents, Initialize) --- xulrunner-1.9.0.19.orig/layout/build/nsLayoutCID.h +++ xulrunner-1.9.0.19/layout/build/nsLayoutCID.h @@ -225,4 +225,8 @@ // {93ad72a6-02cd-4716-9626-d47d5ec275ec} #define NS_DOMJSON_CID \ { 0x93ad72a6, 0x02cd, 0x4716, { 0x96, 0x26, 0xd4, 0x7d, 0x5e, 0xc2, 0x75, 0xec } } + +// {762C4AE7-B923-422F-B97E-B9BFC1EF7BF0} +#define NS_ICONTENTUTILS_CID \ +{ 0x762C4AE7, 0xB923, 0x422F, { 0xB9, 0x7E, 0xB9, 0xBF, 0xC1, 0xEF, 0x7B, 0xF0 } } #endif /* nsLayoutCID_h__ */ --- xulrunner-1.9.0.19.orig/layout/base/nsPresContext.cpp +++ xulrunner-1.9.0.19/layout/base/nsPresContext.cpp @@ -227,8 +227,6 @@ nsPresContext::~nsPresContext() { - mImageLoaders.Enumerate(destroy_loads, nsnull); - NS_PRECONDITION(!mShell, "Presshell forgot to clear our mShell pointer"); SetShell(nsnull); @@ -333,9 +331,6 @@ // NS_RELEASE(tmp->mLookAndFeel); // a service // NS_RELEASE(tmp->mLangGroup); // an atom - tmp->mImageLoaders.Enumerate(destroy_loads, nsnull); - tmp->mImageLoaders.Clear(); - // NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mTheme); // a service // NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mLangService); // a service NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mPrintSettings); @@ -910,6 +905,13 @@ UpdateCharSet(doc->GetDocumentCharacterSet()); } } + } else { + // Destroy image loaders now that the presshell is going away. + // This is important since imageloaders can have pointers to frames and + // we don't want those pointers to outlive the destruction of the frame + // arena. + mImageLoaders.Enumerate(destroy_loads, nsnull); + mImageLoaders.Clear(); } } @@ -1170,6 +1172,8 @@ imgIRequest* nsPresContext::LoadImage(imgIRequest* aImage, nsIFrame* aTargetFrame) { + NS_ASSERTION(mShell, "Shouldn't load image after the shell is gone"); + // look and see if we have a loader for the target frame. nsCOMPtr loader; mImageLoaders.Get(aTargetFrame, getter_AddRefs(loader)); --- xulrunner-1.9.0.19.orig/layout/base/nsBidiPresUtils.cpp +++ xulrunner-1.9.0.19/layout/base/nsBidiPresUtils.cpp @@ -52,8 +52,10 @@ #include "nsHTMLContainerFrame.h" #include "nsInlineFrame.h" #include "nsPlaceholderFrame.h" +#include "nsFirstLetterFrame.h" static NS_DEFINE_IID(kInlineFrameCID, NS_INLINE_FRAME_CID); +static NS_DEFINE_IID(kFirstLetterFrameCID, NS_FIRSTLETTER_FRAME_CID); static const PRUnichar kSpace = 0x0020; static const PRUnichar kLineSeparator = 0x2028; @@ -197,41 +199,26 @@ nsIFrame* parent = aFrame->GetParent(); NS_ASSERTION(parent, "Couldn't get frame parent in nsBidiPresUtils::CreateBidiContinuation"); - - nsresult rv = presShell->FrameConstructor()-> - CreateContinuingFrame(presContext, aFrame, parent, aNewFrame, PR_FALSE); - if (NS_FAILED(rv)) { - return rv; - } + nsresult rv = NS_OK; + // Have to special case floating first letter frames because the continuation // doesn't go in the first letter frame. The continuation goes with the rest // of the text that the first letter frame was made out of. if (parent->GetType() == nsGkAtoms::letterFrame && parent->GetStyleDisplay()->IsFloating()) { - nsIFrame* oldParent = parent; - nsPlaceholderFrame* placeholderFrame = - presShell->FrameManager()->GetPlaceholderFrameFor(parent); - parent = placeholderFrame->GetParent(); - - (*aNewFrame)->SetParent(parent); - nsHTMLContainerFrame::ReparentFrameView(aFrame->PresContext(), *aNewFrame, - oldParent, parent); - - // The continuation will have gotten the first letter style from it's prev - // continuation, so we need to repair the style context so it doesn't have - // the first letter styling. - nsStyleContext* parentSC = oldParent->GetStyleContext()->GetParent(); - if (parentSC) { - nsRefPtr newSC; - newSC = presShell->StyleSet()->ResolveStyleForNonElement(parentSC); - if (newSC) { - (*aNewFrame)->SetStyleContext(newSC); - } + nsFirstLetterFrame* letterFrame; + parent->QueryInterface(kFirstLetterFrameCID, (void**)&letterFrame); + if (letterFrame) { + rv = letterFrame->CreateContinuationForFloatingParent( + presContext, aFrame, aNewFrame, PR_FALSE); + return rv; } + } - // The list name nsGkAtoms::nextBidi would indicate we don't want reflow - rv = parent->InsertFrames(nsGkAtoms::nextBidi, placeholderFrame, *aNewFrame); + rv = presShell->FrameConstructor()-> + CreateContinuingFrame(presContext, aFrame, parent, aNewFrame, PR_FALSE); + if (NS_FAILED(rv)) { return rv; } --- xulrunner-1.9.0.19.orig/layout/base/nsPresShell.cpp +++ xulrunner-1.9.0.19/layout/base/nsPresShell.cpp @@ -2659,6 +2659,8 @@ PresShell::NotifyDestroyingFrame(nsIFrame* aFrame) { if (!mIgnoreFrameDestruction) { + mPresContext->StopImagesFor(aFrame); + mFrameConstructor->NotifyDestroyingFrame(aFrame); for (PRInt32 idx = mDirtyRoots.Count(); idx; ) { --- xulrunner-1.9.0.19.orig/layout/base/nsCSSFrameConstructor.cpp +++ xulrunner-1.9.0.19/layout/base/nsCSSFrameConstructor.cpp @@ -9323,6 +9323,33 @@ return res; } +static void +DoDeletingFrameSubtree(nsFrameManager* aFrameManager, + nsVoidArray& aDestroyQueue, + nsIFrame* aRemovedFrame, + nsIFrame* aFrame); + +static void +DoDeletingOverflowContainers(nsFrameManager* aFrameManager, + nsVoidArray& aDestroyQueue, + nsIFrame* aRemovedFrame, + nsIFrame* aFrame) +{ + // The invariant that "continuing frames should be found as part of the + // walk over the top-most frame's continuing frames" does not hold for + // out-of-flow overflow containers, so we need to walk them too. + // Note that DoDeletingFrameSubtree() skips the child lists where + // overflow containers live so we won't process them twice. + const PRBool orphanSubtree = aRemovedFrame == aFrame; + for (nsIFrame* next = aFrame->GetNextContinuation(); + next && (next->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER); + next = next->GetNextContinuation()) { + DoDeletingFrameSubtree(aFrameManager, aDestroyQueue, + orphanSubtree ? next : aRemovedFrame, + next); + } +} + /** * Called when a frame subtree is about to be deleted. Two important * things happen: @@ -9346,7 +9373,7 @@ * the same as aRemovedFrame, but as we recurse down the tree * this changes */ -static nsresult +static void DoDeletingFrameSubtree(nsFrameManager* aFrameManager, nsVoidArray& aDestroyQueue, nsIFrame* aRemovedFrame, @@ -9366,10 +9393,15 @@ // Walk aFrame's normal flow child frames looking for placeholder frames. nsIFrame* childFrame = aFrame->GetFirstChild(childListName); for (; childFrame; childFrame = childFrame->GetNextSibling()) { + if (childFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) { + NS_ASSERTION(childListName == nsGkAtoms::overflowContainersList || + childListName == nsGkAtoms::excessOverflowContainersList, + "out-of-flow on wrong child list"); + continue; + } if (NS_LIKELY(nsGkAtoms::placeholderFrame != childFrame->GetType())) { DoDeletingFrameSubtree(aFrameManager, aDestroyQueue, aRemovedFrame, childFrame); - } else { nsIFrame* outOfFlowFrame = nsPlaceholderFrame::GetRealFrameForPlaceholder(childFrame); @@ -9391,24 +9423,28 @@ // Recurse into the out-of-flow, it is now the aRemovedFrame. DoDeletingFrameSubtree(aFrameManager, aDestroyQueue, outOfFlowFrame, outOfFlowFrame); + DoDeletingOverflowContainers(aFrameManager, aDestroyQueue, + outOfFlowFrame, outOfFlowFrame); } else { // Also recurse into the out-of-flow when it's a descendant of aRemovedFrame // since we don't walk those lists, see |childListName| increment below. DoDeletingFrameSubtree(aFrameManager, aDestroyQueue, aRemovedFrame, outOfFlowFrame); + DoDeletingOverflowContainers(aFrameManager, aDestroyQueue, + aRemovedFrame, outOfFlowFrame); } } } // Move to next child list but skip lists with frames we should have - // a placeholder for. + // a placeholder for. Note that we only process in-flow overflow + // containers on the overflowContainersList/excessOverflowContainersList, + // out-of-flows are reached through the next-in-flow chain (bug 468563). do { childListName = aFrame->GetAdditionalChildListName(childListIndex++); } while (IsOutOfFlowList(childListName)); } while (childListName); - - return NS_OK; } /** @@ -9442,6 +9478,10 @@ // recursing over a subtree, because those continuing frames should be // found as part of the walk over the top-most frame's continuing frames. // Walking them again will make this an N^2/2 algorithm. + // The above is true for normal child next-in-flows but not overflow + // containers which we do walk because they *can* escape the subtree + // we're deleting. We skip [excess]overflowContainersList where + // they live to avoid processing them more than once. aFrame = aFrame->GetNextContinuation(); } while (aFrame); --- xulrunner-1.9.0.19.orig/layout/xul/base/src/nsTextBoxFrame.cpp +++ xulrunner-1.9.0.19/layout/xul/base/src/nsTextBoxFrame.cpp @@ -819,7 +819,7 @@ } if (InsertSeparatorBeforeAccessKey() && - !NS_IS_SPACE(mTitle[offset - 1])) { + offset > 0 && !NS_IS_SPACE(mTitle[offset - 1])) { mTitle.Insert(' ', offset); offset++; } --- xulrunner-1.9.0.19.orig/layout/xul/base/src/nsMenuFrame.cpp +++ xulrunner-1.9.0.19/layout/xul/base/src/nsMenuFrame.cpp @@ -151,6 +151,37 @@ PRBool mIsActivate; }; +class nsMenuAttributeChangedEvent : public nsRunnable +{ +public: + nsMenuAttributeChangedEvent(nsIFrame* aFrame, nsIAtom* aAttr) + : mFrame(aFrame), mAttr(aAttr) + { + } + + NS_IMETHOD Run() + { + nsMenuFrame* frame = static_cast(mFrame.GetFrame()); + NS_ENSURE_STATE(frame); + if (mAttr == nsGkAtoms::checked) { + frame->UpdateMenuSpecialState(frame->PresContext()); + } else if (mAttr == nsGkAtoms::acceltext) { + // someone reset the accelText attribute, + // so clear the bit that says *we* set it + frame->AddStateBits(NS_STATE_ACCELTEXT_IS_DERIVED); + frame->BuildAcceleratorText(); + } else if (mAttr == nsGkAtoms::key) { + frame->BuildAcceleratorText(); + } else if (mAttr == nsGkAtoms::type || mAttr == nsGkAtoms::name) { + frame->UpdateMenuType(frame->PresContext()); + } + return NS_OK; + } +protected: + nsWeakFrame mFrame; + nsCOMPtr mAttr; +}; + // // NS_NewMenuFrame // @@ -660,20 +691,16 @@ nsIAtom* aAttribute, PRInt32 aModType) { - nsAutoString value; - - if (aAttribute == nsGkAtoms::checked) { - if (mType != eMenuType_Normal) - UpdateMenuSpecialState(PresContext()); - } else if (aAttribute == nsGkAtoms::acceltext) { - // someone reset the accelText attribute, so clear the bit that says *we* set it - AddStateBits(NS_STATE_ACCELTEXT_IS_DERIVED); - BuildAcceleratorText(); - } else if (aAttribute == nsGkAtoms::key) { - BuildAcceleratorText(); - } else if (aAttribute == nsGkAtoms::type || aAttribute == nsGkAtoms::name) - UpdateMenuType(PresContext()); + if (aAttribute == nsGkAtoms::checked || + aAttribute == nsGkAtoms::acceltext || + aAttribute == nsGkAtoms::key || + aAttribute == nsGkAtoms::type || + aAttribute == nsGkAtoms::name) { + nsCOMPtr event = + new nsMenuAttributeChangedEvent(this, aAttribute); + nsContentUtils::AddScriptRunner(event); + } return NS_OK; } @@ -1214,8 +1241,6 @@ PresContext()->PresShell()-> FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_HAS_DIRTY_CHILDREN); - - return NS_OK; } } @@ -1247,8 +1272,6 @@ PresContext()->PresShell()-> FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_HAS_DIRTY_CHILDREN); - - return NS_OK; } } --- xulrunner-1.9.0.19.orig/layout/xul/base/src/nsMenuFrame.h +++ xulrunner-1.9.0.19/layout/xul/base/src/nsMenuFrame.h @@ -228,6 +228,7 @@ protected: friend class nsMenuTimerMediator; friend class nsASyncMenuInitialization; + friend class nsMenuAttributeChangedEvent; // initialize mPopupFrame to the first popup frame within aChildList. Returns // aChildList with the popup frame removed. --- xulrunner-1.9.0.19.orig/layout/xul/base/src/tree/public/nsITreeSelection.idl +++ xulrunner-1.9.0.19/layout/xul/base/src/tree/public/nsITreeSelection.idl @@ -151,3 +151,14 @@ */ readonly attribute long shiftSelectPivot; }; + +/** + * The following interface is not scriptable and MUST NEVER BE MADE scriptable. + * Native treeselections implement it, and we use this to check whether a + * treeselection is native (and therefore suitable for use by untrusted content). + */ +[uuid(1bd59678-5cb3-4316-b246-31a91b19aabe)] +interface nsINativeTreeSelection : nsITreeSelection +{ + [noscript] void ensureNative(); +}; --- xulrunner-1.9.0.19.orig/layout/xul/base/src/tree/src/nsTreeSelection.h +++ xulrunner-1.9.0.19/layout/xul/base/src/tree/src/nsTreeSelection.h @@ -49,7 +49,7 @@ class nsITreeBoxObject; struct nsTreeRange; -class nsTreeSelection : public nsITreeSelection +class nsTreeSelection : public nsINativeTreeSelection { public: nsTreeSelection(nsITreeBoxObject* aTree); @@ -58,6 +58,9 @@ NS_DECL_ISUPPORTS NS_DECL_NSITREESELECTION + // nsINativeTreeSelection: Untrusted code can use us + NS_IMETHOD EnsureNative() { return NS_OK; } + friend struct nsTreeRange; protected: --- xulrunner-1.9.0.19.orig/layout/xul/base/src/tree/src/nsTreeBodyFrame.h +++ xulrunner-1.9.0.19/layout/xul/base/src/tree/src/nsTreeBodyFrame.h @@ -376,6 +376,8 @@ InvalidateRow(aRow + aOrientation); } +public: + static already_AddRefed GetColumnImpl(nsITreeColumn* aUnknownCol) { if (!aUnknownCol) return nsnull; @@ -385,6 +387,8 @@ return col; } +protected: + // Create a new timer. This method is used to delay various actions like // opening/closing folders or tree scrolling. // aID is type of the action, aFunc is the function to be called when --- xulrunner-1.9.0.19.orig/layout/xul/base/src/tree/src/nsTreeSelection.cpp +++ xulrunner-1.9.0.19/layout/xul/base/src/tree/src/nsTreeSelection.cpp @@ -275,6 +275,7 @@ // QueryInterface implementation for nsBoxObject NS_INTERFACE_MAP_BEGIN(nsTreeSelection) NS_INTERFACE_MAP_ENTRY(nsITreeSelection) + NS_INTERFACE_MAP_ENTRY(nsINativeTreeSelection) NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_ENTRY_DOM_CLASSINFO(TreeSelection) NS_INTERFACE_MAP_END @@ -700,7 +701,12 @@ #define ADD_NEW_RANGE(macro_range, macro_selection, macro_start, macro_end) \ { \ - nsTreeRange* macro_new_range = new nsTreeRange(macro_selection, (macro_start), (macro_end)); \ + PRInt32 start = macro_start; \ + PRInt32 end = macro_end; \ + if (start > end) { \ + end = start; \ + } \ + nsTreeRange* macro_new_range = new nsTreeRange(macro_selection, start, end); \ if (macro_range) \ macro_range->Insert(macro_new_range); \ else \ @@ -738,27 +744,27 @@ // no selection, so nothing to do. if (!mFirstRange) return NS_OK; - nsTreeRange* newRange = nsnull; - PRBool selChanged = PR_FALSE; + nsTreeRange* oldFirstRange = mFirstRange; nsTreeRange* curr = mFirstRange; + mFirstRange = nsnull; while (curr) { if (aCount > 0) { // inserting if (aIndex > curr->mMax) { // adjustment happens after the range, so no change - ADD_NEW_RANGE(newRange, this, curr->mMin, curr->mMax); + ADD_NEW_RANGE(mFirstRange, this, curr->mMin, curr->mMax); } else if (aIndex <= curr->mMin) { // adjustment happens before the start of the range, so shift down - ADD_NEW_RANGE(newRange, this, curr->mMin + aCount, curr->mMax + aCount); + ADD_NEW_RANGE(mFirstRange, this, curr->mMin + aCount, curr->mMax + aCount); selChanged = PR_TRUE; } else { // adjustment happen inside the range. // break apart the range and create two ranges - ADD_NEW_RANGE(newRange, this, curr->mMin, aIndex - 1); - ADD_NEW_RANGE(newRange, this, aIndex + aCount, curr->mMax + aCount); + ADD_NEW_RANGE(mFirstRange, this, curr->mMin, aIndex - 1); + ADD_NEW_RANGE(mFirstRange, this, aIndex + aCount, curr->mMax + aCount); selChanged = PR_TRUE; } } @@ -766,7 +772,7 @@ // deleting if (aIndex > curr->mMax) { // adjustment happens after the range, so no change - ADD_NEW_RANGE(newRange, this, curr->mMin, curr->mMax); + ADD_NEW_RANGE(mFirstRange, this, curr->mMin, curr->mMax); } else { // remember, aCount is negative @@ -775,31 +781,30 @@ if (aIndex <= curr->mMin) { if (lastIndexOfAdjustment < curr->mMin) { // adjustment happens before the start of the range, so shift up - ADD_NEW_RANGE(newRange, this, curr->mMin + aCount, curr->mMax + aCount); + ADD_NEW_RANGE(mFirstRange, this, curr->mMin + aCount, curr->mMax + aCount); } else if (lastIndexOfAdjustment >= curr->mMax) { // adjustment contains the range. remove the range by not adding it to the newRange } else { // adjustment starts before the range, and ends in the middle of it, so trim the range - ADD_NEW_RANGE(newRange, this, aIndex, curr->mMax + aCount) + ADD_NEW_RANGE(mFirstRange, this, aIndex, curr->mMax + aCount) } } else if (lastIndexOfAdjustment >= curr->mMax) { // adjustment starts in the middle of the current range, and contains the end of the range, so trim the range - ADD_NEW_RANGE(newRange, this, curr->mMin, aIndex - 1) + ADD_NEW_RANGE(mFirstRange, this, curr->mMin, aIndex - 1) } else { // range contains the adjustment, so shorten the range - ADD_NEW_RANGE(newRange, this, curr->mMin, curr->mMax + aCount) + ADD_NEW_RANGE(mFirstRange, this, curr->mMin, curr->mMax + aCount) } } } curr = curr->mNext; } - delete mFirstRange; - mFirstRange = newRange; + delete oldFirstRange; // Fire the select event if (selChanged) --- xulrunner-1.9.0.19.orig/layout/xul/base/src/tree/src/nsTreeContentView.cpp +++ xulrunner-1.9.0.19/layout/xul/base/src/tree/src/nsTreeContentView.cpp @@ -47,6 +47,15 @@ #include "nsIEventStateManager.h" #include "nsINodeInfo.h" #include "nsIXULSortService.h" +#include "nsContentUtils.h" +#include "nsTreeBodyFrame.h" +#include "nsDOMError.h" + +#define NS_ENSURE_NATIVE_COLUMN(_col) \ + nsRefPtr col = nsTreeBodyFrame::GetColumnImpl(_col); \ + if (!col) { \ + return NS_ERROR_INVALID_ARG; \ + } // A content model view implementation for the tree. @@ -186,9 +195,22 @@ return NS_OK; } +PRBool +nsTreeContentView::CanTrustTreeSelection(nsISupports* aValue) +{ + // Untrusted content is only allowed to specify known-good views + if (nsContentUtils::IsCallerTrustedForWrite()) + return PR_TRUE; + nsCOMPtr nativeTreeSel = do_QueryInterface(aValue); + return nativeTreeSel && NS_SUCCEEDED(nativeTreeSel->EnsureNative()); +} + NS_IMETHODIMP nsTreeContentView::SetSelection(nsITreeSelection* aSelection) { + NS_ENSURE_TRUE(!aSelection || CanTrustTreeSelection(aSelection), + NS_ERROR_DOM_SECURITY_ERR); + mSelection = aSelection; if (!mSelection || !mUpdateSelection) return NS_OK; @@ -239,7 +261,7 @@ NS_IMETHODIMP nsTreeContentView::GetCellProperties(PRInt32 aRow, nsITreeColumn* aCol, nsISupportsArray* aProperties) { - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_ENSURE_ARG_POINTER(aProperties); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) @@ -264,7 +286,7 @@ NS_IMETHODIMP nsTreeContentView::GetColumnProperties(nsITreeColumn* aCol, nsISupportsArray* aProperties) { - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_ENSURE_ARG_POINTER(aProperties); nsCOMPtr element; aCol->GetElement(getter_AddRefs(element)); @@ -417,7 +439,7 @@ nsTreeContentView::GetImageSrc(PRInt32 aRow, nsITreeColumn* aCol, nsAString& _retval) { _retval.Truncate(); - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) return NS_ERROR_INVALID_ARG; @@ -438,7 +460,7 @@ NS_IMETHODIMP nsTreeContentView::GetProgressMode(PRInt32 aRow, nsITreeColumn* aCol, PRInt32* _retval) { - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) return NS_ERROR_INVALID_ARG; @@ -469,7 +491,7 @@ nsTreeContentView::GetCellValue(PRInt32 aRow, nsITreeColumn* aCol, nsAString& _retval) { _retval.Truncate(); - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) return NS_ERROR_INVALID_ARG; @@ -491,7 +513,7 @@ nsTreeContentView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& _retval) { _retval.Truncate(); - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); NS_PRECONDITION(aCol, "bad column"); @@ -599,7 +621,7 @@ NS_IMETHODIMP nsTreeContentView::CycleHeader(nsITreeColumn* aCol) { - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); if (!mRoot) return NS_OK; @@ -649,7 +671,7 @@ nsTreeContentView::IsEditable(PRInt32 aRow, nsITreeColumn* aCol, PRBool* _retval) { *_retval = PR_FALSE; - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) return NS_ERROR_INVALID_ARG; @@ -674,6 +696,7 @@ NS_IMETHODIMP nsTreeContentView::IsSelectable(PRInt32 aRow, nsITreeColumn* aCol, PRBool* _retval) { + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) return NS_ERROR_INVALID_ARG; @@ -698,7 +721,7 @@ NS_IMETHODIMP nsTreeContentView::SetCellValue(PRInt32 aRow, nsITreeColumn* aCol, const nsAString& aValue) { - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) return NS_ERROR_INVALID_ARG; @@ -719,7 +742,7 @@ NS_IMETHODIMP nsTreeContentView::SetCellText(PRInt32 aRow, nsITreeColumn* aCol, const nsAString& aValue) { - NS_ENSURE_ARG_POINTER(aCol); + NS_ENSURE_NATIVE_COLUMN(aCol); NS_PRECONDITION(aRow >= 0 && aRow < mRows.Count(), "bad row"); if (aRow < 0 || aRow >= mRows.Count()) return NS_ERROR_INVALID_ARG; @@ -1046,11 +1069,14 @@ } else if (childTag == nsGkAtoms::option) { PRInt32 parentIndex = FindContent(aContainer); - PRInt32 index = 0; - GetIndexInSubtree(aContainer, aChild, &index); - PRInt32 count = InsertRow(parentIndex, index, aChild); - if (mBoxObject) - mBoxObject->RowCountChanged(parentIndex + index + 1, count); + + if (parentIndex >= 0) { + PRInt32 index = 0; + GetIndexInSubtree(aContainer, aChild, &index); + PRInt32 count = InsertRow(parentIndex, index, aChild); + if (mBoxObject) + mBoxObject->RowCountChanged(parentIndex + index + 1, count); + } } } --- xulrunner-1.9.0.19.orig/layout/xul/base/src/tree/src/nsTreeContentView.h +++ xulrunner-1.9.0.19/layout/xul/base/src/tree/src/nsTreeContentView.h @@ -78,6 +78,8 @@ NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED + static PRBool CanTrustTreeSelection(nsISupports* aValue); + protected: // Recursive methods which deal with serializing of nested content. void Serialize(nsIContent* aContent, PRInt32 aParentIndex, PRInt32* aIndex, nsVoidArray& aRows); --- xulrunner-1.9.0.19.orig/layout/style/nsCSSLoader.h +++ xulrunner-1.9.0.19/layout/style/nsCSSLoader.h @@ -145,6 +145,15 @@ NS_DECL_NSIRUNNABLE NS_DECL_NSIUNICHARSTREAMLOADEROBSERVER + enum MimeProblem { + MimeProblem_rejected, + MimeProblem_quirksload, + MimeProblem_quirksload_xd, + MimeProblem_abandoned + }; + + void ReportMimeProblem(MimeProblem aProblem, nsIURI* aURI); + // Hold a ref to the CSSLoader so we can call back to it to let it // know the load finished CSSLoaderImpl* mLoader; // strong ref @@ -213,6 +222,10 @@ // this sheet, no matter what the channel principal is. Only true for sync // loads. PRPackedBool mUseSystemPrincipal : 1; + + // mCheckInitialSyntax is true if the CSS parser should abandon the sheet + // if there's a syntax error in its first full construct. See bug 524223. + PRPackedBool mCheckInitialSyntax : 1; // This is the element that imported the sheet. Needed to get the // charset set on it. @@ -223,6 +236,10 @@ // The principal that identifies who started loading us. nsCOMPtr mLoaderPrincipal; + + // The server-reported MIME type of the sheet. Used primarily for + // diagnostics. + nsCString mContentType; }; class nsURIAndPrincipalHashKey : public nsURIHashKey --- xulrunner-1.9.0.19.orig/layout/style/nsCSSLoader.cpp +++ xulrunner-1.9.0.19/layout/style/nsCSSLoader.cpp @@ -68,6 +68,7 @@ #include "nsITimelineService.h" #include "nsIHttpChannel.h" #include "nsIScriptError.h" +#include "nsIConsoleService.h" #include "nsMimeTypes.h" #include "nsIAtom.h" #include "nsIDOM3Node.h" @@ -89,6 +90,7 @@ #include "nsIDOMCSSStyleSheet.h" #include "nsIDOMCSSImportRule.h" #include "nsContentErrors.h" +#include "nsDOMError.h" #ifdef MOZ_LOGGING // #define FORCE_PR_LOG /* Allow logging in the release build */ @@ -165,6 +167,7 @@ mWasAlternate(aIsAlternate), mAllowUnsafeRules(PR_FALSE), mUseSystemPrincipal(PR_FALSE), + mCheckInitialSyntax(PR_FALSE), mOwningElement(aOwningElement), mObserver(aObserver), mLoaderPrincipal(aLoaderPrincipal) @@ -194,6 +197,7 @@ mWasAlternate(PR_FALSE), mAllowUnsafeRules(PR_FALSE), mUseSystemPrincipal(PR_FALSE), + mCheckInitialSyntax(PR_FALSE), mOwningElement(nsnull), mObserver(aObserver), mLoaderPrincipal(aLoaderPrincipal) @@ -236,6 +240,7 @@ mWasAlternate(PR_FALSE), mAllowUnsafeRules(aAllowUnsafeRules), mUseSystemPrincipal(aUseSystemPrincipal), + mCheckInitialSyntax(PR_FALSE), mOwningElement(nsnull), mObserver(aObserver), mLoaderPrincipal(aLoaderPrincipal) @@ -731,6 +736,76 @@ return uri; } +/* Subroutine of SheetLoadData::OnStreamComplete and CSSLoaderImpl::ParseSheet. + * Note that we can't just use nsContentUtils::ReportToConsole, because two + * of the messages were added after string freeze. + */ +void +SheetLoadData::ReportMimeProblem(MimeProblem aProblem, nsIURI* aURI) +{ + nsCAutoString spec; + aURI->GetSpec(spec); + const nsAFlatString& specUTF16 = NS_ConvertUTF8toUTF16(spec); + const nsAFlatString& ctypeUTF16 = NS_ConvertASCIItoUTF16(mContentType); + const PRUnichar *strings[] = { specUTF16.get(), ctypeUTF16.get() }; + + PRUint32 errorFlag; + nsXPIDLString formattedMessage; + nsresult rv; + + switch (aProblem) { + case MimeProblem_rejected: + errorFlag = nsIScriptError::errorFlag; + rv = nsContentUtils::FormatLocalizedString(nsContentUtils::eCSS_PROPERTIES, + "MimeNotCss", + strings, 2, formattedMessage); + if (NS_FAILED(rv)) return; + break; + + case MimeProblem_quirksload: + case MimeProblem_quirksload_xd: + errorFlag = nsIScriptError::warningFlag; + rv = nsContentUtils::FormatLocalizedString(nsContentUtils::eCSS_PROPERTIES, + "MimeNotCssWarn", + strings, 2, formattedMessage); + if (NS_FAILED(rv)) return; + if (aProblem == MimeProblem_quirksload_xd) { + formattedMessage.AppendLiteral(" This cross-domain request will be " + "ignored by Gecko 2.0 (e.g. Firefox " + "4.0)."); + } + break; + + case MimeProblem_abandoned: + errorFlag = nsIScriptError::errorFlag; + formattedMessage.AppendLiteral("Cross-domain stylesheet "); + AppendUTF8toUTF16(spec, formattedMessage); + formattedMessage.AppendLiteral(", with improper MIME type, abandoned " + "because of syntax errors."); + break; + } + + nsCOMPtr console = + do_GetService(NS_CONSOLESERVICE_CONTRACTID); + if (!console) return; + + nsCOMPtr errObj = + do_CreateInstance(NS_SCRIPTERROR_CONTRACTID); + if (!errObj) return; + + nsCAutoString referrer; + nsCOMPtr referrerURI = GetReferrerURI(); + if (referrerURI) + referrerURI->GetSpec(referrer); + + rv = errObj->Init(formattedMessage.get(), + NS_ConvertUTF8toUTF16(referrer).get(), + nsnull, 0, 0, errorFlag, "CSS Loader"); + if (NS_FAILED(rv)) return; + + console->LogMessage(errObj); +} + /* * Here we need to check that the load did not give us an http error * page and check the mimetype on the channel to make sure we're not @@ -824,56 +899,56 @@ } } - if (aDataStream) { - nsCAutoString contentType; - if (channel) { - channel->GetContentType(contentType); - } - - PRBool validType = contentType.EqualsLiteral("text/css") || - contentType.EqualsLiteral(UNKNOWN_CONTENT_TYPE) || - contentType.IsEmpty(); - - if (!validType) { - nsCAutoString spec; - channelURI->GetSpec(spec); - - const nsAFlatString& specUTF16 = NS_ConvertUTF8toUTF16(spec); - const nsAFlatString& ctypeUTF16 = NS_ConvertASCIItoUTF16(contentType); - const PRUnichar *strings[] = { specUTF16.get(), ctypeUTF16.get() }; - - const char *errorMessage; - PRUint32 errorFlag; - - if (mLoader->mCompatMode == eCompatibility_NavQuirks) { - errorMessage = "MimeNotCssWarn"; - errorFlag = nsIScriptError::warningFlag; - } else { - // Drop the data stream so that we do not load it - aDataStream = nsnull; - - errorMessage = "MimeNotCss"; - errorFlag = nsIScriptError::errorFlag; - } - nsCOMPtr referrer = GetReferrerURI(); - nsContentUtils::ReportToConsole(nsContentUtils::eCSS_PROPERTIES, - errorMessage, - strings, NS_ARRAY_LENGTH(strings), - referrer, EmptyString(), 0, 0, errorFlag, - "CSS Loader"); - } - } - if (!aDataStream) { LOG_WARN((" No data stream; bailing")); mLoader->SheetComplete(this, NS_ERROR_NOT_AVAILABLE); return NS_OK; - } + } + + if (channel) { + channel->GetContentType(mContentType); + } + + // In standards mode, a style sheet must have one of these MIME + // types to be processed at all. In quirks mode, we accept any + // MIME type, but only if the style sheet is same-origin with the + // requesting document or parent sheet, or (as a compatibility hack + // for 1.9.2 *only*), if the first thing in the file does appear + // to be a syntactically valid CSS construct. See bug 524223. + + PRBool validType = mContentType.EqualsLiteral("text/css") || + mContentType.EqualsLiteral(UNKNOWN_CONTENT_TYPE) || + mContentType.IsEmpty(); + + mCheckInitialSyntax = PR_FALSE; + if (!validType) { + MimeProblem problem = MimeProblem_rejected; + + if (mLoader->mCompatMode == eCompatibility_NavQuirks) { + problem = MimeProblem_quirksload; + if (mLoaderPrincipal) { + PRBool subsumed; + result = mLoaderPrincipal->Subsumes(principal, &subsumed); + if (NS_FAILED(result) || !subsumed) { + problem = MimeProblem_quirksload_xd; + mCheckInitialSyntax = PR_TRUE; + } + } + } + + ReportMimeProblem(problem, channelURI); + if (problem == MimeProblem_rejected) { + LOG_WARN((" Ignoring sheet with improper MIME type %s", + mContentType.get())); + mLoader->SheetComplete(this, NS_ERROR_NOT_AVAILABLE); + return NS_OK; + } + } // Enough to set the URIs on mSheet, since any sibling datas we have share // the same mInner as mSheet and will thus get the same URI. mSheet->SetURIs(channelURI, originalURI, channelURI); - + PRBool completed; return mLoader->ParseSheet(aDataStream, this, completed); } @@ -1523,12 +1598,29 @@ nsCOMPtr sheetURI, baseURI; aLoadData->mSheet->GetSheetURI(getter_AddRefs(sheetURI)); aLoadData->mSheet->GetBaseURI(getter_AddRefs(baseURI)); - rv = parser->Parse(aStream, sheetURI, baseURI, - aLoadData->mSheet->Principal(), aLoadData->mLineNumber, - aLoadData->mAllowUnsafeRules); + if (aLoadData->mCheckInitialSyntax) { + nsCOMPtr pext(do_QueryInterface(parser)); + NS_ABORT_IF_FALSE(pext, "nsICSSParser_1_9 missing from parser impl"); + rv = pext->ParseWithInitialSyntaxCheck(aStream, sheetURI, baseURI, + aLoadData->mSheet->Principal(), + aLoadData->mLineNumber, + aLoadData->mAllowUnsafeRules); + } else { + rv = parser->Parse(aStream, sheetURI, baseURI, + aLoadData->mSheet->Principal(), + aLoadData->mLineNumber, + aLoadData->mAllowUnsafeRules); + } mParsingDatas.RemoveElementAt(mParsingDatas.Count() - 1); RecycleParser(parser); + if (rv == NS_ERROR_DOM_SYNTAX_ERR) { + NS_ASSERTION(aLoadData->mCheckInitialSyntax, + "don't care about syntax errors but got told anyway"); + aLoadData->ReportMimeProblem(SheetLoadData::MimeProblem_abandoned, + sheetURI); + } + NS_ASSERTION(aLoadData->mPendingChildren == 0 || !aLoadData->mSyncLoad, "Sync load has leftover pending children!"); --- xulrunner-1.9.0.19.orig/layout/style/nsICSSParser.h +++ xulrunner-1.9.0.19/layout/style/nsICSSParser.h @@ -60,6 +60,10 @@ { 0xad4a3778, 0xdae0, 0x4640, \ { 0xb2, 0x5a, 0x24, 0xff, 0x09, 0xc3, 0x70, 0xef } } +#define NS_ICSS_PARSER_1_9_IID \ +{ 0x50be628d, 0x9273, 0x45c1, \ + { 0x9f, 0x25, 0xb4, 0xba, 0x71, 0x82, 0x45, 0xd5 } } + // Rule processing function typedef void (*PR_CALLBACK RuleAppendFunc) (nsICSSRule* aRule, void* aData); @@ -99,7 +103,7 @@ * @param aBaseURI the URI to use for relative URI resolution * @param aSheetPrincipal the principal of the stylesheet. This must match * the principal of the sheet passed to SetStyleSheet. - * @param aLineNumber the line number of the first line of the sheet. + * @param aLineNumber the line number of the first line of the sheet. * @param aAllowUnsafeRules see aEnableUnsafeRules in * nsICSSLoader::LoadSheetSync */ @@ -172,6 +176,26 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSParser, NS_ICSS_PARSER_IID) +class nsICSSParser_1_9 : public nsICSSParser { +public: + NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_PARSER_1_9_IID) + + /** + * Identical to nsICSSParser::Parse(), except that if there is a + * syntax error within the first top-level construct, the entire + * sheet is discarded and the return value is NS_ERROR_DOM_SYNTAX_ERR. + * See bug 524223. + */ + NS_IMETHOD ParseWithInitialSyntaxCheck(nsIUnicharInputStream* aInput, + nsIURI* aSheetURL, + nsIURI* aBaseURI, + nsIPrincipal* aSheetPrincipal, + PRUint32 aLineNumber, + PRBool aAllowUnsafeRules) = 0; +}; + +NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSParser_1_9, NS_ICSS_PARSER_1_9_IID) + nsresult NS_NewCSSParser(nsICSSParser** aInstancePtrResult); --- xulrunner-1.9.0.19.orig/layout/style/nsCSSParser.cpp +++ xulrunner-1.9.0.19/layout/style/nsCSSParser.cpp @@ -79,6 +79,7 @@ #include "nsILookAndFeel.h" #include "nsStyleUtil.h" #include "nsIPrincipal.h" +#include "nsDOMError.h" #include "prprf.h" #include "math.h" @@ -86,7 +87,7 @@ //---------------------------------------------------------------------- // Your basic top-down recursive descent style parser -class CSSParserImpl : public nsICSSParser { +class CSSParserImpl : public nsICSSParser_1_9 { public: CSSParserImpl(); virtual ~CSSParserImpl(); @@ -112,6 +113,13 @@ PRUint32 aLineNumber, PRBool aAllowUnsafeRules); + NS_IMETHOD ParseWithInitialSyntaxCheck(nsIUnicharInputStream* aInput, + nsIURI* aSheetURL, + nsIURI* aBaseURI, + nsIPrincipal* aSheetPrincipal, + PRUint32 aLineNumber, + PRBool aAllowUnsafeRules); + NS_IMETHOD ParseStyleAttribute(const nsAString& aAttributeValue, nsIURI* aDocURL, nsIURI* aBaseURL, @@ -180,6 +188,14 @@ CSSParserImpl* mParser; }; + nsresult Parse(nsIUnicharInputStream* aInput, + nsIURI* aSheetURI, + nsIURI* aBaseURI, + nsIPrincipal* aSheetPrincipal, + PRUint32 aLineNumber, + PRBool aAllowUnsafeRules, + PRBool aCheckInitialSyntax); + nsresult InitScanner(nsIUnicharInputStream* aInput, nsIURI* aSheetURI, PRUint32 aLineNumber, nsIURI* aBaseURI, nsIPrincipal* aSheetPrincipal); @@ -203,7 +219,7 @@ nsSubstring* NextIdent(nsresult& aErrorCode); void SkipUntil(nsresult& aErrorCode, PRUnichar aStopSymbol); void SkipRuleSet(nsresult& aErrorCode); - PRBool SkipAtRule(nsresult& aErrorCode); + void SkipAtRule(nsresult& aErrorCode); PRBool SkipDeclaration(nsresult& aErrorCode, PRBool aCheckForBraces); PRBool GetNonCloseParenToken(nsresult& aErrorCode, PRBool aSkipWS); @@ -562,7 +578,7 @@ { } -NS_IMPL_ISUPPORTS1(CSSParserImpl, nsICSSParser) +NS_IMPL_ISUPPORTS2(CSSParserImpl, nsICSSParser, nsICSSParser_1_9) CSSParserImpl::~CSSParserImpl() { @@ -677,6 +693,7 @@ } +// Wrapper methods to preserve the as-shipped 1.9 API. NS_IMETHODIMP CSSParserImpl::Parse(nsIUnicharInputStream* aInput, nsIURI* aSheetURI, @@ -685,6 +702,31 @@ PRUint32 aLineNumber, PRBool aAllowUnsafeRules) { + return Parse(aInput, aSheetURI, aBaseURI, aSheetPrincipal, + aLineNumber, aAllowUnsafeRules, PR_FALSE); +} + +NS_IMETHODIMP +CSSParserImpl::ParseWithInitialSyntaxCheck(nsIUnicharInputStream* aInput, + nsIURI* aSheetURI, + nsIURI* aBaseURI, + nsIPrincipal* aSheetPrincipal, + PRUint32 aLineNumber, + PRBool aAllowUnsafeRules) +{ + return Parse(aInput, aSheetURI, aBaseURI, aSheetPrincipal, + aLineNumber, aAllowUnsafeRules, PR_TRUE); +} + +nsresult +CSSParserImpl::Parse(nsIUnicharInputStream* aInput, + nsIURI* aSheetURI, + nsIURI* aBaseURI, + nsIPrincipal* aSheetPrincipal, + PRUint32 aLineNumber, + PRBool aAllowUnsafeRules, + PRBool aCheckInitialSyntax) +{ NS_PRECONDITION(aSheetPrincipal, "Must have principal here!"); NS_ASSERTION(nsnull != aBaseURI, "need base URL"); @@ -743,6 +785,7 @@ mUnsafeRulesEnabled = aAllowUnsafeRules; nsCSSToken* tk = &mToken; + nsresult rv = NS_OK; for (;;) { // Get next non-whitespace token if (!GetToken(errorCode, PR_TRUE)) { @@ -753,19 +796,29 @@ continue; // legal here only } if (eCSSToken_AtKeyword == tk->mType) { - ParseAtRule(errorCode, AppendRuleToSheet, this); - continue; - } - UngetToken(); - if (ParseRuleSet(errorCode, AppendRuleToSheet, this)) { - mSection = eCSSSection_General; + PRBool good = ParseAtRule(errorCode, AppendRuleToSheet, this); + if (!good && aCheckInitialSyntax) { + rv = NS_ERROR_DOM_SYNTAX_ERR; + break; + } + } else { + UngetToken(); + if (ParseRuleSet(errorCode, AppendRuleToSheet, this)) { + mSection = eCSSSection_General; + } else if (aCheckInitialSyntax) { + rv = NS_ERROR_DOM_SYNTAX_ERR; + break; + } } + // If we get to this point we have successfully parsed one top-level + // construct, so stop bailing out on syntax errors. + aCheckInitialSyntax = PR_FALSE; } ReleaseScanner(); mUnsafeRulesEnabled = PR_FALSE; - return NS_OK; + return rv; } /** @@ -1202,31 +1255,28 @@ return &mToken.mIdent; } -PRBool CSSParserImpl::SkipAtRule(nsresult& aErrorCode) +void CSSParserImpl::SkipAtRule(nsresult& aErrorCode) { for (;;) { if (!GetToken(aErrorCode, PR_TRUE)) { REPORT_UNEXPECTED_EOF(PESkipAtRuleEOF); - return PR_FALSE; + return; } if (eCSSToken_Symbol == mToken.mType) { - PRUnichar symbol = mToken.mSymbol; - if (symbol == ';') { - break; - } - if (symbol == '{') { - SkipUntil(aErrorCode, '}'); - break; - } else if (symbol == '(') { - SkipUntil(aErrorCode, ')'); - } else if (symbol == '[') { - SkipUntil(aErrorCode, ']'); + switch (mToken.mSymbol) { + case ';': return; + case '{': SkipUntil(aErrorCode, '}'); return; + case '[': SkipUntil(aErrorCode, ']'); break; + case '(': SkipUntil(aErrorCode, ')'); break; + default: break; } } } - return PR_TRUE; } +// Note: returns PR_FALSE if the rule had a syntax error, but consumes +// the complete rule (or the complete construct to be skipped by error +// recovery) regardless. PRBool CSSParserImpl::ParseAtRule(nsresult& aErrorCode, RuleAppendFunc aAppendFunc, void* aData) { @@ -1282,7 +1332,8 @@ } // Skip over unsupported at rule, don't advance section - return SkipAtRule(aErrorCode); + SkipAtRule(aErrorCode); + return PR_FALSE; } PRBool CSSParserImpl::ParseCharsetRule(nsresult& aErrorCode, RuleAppendFunc aAppendFunc, @@ -1658,7 +1709,13 @@ PRBool CSSParserImpl::ParsePageRule(nsresult& aErrorCode, RuleAppendFunc aAppendFunc, void* aData) { // XXX not yet implemented - return PR_FALSE; + // Report as an error, and skip, but *succeed*, so that a style + // sheet beginning with an @page rule will not be discarded by the + // "initial syntax is valid" check. + REPORT_UNEXPECTED_TOKEN(PEUnknownAtRule); + OUTPUT_ERROR(); + SkipAtRule(aErrorCode); + return PR_TRUE; } void CSSParserImpl::SkipUntil(nsresult& aErrorCode, PRUnichar aStopSymbol) --- xulrunner-1.9.0.19.orig/layout/style/test/test_bug397427.html +++ xulrunner-1.9.0.19/layout/style/test/test_bug397427.html @@ -9,13 +9,13 @@ - - + +
Mozilla Bug 397427 @@ -55,30 +55,30 @@ "Redirect 3 did not get right base URI"); var ruleList = $("a").sheet.cssRules; - - is(ruleList[0].styleSheet.href, - window.location.href.replace(/test_bug397427.html$/, "redirect-1.css"), + + var redirHrefBase = + window.location.href.replace(/test_bug397427.html$/, + "redirect.sjs?http://example.org/tests/layout/style/test/post-"); + + is(ruleList[0].styleSheet.href, redirHrefBase + "redirect-1.css", "Unexpected href for imported sheet"); - todo(ruleList[0].href == window.location.href.replace(/test_bug397427.html$/, "redirect-1.css"), - "Rule href should be absolute"); - is(ruleList[1].styleSheet.href, - window.location.href.replace(/test_bug397427.html$/, "redirect-2.css"), + todo_is(ruleList[0].href, redirHrefBase + "redirect-1.css", + "Rule href should be absolute"); + is(ruleList[1].styleSheet.href, redirHrefBase + "redirect-2.css", "Unexpected href for imported sheet"); - todo(ruleList[1].href == window.location.href.replace(/test_bug397427.html$/, "redirect-2.css"), - "Rule href should be absolute"); + todo_is(ruleList[1].href, redirHrefBase + "redirect-2.css", + "Rule href should be absolute"); is($("b").href, "http://example.com/", "Unexpected href one"); is($("b").href, $("b").sheet.href, - "Should have the same href when not redirecing"); + "Should have the same href when not redirecting"); - is($("c").href, - window.location.href.replace(/test_bug397427.html$/, "redirect-2.css"), + is($("c").href, redirHrefBase + "redirect-2.css", "Unexpected href two"); is($("c").href, $("c").sheet.href, "Should have the same href when redirecting"); - - is($("d").href, - window.location.href.replace(/test_bug397427.html$/, "redirect-3.css"), + + is($("d").href, redirHrefBase + "redirect-3.css", "Unexpected href three"); is($("d").href, $("d").sheet.href, "Should have the same href when redirecting again"); --- xulrunner-1.9.0.19.orig/layout/style/test/ccd-quirks.html +++ xulrunner-1.9.0.19/layout/style/test/ccd-quirks.html @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

+

+

+
+

+

+

+
+

+

+

+
+

+

+

+
+
+

+

+

+
+

+

+

+
+

+

+

+
+

+

+

+ --- xulrunner-1.9.0.19.orig/layout/style/test/redirect.sjs +++ xulrunner-1.9.0.19/layout/style/test/redirect.sjs @@ -0,0 +1,5 @@ +function handleRequest(request, response) +{ + response.setStatusLine(request.httpVersion, 301, "Moved Permanently"); + response.setHeader("Location", request.queryString, false); +} --- xulrunner-1.9.0.19.orig/layout/style/test/ccd.sjs +++ xulrunner-1.9.0.19/layout/style/test/ccd.sjs @@ -0,0 +1,74 @@ +const DEBUG_all_valid = false; +const DEBUG_all_stub = false; + +function handleRequest(request, response) +{ + // Decode the query string to know what test we're doing. + + // character 1: 'I' = text/css response, 'J' = text/html response + let responseCSS = (request.queryString[0] == 'I'); + + // character 2: redirection type - we only care about whether we're + // ultimately same-origin with the requesting document ('A', 'D') or + // not ('B', 'C'). + let sameOrigin = (request.queryString[1] == 'A' || + request.queryString[1] == 'D'); + + // character 3: '1' = syntactically valid, '2' = invalid, '3' = http error + let malformed = (request.queryString[2] == '2'); + let httpError = (request.queryString[2] == '3'); + + // character 4: loaded with or @import (no action required) + + // character 5: loading document mode: 'q' = quirks, 's' = standards + let quirksMode = (request.queryString[4] == 'q'); + + // Our response contains a CSS rule that selects an element whose + // ID is the first four characters of the query string. + let selector = '#' + request.queryString.substring(0,4); + + // "Malformed" responses wrap the CSS rule in the construct + // {} ... + // This mimics what the CSS parser might see if an actual HTML + // document were fed to it. Because CSS parsers recover from + // errors by skipping tokens until they find something + // recognizable, a style rule appearing where I wrote '...' above + // will be honored! + let leader = (malformed ? '{}' : ''); + let trailer = (malformed ? '' : ''); + + // Standards mode documents will ignore the style sheet if it is being + // served as text/html (regardless of its contents). Quirks mode + // documents will ignore the style sheet if it is being served as + // text/html _and_ it is neither same-origin nor well-formed. + // Regardless, style sheets are ignored if they come as the body + // of an HTTP error response. + // + // Style sheets that should be ignored paint the element red; those + // that should be honored paint it lime. + let color = ((responseCSS || (quirksMode && (sameOrigin || !malformed))) + && !httpError) ? 'lime' : 'red'; + + // For debugging the test itself, we have the capacity to make every style + // sheet well-formed, or every style sheet do nothing. + if (DEBUG_all_valid) { + // In this mode, every test chip should turn blue. + response.setHeader('Content-Type', 'text/css'); + response.write(selector + '{background-color:blue}\n'); + } else if (DEBUG_all_stub) { + // In this mode, every test chip for a case where the true test + // sheet would be honored, should turn red. + response.setHeader('Content-Type', 'text/css'); + response.write(selector + '{}\n'); + } else { + // Normal operation. + if (httpError) + response.setStatusLine(request.httpVersion, 500, + "Internal Server Error"); + response.setHeader('Content-Type', + responseCSS ? 'text/css' : 'text/html'); + response.write(leader + selector + + '{background-color:' + color + '}' + + trailer + '\n'); + } +} --- xulrunner-1.9.0.19.orig/layout/style/test/test_css_cross_domain_miniparser.html +++ xulrunner-1.9.0.19/layout/style/test/test_css_cross_domain_miniparser.html @@ -0,0 +1,169 @@ + + + + + Test cross-domain CSS loading (invalid-initial rule) + + + + + +Mozilla + Bug 524223 + +
+ + + --- xulrunner-1.9.0.19.orig/layout/style/test/test_css_cross_domain.html +++ xulrunner-1.9.0.19/layout/style/test/test_css_cross_domain.html @@ -0,0 +1,100 @@ + + + + + Test cross-domain CSS loading + + + + + + +Mozilla + Bug 524223 + +
+ +
+

 

+
  1. text/css
    1. same origin
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
    2. +
    3. cross origin
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
    4. +
    5. same to cross
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
    6. +
    7. cross to same
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
  2. +
  3. text/html
    1. same origin
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
    2. +
    3. cross origin
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
    4. +
    5. same to cross
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
    6. +
    7. cross to same
      1. valid
      2. +
      3. malformed
      4. +
      5. http error
  4. +
+
+ +
+

Quirks

+ +
+ +
+

Standards

+ +
+ + + + --- xulrunner-1.9.0.19.orig/layout/style/test/Makefile.in +++ xulrunner-1.9.0.19/layout/style/test/Makefile.in @@ -97,6 +97,8 @@ test_bug405818.html \ test_bug412901.html \ test_compute_data_with_start_struct.html \ + test_css_cross_domain.html \ + test_css_cross_domain_miniparser.html \ test_dont_use_document_colors.html \ test_inherit_storage.html \ test_inherit_computation.html \ @@ -115,15 +117,13 @@ unstyled.css \ unstyled-frame.xml \ unstyled-frame.css \ - redirect-1.css \ + redirect.sjs \ post-redirect-1.css \ - redirect-1.css^headers^ \ - redirect-2.css \ post-redirect-2.css \ - redirect-2.css^headers^ \ - redirect-3.css \ - redirect-3.css^headers^ \ post-redirect-3.css \ + ccd-quirks.html \ + ccd-standards.html \ + ccd.sjs \ $(NULL) --- xulrunner-1.9.0.19.orig/layout/style/test/ccd-standards.html +++ xulrunner-1.9.0.19/layout/style/test/ccd-standards.html @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

+

+

+
+

+

+

+
+

+

+

+
+

+

+

+
+
+

+

+

+
+

+

+

+
+

+

+

+
+

+

+

+ --- xulrunner-1.9.0.19.orig/layout/generic/nsObjectFrame.cpp +++ xulrunner-1.9.0.19/layout/generic/nsObjectFrame.cpp @@ -2999,11 +2999,12 @@ // Nav 4.x would simply replace the "data" with "src". Because some plugins correctly // look for "data", lets instead copy the "data" attribute and add another entry // to the bottom of the array if there isn't already a "src" specified. - PRInt16 numRealAttrs = mNumCachedAttrs; + PRUint16 numRealAttrs = mNumCachedAttrs; nsAutoString data; - if (mContent->Tag() == nsGkAtoms::object - && !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) - && mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data)) { + if (mContent->Tag() == nsGkAtoms::object && + !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) && + mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data) && + !data.IsEmpty()) { mNumCachedAttrs++; } @@ -3014,7 +3015,7 @@ NS_ENSURE_TRUE(mCachedAttrParamValues, NS_ERROR_OUT_OF_MEMORY); // let's fill in our attributes - PRInt16 c = 0; + PRUint32 nextAttrParamIndex = 0; // Some plugins (eg Flash, see bug 234675.) are actually sensitive to the // attribute order. So we want to make sure we give the plugin the @@ -3022,7 +3023,7 @@ // other browsers. Now in HTML, the storage order is the reverse of the // source order, while in XML and XHTML it's the same as the source order // (see the AddAttributes functions in the HTML and XML content sinks). - PRInt16 start, end, increment; + PRInt32 start, end, increment; if (mContent->IsNodeOfType(nsINode::eHTML) && mContent->NodeInfo()->NamespaceEquals(kNameSpaceID_None)) { // HTML. Walk attributes in reverse order. @@ -3035,7 +3036,7 @@ end = numRealAttrs; increment = 1; } - for (PRInt16 index = start; index != end; index += increment) { + for (PRInt32 index = start; index != end; index += increment) { const nsAttrName* attrName = mContent->GetAttrNameAt(index); nsIAtom* atom = attrName->LocalName(); nsAutoString value; @@ -3045,24 +3046,25 @@ FixUpURLS(name, value); - mCachedAttrParamNames [c] = ToNewUTF8String(name); - mCachedAttrParamValues[c] = ToNewUTF8String(value); - c++; + mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(name); + mCachedAttrParamValues[nextAttrParamIndex] = ToNewUTF8String(value); + nextAttrParamIndex++; } // if the conditions above were met, copy the "data" attribute to a "src" array entry - if (data.Length()) { - mCachedAttrParamNames [mNumCachedAttrs-1] = ToNewUTF8String(NS_LITERAL_STRING("SRC")); - mCachedAttrParamValues[mNumCachedAttrs-1] = ToNewUTF8String(data); + if (!data.IsEmpty()) { + mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(NS_LITERAL_STRING("SRC")); + mCachedAttrParamValues[nextAttrParamIndex] = ToNewUTF8String(data); + nextAttrParamIndex++; } // add our PARAM and null separator - mCachedAttrParamNames [mNumCachedAttrs] = ToNewUTF8String(NS_LITERAL_STRING("PARAM")); - mCachedAttrParamValues[mNumCachedAttrs] = nsnull; + mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(NS_LITERAL_STRING("PARAM")); + mCachedAttrParamValues[nextAttrParamIndex] = nsnull; + nextAttrParamIndex++; // now fill in the PARAM name/value pairs from the cached DOM nodes - c = 0; - for (PRInt16 idx = 0; idx < mNumCachedParams; idx++) { + for (PRUint16 idx = 0; idx < mNumCachedParams; idx++) { nsIDOMElement* param = ourParams.ObjectAt(idx); if (param) { nsAutoString name; @@ -3084,9 +3086,9 @@ */ name.Trim(" \n\r\t\b", PR_TRUE, PR_TRUE, PR_FALSE); value.Trim(" \n\r\t\b", PR_TRUE, PR_TRUE, PR_FALSE); - mCachedAttrParamNames [mNumCachedAttrs + 1 + c] = ToNewUTF8String(name); - mCachedAttrParamValues[mNumCachedAttrs + 1 + c] = ToNewUTF8String(value); - c++; // rules! + mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(name); + mCachedAttrParamValues[nextAttrParamIndex] = ToNewUTF8String(value); + nextAttrParamIndex++; } } --- xulrunner-1.9.0.19.orig/layout/generic/nsHTMLParts.h +++ xulrunner-1.9.0.19/layout/generic/nsHTMLParts.h @@ -263,6 +263,8 @@ // in nsContentSink.h nsresult NS_NewHTMLParanoidFragmentSink(nsIFragmentContentSink** aInstancePtrResult); +nsresult +NS_NewHTMLParanoidFragmentSink2(nsIFragmentContentSink** aInstancePtrResult); void NS_HTMLParanoidFragmentSinkShutdown(); #endif /* nsHTMLParts_h___ */ --- xulrunner-1.9.0.19.orig/layout/generic/nsFrame.cpp +++ xulrunner-1.9.0.19/layout/generic/nsFrame.cpp @@ -504,10 +504,6 @@ shell->ClearFrameRefs(this); } - //XXX Why is this done in nsFrame instead of some frame class - // that actually loads images? - presContext->StopImagesFor(this); - if (view) { // Break association between view and frame view->SetClientData(nsnull); --- xulrunner-1.9.0.19.orig/layout/generic/nsFirstLetterFrame.h +++ xulrunner-1.9.0.19/layout/generic/nsFirstLetterFrame.h @@ -42,12 +42,18 @@ #include "nsHTMLContainerFrame.h" +#define NS_FIRSTLETTER_FRAME_CID \ + { 0x64e918c7, 0x786a, 0x4f5c,{0x93, 0xe0, 0x24, 0x59, 0x64, 0x31, 0xcf, 0x75}} + #define nsFirstLetterFrameSuper nsHTMLContainerFrame class nsFirstLetterFrame : public nsFirstLetterFrameSuper { public: nsFirstLetterFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext) {} + // nsISupports overrides + NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); + NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow); @@ -93,6 +99,15 @@ nscoord GetFirstLetterBaseline() const { return mBaseline; } + // For floating first letter frames, create a continuation for aChild and + // place it in the correct place. aContinuation is an outparam for the + // continuation that is created. aIsFluid determines if the continuation is + // fluid or not. + nsresult CreateContinuationForFloatingParent(nsPresContext* aPresContext, + nsIFrame* aChild, + nsIFrame** aContinuation, + PRBool aIsFluid); + protected: nscoord mBaseline; --- xulrunner-1.9.0.19.orig/layout/generic/nsContainerFrame.cpp +++ xulrunner-1.9.0.19/layout/generic/nsContainerFrame.cpp @@ -938,6 +938,8 @@ return NS_OK; // nothing to reflow nsOverflowContinuationTracker tracker(aPresContext, this, PR_FALSE, PR_FALSE); + PRBool shouldReflowAllKids = aReflowState.ShouldReflowAllKids(); + for (nsIFrame* frame = overflowContainers->FirstChild(); frame; frame = frame->GetNextSibling()) { if (frame->GetPrevInFlow()->GetParent() != GetPrevInFlow()) { @@ -945,7 +947,9 @@ // it will get reflowed once it's been placed continue; } - if (NS_SUBTREE_DIRTY(frame)) { + // If the available vertical height has changed, we need to reflow + // even if the frame isn't dirty. + if (shouldReflowAllKids || NS_SUBTREE_DIRTY(frame)) { // Get prev-in-flow nsIFrame* prevInFlow = frame->GetPrevInFlow(); NS_ASSERTION(prevInFlow, @@ -1240,6 +1244,10 @@ nsIAtom* aPropID) const { NS_PRECONDITION(aPresContext && aPropID && aFrameList, "null ptr"); + NS_PRECONDITION((aPropID != nsGkAtoms::overflowContainersProperty && + aPropID != nsGkAtoms::excessOverflowContainersProperty) || + IsFrameOfType(nsIFrame::eCanContainOverflowContainers), + "this type of frame can't have overflow containers"); nsresult rv = aPresContext->PropertyTable()->SetProperty(this, aPropID, aFrameList, DestroyFrameList, nsnull); NS_ASSERTION(rv != NS_PROPTABLE_PROP_OVERWRITTEN, "existing framelist"); --- xulrunner-1.9.0.19.orig/layout/generic/nsTextFrameThebes.cpp +++ xulrunner-1.9.0.19/layout/generic/nsTextFrameThebes.cpp @@ -29,7 +29,7 @@ * Daniel Glazman * Neil Deakin * Masayuki Nakano - * Mats Palmgren + * Mats Palmgren * Uri Bernstein * Stephen Blackheath * @@ -308,44 +308,101 @@ } } -// Remove the textrun from the frame continuation chain starting at aFrame, -// which should be marked as a textrun owner. -static void -ClearAllTextRunReferences(nsTextFrame* aFrame, gfxTextRun* aTextRun) +/** + * Remove |aTextRun| from the frame continuation chain starting at + * |aStartContinuation| if non-null, otherwise starting at |aFrame|. + * Unmark |aFrame| as a text run owner if it's the frame we start at. + * Return PR_TRUE if |aStartContinuation| is non-null and was found + * in the next-continuation chain of |aFrame|. + */ +static PRBool +ClearAllTextRunReferences(nsTextFrame* aFrame, gfxTextRun* aTextRun, + nsTextFrame* aStartContinuation) { - aFrame->RemoveStateBits(TEXT_IN_TEXTRUN_USER_DATA); + NS_PRECONDITION(aFrame, ""); + NS_PRECONDITION(!aStartContinuation || + !aStartContinuation->GetTextRun() || + aStartContinuation->GetTextRun() == aTextRun, + "wrong aStartContinuation for this text run"); + + if (!aStartContinuation || aStartContinuation == aFrame) { + aFrame->RemoveStateBits(TEXT_IN_TEXTRUN_USER_DATA); + } else { + do { + NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame, "Bad frame"); + aFrame = static_cast(aFrame->GetNextContinuation()); + } while (aFrame && aFrame != aStartContinuation); + } + PRBool found = aStartContinuation == aFrame; while (aFrame) { - NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame, - "Bad frame"); + NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame, "Bad frame"); if (aFrame->GetTextRun() != aTextRun) break; aFrame->SetTextRun(nsnull); aFrame = static_cast(aFrame->GetNextContinuation()); } + NS_POSTCONDITION(!found || aStartContinuation, "how did we find null?"); + return found; } -// Figure out which frames +/** + * Kill all references to |aTextRun| starting at |aStartContinuation|. + * It could be referenced by any of its owners, and all their in-flows. + * If |aStartContinuation| is null then process all userdata frames + * and their continuations. + * @note the caller is expected to take care of possibly destroying the + * text run if all userdata frames were reset (userdata is deallocated + * by this function though). The caller can detect this has occured by + * checking |aTextRun->GetUserData() == nsnull|. + */ static void -UnhookTextRunFromFrames(gfxTextRun* aTextRun) +UnhookTextRunFromFrames(gfxTextRun* aTextRun, nsTextFrame* aStartContinuation) { if (!aTextRun->GetUserData()) return; - // Kill all references to the textrun. It could be referenced by any of its - // owners, and all their in-flows. if (aTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_SIMPLE_FLOW) { - nsIFrame* firstInFlow = static_cast(aTextRun->GetUserData()); - ClearAllTextRunReferences(static_cast(firstInFlow), aTextRun); + nsIFrame* userDataFrame = static_cast(aTextRun->GetUserData()); + PRBool found = + ClearAllTextRunReferences(static_cast(userDataFrame), + aTextRun, aStartContinuation); + NS_ASSERTION(!aStartContinuation || found, + "aStartContinuation wasn't found in simple flow text run"); + if (!(userDataFrame->GetStateBits() & TEXT_IN_TEXTRUN_USER_DATA)) { + aTextRun->SetUserData(nsnull); + } } else { TextRunUserData* userData = static_cast(aTextRun->GetUserData()); - PRInt32 i; - for (i = 0; i < userData->mMappedFlowCount; ++i) { - ClearAllTextRunReferences(userData->mMappedFlows[i].mStartFrame, aTextRun); + PRInt32 destroyFromIndex = aStartContinuation ? -1 : 0; + for (PRInt32 i = 0; i < userData->mMappedFlowCount; ++i) { + nsTextFrame* userDataFrame = userData->mMappedFlows[i].mStartFrame; + PRBool found = + ClearAllTextRunReferences(userDataFrame, aTextRun, + aStartContinuation); + if (found) { + if (userDataFrame->GetStateBits() & TEXT_IN_TEXTRUN_USER_DATA) { + destroyFromIndex = i + 1; + } + else { + destroyFromIndex = i; + } + aStartContinuation = nsnull; + } + } + NS_ASSERTION(destroyFromIndex >= 0, + "aStartContinuation wasn't found in multi flow text run"); + if (destroyFromIndex == 0) { + DestroyUserData(userData); + aTextRun->SetUserData(nsnull); + } + else { + userData->mMappedFlowCount = destroyFromIndex; + if (userData->mLastFlowIndex >= destroyFromIndex) { + userData->mLastFlowIndex = destroyFromIndex - 1; + } } - DestroyUserData(userData); } - aTextRun->SetUserData(nsnull); } class FrameTextRunCache; @@ -375,7 +432,7 @@ // This gets called when the timeout has expired on a gfxTextRun virtual void NotifyExpired(gfxTextRun* aTextRun) { - UnhookTextRunFromFrames(aTextRun); + UnhookTextRunFromFrames(aTextRun, nsnull); RemoveFromCache(aTextRun); delete aTextRun; } @@ -1807,6 +1864,50 @@ } } +// Find the flow corresponding to aContent in aUserData +static inline TextRunMappedFlow* +FindFlowForContent(TextRunUserData* aUserData, nsIContent* aContent) +{ + // Find the flow that contains us + PRInt32 i = aUserData->mLastFlowIndex; + PRInt32 delta = 1; + PRInt32 sign = 1; + // Search starting at the current position and examine close-by + // positions first, moving further and further away as we go. + while (i >= 0 && i < aUserData->mMappedFlowCount) { + TextRunMappedFlow* flow = &aUserData->mMappedFlows[i]; + if (flow->mStartFrame->GetContent() == aContent) { + return flow; + } + + i += delta; + delta = -delta - sign; + sign = -sign; + } + + // We ran into an array edge. Add |delta| to |i| once more to get + // back to the side where we still need to search, then step in + // the |sign| direction. + i += delta; + if (sign > 0) { + for (; i < aUserData->mMappedFlowCount; ++i) { + TextRunMappedFlow* flow = &aUserData->mMappedFlows[i]; + if (flow->mStartFrame->GetContent() == aContent) { + return flow; + } + } + } else { + for (; i >= 0; --i) { + TextRunMappedFlow* flow = &aUserData->mMappedFlows[i]; + if (flow->mStartFrame->GetContent() == aContent) { + return flow; + } + } + } + + return nsnull; +} + void BuildTextRunsScanner::AssignTextRun(gfxTextRun* aTextRun) { @@ -1838,7 +1939,50 @@ } } #endif - f->ClearTextRun(); + + gfxTextRun* oldTextRun = f->GetTextRun(); + if (oldTextRun) { + nsTextFrame* firstFrame = nsnull; + PRUint32 startOffset = 0; + if (oldTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_SIMPLE_FLOW) { + firstFrame = static_cast(oldTextRun->GetUserData()); + } + else { + TextRunUserData* userData = static_cast(oldTextRun->GetUserData()); + firstFrame = userData->mMappedFlows[0].mStartFrame; + if (NS_UNLIKELY(f != firstFrame)) { + TextRunMappedFlow* flow = FindFlowForContent(userData, f->GetContent()); + if (flow) { + startOffset = flow->mDOMOffsetToBeforeTransformOffset; + } + else { + NS_ERROR("Can't find flow containing frame 'f'"); + } + } + } + + // Optimization: if |f| is the first frame in the flow then there are no + // prev-continuations that use |oldTextRun|. + nsTextFrame* clearFrom = nsnull; + if (NS_UNLIKELY(f != firstFrame)) { + // If all the frames in the mapped flow starting at |f| (inclusive) + // are empty then we let the prev-continuations keep the old text run. + gfxSkipCharsIterator iter(oldTextRun->GetSkipChars(), startOffset, f->GetContentOffset()); + PRUint32 textRunOffset = iter.ConvertOriginalToSkipped(f->GetContentOffset()); + clearFrom = textRunOffset == oldTextRun->GetLength() ? f : nsnull; + } + f->ClearTextRun(clearFrom); + +#ifdef DEBUG + if (firstFrame && !firstFrame->GetTextRun()) { + // oldTextRun was destroyed - assert that we don't reference it. + for (PRUint32 i = 0; i < mBreakSinks.Length(); ++i) { + NS_ASSERTION(oldTextRun != mBreakSinks[i]->mTextRun, + "destroyed text run is still in use"); + } + } +#endif + } f->SetTextRun(aTextRun); } // Set this bit now; we can't set it any earlier because @@ -3188,7 +3332,7 @@ void nsTextFrame::Destroy() { - ClearTextRun(); + ClearTextRun(nsnull); if (mNextContinuation) { mNextContinuation->SetPrevInFlow(nsnull); } @@ -3274,7 +3418,7 @@ if (prev->GetStyleContext() != GetStyleContext()) { // We're taking part of prev's text, and its style may be different // so clear its textrun which may no longer be valid (and don't set ours) - prev->ClearTextRun(); + prev->ClearTextRun(nsnull); } else { mTextRun = prev->GetTextRun(); } @@ -3330,7 +3474,7 @@ if ((GetStateBits() & TEXT_IN_TEXTRUN_USER_DATA) || !mPrevContinuation || mPrevContinuation->GetStyleContext() != GetStyleContext()) { - ClearTextRun(); + ClearTextRun(nsnull); } nsSplittableFrame::RemoveFromFlow(this); // Let the base class destroy the frame @@ -3506,15 +3650,15 @@ } void -nsTextFrame::ClearTextRun() +nsTextFrame::ClearTextRun(nsTextFrame* aStartContinuation) { - // save textrun because ClearAllTextRunReferences will clear ours + // save textrun because ClearAllTextRunReferences may clear ours gfxTextRun* textRun = mTextRun; if (!textRun) return; - UnhookTextRunFromFrames(textRun); + UnhookTextRunFromFrames(textRun, aStartContinuation); // see comments in BuildTextRunForFrames... // if (textRun->GetFlags() & gfxFontGroup::TEXT_IS_PERSISTENT) { // NS_ERROR("Shouldn't reach here for now..."); @@ -3527,7 +3671,8 @@ // return; // } - if (!(textRun->GetFlags() & gfxTextRunWordCache::TEXT_IN_CACHE)) { + if (!(textRun->GetFlags() & gfxTextRunWordCache::TEXT_IN_CACHE) && + !textRun->GetUserData()) { // Remove it now because it's not doing anything useful gTextRuns->RemoveFromCache(textRun); delete textRun; @@ -3539,7 +3684,7 @@ { nsTextFrame* f; for (f = aFrame; f; f = static_cast(f->GetNextInFlow())) { - f->ClearTextRun(); + f->ClearTextRun(nsnull); } } @@ -3589,7 +3734,7 @@ NS_IMETHODIMP nsTextFrame::DidSetStyleContext() { - ClearTextRun(); + ClearTextRun(nsnull); return NS_OK; } @@ -5068,7 +5213,7 @@ /* virtual */ void nsTextFrame::MarkIntrinsicWidthsDirty() { - ClearTextRun(); + ClearTextRun(nsnull); nsFrame::MarkIntrinsicWidthsDirty(); } @@ -5387,8 +5532,8 @@ // Our frame is shrinking. Give the text to our next in flow. f->mContentOffset = end; if (f->GetTextRun() != mTextRun) { - ClearTextRun(); - f->ClearTextRun(); + ClearTextRun(nsnull); + f->ClearTextRun(nsnull); } return; } @@ -5396,8 +5541,8 @@ // Our frame is growing. Take text from our in-flow. f->mContentOffset = end; if (f->GetTextRun() != mTextRun) { - ClearTextRun(); - f->ClearTextRun(); + ClearTextRun(nsnull); + f->ClearTextRun(nsnull); } f = static_cast(f->GetNextInFlow()); } @@ -5525,7 +5670,7 @@ // floating first-letter boundaries are significant in textrun // construction, so clear the textrun out every time we hit a first-letter // and have changed our length (which controls the first-letter boundary) - ClearTextRun(); + ClearTextRun(nsnull); // Find the length of the first-letter. We need a textrun for this. gfxSkipCharsIterator iter = EnsureTextRun(ctx, lineContainer, lineLayout.GetLine(), &flowEndInTextRun); @@ -5551,7 +5696,7 @@ // right first-letter boundary SetLength(offset + length - GetContentOffset()); // Ensure that the textrun will be rebuilt - ClearTextRun(); + ClearTextRun(nsnull); } } } @@ -5567,7 +5712,7 @@ // when the textrun was ended in the middle of a text node because a // preformatted newline was encountered, and prev-in-flow frames have // consumed all the text of the textrun. We need a new textrun. - ClearTextRun(); + ClearTextRun(nsnull); iter = EnsureTextRun(ctx, lineContainer, lineLayout.GetLine(), &flowEndInTextRun); } @@ -6180,12 +6325,10 @@ // Output the tag IndentBy(out, aIndent); ListTag(out); -#ifdef DEBUG_waterson - fprintf(out, " [parent=%p]", mParent); -#endif if (HasView()) { fprintf(out, " [view=%p]", static_cast(GetView())); } + fprintf(out, " [run=%p]", static_cast(mTextRun)); PRInt32 totalContentLength; nsCAutoString tmp; @@ -6312,7 +6455,7 @@ * This is called during bidi resolution from the block container, so we * shouldn't be holding a local reference to a textrun anywhere. */ - ClearTextRun(); + ClearTextRun(nsnull); nsTextFrame* prev = static_cast(GetPrevContinuation()); if (prev) { @@ -6321,7 +6464,7 @@ PRInt32 prevOffset = prev->GetContentOffset(); aStart = PR_MAX(aStart, prevOffset); aEnd = PR_MAX(aEnd, prevOffset); - prev->ClearTextRun(); + prev->ClearTextRun(nsnull); } mContentOffset = aStart; --- xulrunner-1.9.0.19.orig/layout/generic/nsColumnSetFrame.cpp +++ xulrunner-1.9.0.19/layout/generic/nsColumnSetFrame.cpp @@ -932,7 +932,7 @@ NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize); - NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus) || + NS_ASSERTION(NS_FRAME_IS_FULLY_COMPLETE(aStatus) || aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE, "Column set should be complete if the available height is unconstrained"); --- xulrunner-1.9.0.19.orig/layout/generic/nsFirstLetterFrame.cpp +++ xulrunner-1.9.0.19/layout/generic/nsFirstLetterFrame.cpp @@ -47,6 +47,10 @@ #include "nsAutoPtr.h" #include "nsStyleSet.h" #include "nsFrameManager.h" +#include "nsPlaceholderFrame.h" +#include "nsCSSFrameConstructor.h" + +NS_DEFINE_IID(kFirstLetterFrameCID, NS_FIRSTLETTER_FRAME_CID); nsIFrame* NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) @@ -54,6 +58,19 @@ return new (aPresShell) nsFirstLetterFrame(aContext); } +NS_IMETHODIMP +nsFirstLetterFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) +{ + NS_PRECONDITION(aInstancePtr, "null out param"); + + if (aIID.Equals(kFirstLetterFrameCID)) { + *aInstancePtr = this; + return NS_OK; + } + + return nsFirstLetterFrameSuper::QueryInterface(aIID, aInstancePtr); +} + #ifdef NS_DEBUG NS_IMETHODIMP nsFirstLetterFrame::GetFrameName(nsAString& aResult) const @@ -278,23 +295,32 @@ else { // Create a continuation for the child frame if it doesn't already // have one. - nsIFrame* nextInFlow; - rv = CreateNextInFlow(aPresContext, this, kid, nextInFlow); - if (NS_FAILED(rv)) { - return rv; - } + if (!GetStyleDisplay()->IsFloating()) { + nsIFrame* nextInFlow; + rv = CreateNextInFlow(aPresContext, this, kid, nextInFlow); + if (NS_FAILED(rv)) { + return rv; + } - // And then push it to our overflow list - if (nextInFlow) { - kid->SetNextSibling(nsnull); - SetOverflowFrames(aPresContext, nextInFlow); - } - else { - nsIFrame* nextSib = kid->GetNextSibling(); - if (nextSib) { + // And then push it to our overflow list + if (nextInFlow) { kid->SetNextSibling(nsnull); - SetOverflowFrames(aPresContext, nextSib); + SetOverflowFrames(aPresContext, nextInFlow); } + else { + nsIFrame* nextSib = kid->GetNextSibling(); + if (nextSib) { + kid->SetNextSibling(nsnull); + SetOverflowFrames(aPresContext, nextSib); + } + } + } else if (!kid->GetNextInFlow()) { + // For floating first letter frames (if a continuation wasn't already + // created for us) we need to put the continuation with the rest of the + // text that the first letter frame was made out of. + nsIFrame* continuation; + rv = CreateContinuationForFloatingParent(aPresContext, kid, + &continuation, PR_TRUE); } } @@ -311,6 +337,53 @@ return PR_TRUE; } +nsresult +nsFirstLetterFrame::CreateContinuationForFloatingParent(nsPresContext* aPresContext, + nsIFrame* aChild, + nsIFrame** aContinuation, + PRBool aIsFluid) +{ + NS_ASSERTION(GetStyleDisplay()->IsFloating(), + "can only call this on floating first letter frames"); + NS_PRECONDITION(aContinuation, "bad args"); + + *aContinuation = nsnull; + nsresult rv = NS_OK; + + nsIPresShell* presShell = aPresContext->PresShell(); + nsPlaceholderFrame* placeholderFrame = + presShell->FrameManager()->GetPlaceholderFrameFor(this); + nsIFrame* parent = placeholderFrame->GetParent(); + + nsIFrame* continuation; + rv = presShell->FrameConstructor()-> + CreateContinuingFrame(aPresContext, aChild, parent, &continuation, aIsFluid); + if (NS_FAILED(rv) || !continuation) { + return rv; + } + + // The continuation will have gotten the first letter style from it's + // prev continuation, so we need to repair the style context so it + // doesn't have the first letter styling. + nsStyleContext* parentSC = this->GetStyleContext()->GetParent(); + if (parentSC) { + nsRefPtr newSC; + newSC = presShell->StyleSet()->ResolveStyleForNonElement(parentSC); + if (newSC) { + continuation->SetStyleContext(newSC); + } + } + + //XXX Bidi may not be involved but we have to use the list name + // nsGkAtoms::nextBidi because this is just like creating a continuation + // except we have to insert it in a different place and we don't want a + // reflow command to try to be issued. + rv = parent->InsertFrames(nsGkAtoms::nextBidi, placeholderFrame, continuation); + + *aContinuation = continuation; + return rv; +} + void nsFirstLetterFrame::DrainOverflowFrames(nsPresContext* aPresContext) { --- xulrunner-1.9.0.19.orig/layout/generic/nsTextFrame.h +++ xulrunner-1.9.0.19/layout/generic/nsTextFrame.h @@ -29,7 +29,7 @@ * Daniel Glazman * Neil Deakin * Masayuki Nakano - * Mats Palmgren + * Mats Palmgren * Uri Bernstein * Stephen Blackheath * @@ -315,9 +315,6 @@ // boundary. PRInt32 GetInFlowContentLength(); - // Clears out mTextRun from this frame and all other frames that hold a reference - // to it, then deletes the textrun. - void ClearTextRun(); /** * Acquires the text run for this content, if necessary. * @param aRC the rendering context to use as a reference for creating @@ -337,6 +334,12 @@ gfxTextRun* GetTextRun() { return mTextRun; } void SetTextRun(gfxTextRun* aTextRun) { mTextRun = aTextRun; } + /** + * Clears out |mTextRun| from all frames that hold a reference to it, + * starting at |aStartContinuation|, or if it's nsnull, starting at |this|. + * Deletes |mTextRun| if all references were cleared and it's not cached. + */ + void ClearTextRun(nsTextFrame* aStartContinuation); // Get the DOM content range mapped by this frame after excluding // whitespace subject to start-of-line and end-of-line trimming. --- xulrunner-1.9.0.19.orig/layout/generic/nsPageContentFrame.h +++ xulrunner-1.9.0.19/layout/generic/nsPageContentFrame.h @@ -55,6 +55,11 @@ nsReflowStatus& aStatus); virtual PRBool IsContainingBlock() const; + virtual PRBool IsFrameOfType(PRUint32 aFlags) const + { + return ViewportFrame::IsFrameOfType(aFlags & + ~(nsIFrame::eCanContainOverflowContainers)); + } virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; } --- xulrunner-1.9.0.19.orig/build/unix/mozilla-config.in +++ xulrunner-1.9.0.19/build/unix/mozilla-config.in @@ -22,7 +22,6 @@ xpcom nspr js - jsj gfx EOF exit $1 @@ -60,9 +59,6 @@ exit 0 ;; --cflags) - if test "%includedir%" != /usr/include ; then - includes="-I%includedir%" - fi echo_cflags=yes ;; --defines) @@ -74,7 +70,7 @@ --idlflags) echo_idlflags=yes ;; - xpcom|js|nspr|gfx|jsj) + xpcom|js|nspr|gfx) echo_components="$echo_components $1" echo_libraries="$echo_libraries $1" ;; @@ -105,7 +101,17 @@ if test "$echo_cflags" = "yes"; then nspr_cflags="%FULL_NSPR_CFLAGS%" for n in $echo_components; do - component_includes="$component_includes -I%includedir%/$n" + case "$n" in + js) + component_includes="$component_includes -I/usr/include/mozjs" + ;; + nspr) + ;; + *) + component_includes="$component_includes -I%includedir% \ + -I%includedir%/$n" + ;; + esac done echo $component_includes $includes $nspr_cflags fi @@ -133,10 +139,7 @@ js) libs="$libs $_js_libs" ;; - jsj) - libs="$libs -ljsj $_js_libs $_xpcom_libs" - ;; esac done - echo -L%libdir% $libs + echo $libs fi --- xulrunner-1.9.0.19.orig/build/unix/run-mozilla.sh +++ xulrunner-1.9.0.19/build/unix/run-mozilla.sh @@ -163,7 +163,13 @@ ## ## Run the program ## - "$prog" ${1+"$@"} + if [ "$MOZILLA_JEMALLOC" ] && + [ -f "$MOZILLA_FIVE_HOME/libjemalloc.so" ]; then + LD_PRELOAD="${LD_PRELOAD+$LD_PRELOAD:}$MOZILLA_FIVE_HOME/libjemalloc.so" "$prog" ${1+"$@"} + else + "$prog" ${1+"$@"} + fi + exitcode=$? if [ "$DEBUG_CORE_FILES" ] then @@ -230,6 +236,10 @@ echo " '$PARAM'" | perl -pe 'chomp' >> $tmpfile done echo >> $tmpfile + if [ "$MOZILLA_JEMALLOC" ] && + [ -f "$MOZILLA_FIVE_HOME/libjemalloc.so" ]; then + echo "set env LD_PRELOAD '${LD_PRELOAD+$LD_PRELOAD:}$MOZILLA_FIVE_HOME/libjemalloc.so'" >> $tmpfile + fi # If you are not using ddd, gdb and know of a way to convey the arguments # over to the prog then add that here- Gagan Saksena 03/15/00 case `basename $debugger` in @@ -353,36 +363,36 @@ ## a symbolic link, all other shared libraries are symbolic links also. if [ `uname -s` != "SunOS" -o -h "$MOZ_DIST_BIN/libmozjs.so" ] then - LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} + LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH:+":$LD_LIBRARY_PATH"} fi if [ -n "$LD_LIBRARYN32_PATH" ] then - LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN32_PATH+":$LD_LIBRARYN32_PATH"} + LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN32_PATH:+":$LD_LIBRARYN32_PATH"} fi if [ -n "$LD_LIBRARYN64_PATH" ] then - LD_LIBRARYN64_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN64_PATH+":$LD_LIBRARYN64_PATH"} + LD_LIBRARYN64_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN64_PATH:+":$LD_LIBRARYN64_PATH"} fi if [ -n "$LD_LIBRARY_PATH_64" ]; then - LD_LIBRARY_PATH_64=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH_64+":$LD_LIBRARY_PATH_64"} + LD_LIBRARY_PATH_64=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH_64:+":$LD_LIBRARY_PATH_64"} fi # # ## Set SHLIB_PATH for HPUX -SHLIB_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${SHLIB_PATH+":$SHLIB_PATH"} +SHLIB_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${SHLIB_PATH:+":$SHLIB_PATH"} # ## Set LIBPATH for AIX -LIBPATH=${MOZ_DIST_BIN}:${MRE_HOME}${LIBPATH+":$LIBPATH"} +LIBPATH=${MOZ_DIST_BIN}:${MRE_HOME}${LIBPATH:+":$LIBPATH"} # ## Set DYLD_LIBRARY_PATH for Mac OS X (Darwin) -DYLD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${DYLD_LIBRARY_PATH+":$DYLD_LIBRARY_PATH"} +DYLD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${DYLD_LIBRARY_PATH:+":$DYLD_LIBRARY_PATH"} # ## Set LIBRARY_PATH for BeOS -LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/components:${MRE_HOME}${LIBRARY_PATH+":$LIBRARY_PATH"} +LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/components:${MRE_HOME}${LIBRARY_PATH:+":$LIBRARY_PATH"} # ## Set ADDON_PATH for BeOS -ADDON_PATH=${MOZ_DIST_BIN}${ADDON_PATH+":$ADDON_PATH"} +ADDON_PATH=${MOZ_DIST_BIN}${ADDON_PATH:+":$ADDON_PATH"} # ## Solaris Xserver(Xsun) tuning - use shared memory transport if available if [ "$XSUNTRANSPORT" = "" ] --- xulrunner-1.9.0.19.orig/modules/libpr0n/decoders/png/nsPNGDecoder.h +++ xulrunner-1.9.0.19/modules/libpr0n/decoders/png/nsPNGDecoder.h @@ -73,7 +73,9 @@ void CreateFrame(png_uint_32 x_offset, png_uint_32 y_offset, PRInt32 width, PRInt32 height, gfx_format format); +#ifdef APNG void SetAnimFrameInfo(); +#endif void EndImageFrame(); @@ -94,7 +96,9 @@ PRUint8 mChannels; PRPackedBool mError; PRPackedBool mFrameHasNoAlpha; +#ifdef APNG PRPackedBool mFrameIsHidden; +#endif }; #endif // nsPNGDecoder_h__ --- xulrunner-1.9.0.19.orig/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ xulrunner-1.9.0.19/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -62,7 +62,9 @@ static void PNGAPI info_callback(png_structp png_ptr, png_infop info_ptr); static void PNGAPI row_callback(png_structp png_ptr, png_bytep new_row, png_uint_32 row_num, int pass); +#ifdef APNG static void PNGAPI frame_info_callback(png_structp png_ptr, png_uint_32 frame_num); +#endif static void PNGAPI end_callback(png_structp png_ptr, png_infop info_ptr); static void PNGAPI error_callback(png_structp png_ptr, png_const_charp error_msg); static void PNGAPI warning_callback(png_structp png_ptr, png_const_charp warning_msg); @@ -86,7 +88,10 @@ mPNG(nsnull), mInfo(nsnull), mCMSLine(nsnull), interlacebuf(nsnull), mInProfile(nsnull), mTransform(nsnull), - mChannels(0), mError(PR_FALSE), mFrameIsHidden(PR_FALSE) + mChannels(0), mError(PR_FALSE) +#ifdef APNG + , mFrameIsHidden(PR_FALSE) +#endif { } @@ -117,8 +122,10 @@ if (NS_FAILED(rv)) longjmp(mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY +#ifdef APNG if (png_get_valid(mPNG, mInfo, PNG_INFO_acTL)) SetAnimFrameInfo(); +#endif mImage->AppendFrame(mFrame); @@ -134,6 +141,7 @@ mFrameHasNoAlpha = PR_TRUE; } +#ifdef APNG // set timeout and frame disposal method for the current frame void nsPNGDecoder::SetAnimFrameInfo() { @@ -173,6 +181,7 @@ /*else // 'over' is the default for a gfxImageFrame mFrame->SetBlendMethod(imgIContainer::kBlendOver); */ } +#endif // set timeout and frame disposal method for the current frame void nsPNGDecoder::EndImageFrame() @@ -240,7 +249,7 @@ /* Always decode to 24 bit pixdepth */ #ifdef PNG_USER_MEM_SUPPORTED - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) { + if (gfxPlatform::IsCMSEnabled()) { mPNG = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL, error_callback, @@ -277,7 +286,7 @@ # if PNG_LIBPNG_VER < 10401 # if defined(PNG_WRITE_SUPPORTED) - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) { + if (gfxPlatform::IsCMSEnabled()) { /* Increase speed of decompressing large iCCP chunks (default buffer size is 8192) */ png_set_compression_buffer_size(mPNG, (png_size_t)32768L); @@ -302,11 +311,16 @@ return NS_ERROR_OUT_OF_MEMORY; mImageLoad->SetImage(mImage); - if (NS_FAILED(mImage->SetDiscardable("image/png"))) { - PR_LOG(gPNGDecoderAccountingLog, PR_LOG_DEBUG, - ("PNGDecoderAccounting: info_callback(): failed to set image container %p as discardable", - mImage.get())); - return NS_ERROR_FAILURE; + + // Don't discard if we're multipart, and assume we are for safety. + PRBool multipart = PR_TRUE; + if (NS_SUCCEEDED(mImageLoad->GetIsMultiPartChannel(&multipart)) && !multipart) { + if (NS_FAILED(mImage->SetDiscardable("image/png"))) { + PR_LOG(gPNGDecoderAccountingLog, PR_LOG_DEBUG, + ("PNGDecoderAccounting: info_callback(): failed to set image container %p as discardable", + mImage.get())); + return NS_ERROR_FAILURE; + } } } @@ -671,12 +685,15 @@ } } +#ifdef APNG if (png_get_valid(png_ptr, info_ptr, PNG_INFO_acTL)) png_set_progressive_frame_fn(png_ptr, frame_info_callback, NULL); if (png_get_first_frame_is_hidden(png_ptr, info_ptr)) { decoder->mFrameIsHidden = PR_TRUE; - } else { + } else +#endif + { decoder->CreateFrame(0, 0, width, height, decoder->format); } @@ -699,7 +716,7 @@ #ifdef PNG_USER_MEM_SUPPORTED /* Revert to the default memory allocator */ - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) + if (gfxPlatform::IsCMSEnabled()) png_set_mem_fn(decoder->mPNG, NULL, NULL, NULL); #endif @@ -707,7 +724,7 @@ # if PNG_LIBPNG_VER < 10401 # if defined(PNG_WRITE_SUPPORTED) /* Revert to the default zlib buffer size */ - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) { + if (gfxPlatform::IsCMSEnabled()) { png_set_compression_buffer_size(decoder->mPNG, (png_size_t)8192); } # endif @@ -721,8 +738,10 @@ */ png_set_crc_action(png_ptr, NULL, PNG_CRC_ERROR_QUIT); +#ifdef APNG if (png_get_first_frame_is_hidden(png_ptr, info_ptr)) decoder->mFrame = nsnull; +#endif return; } @@ -760,9 +779,16 @@ */ nsPNGDecoder *decoder = static_cast(png_get_progressive_ptr(png_ptr)); +#ifdef APNG // skip this frame if (decoder->mFrameIsHidden) return; +#endif + + PRInt32 height; + decoder->mFrame->GetHeight(&height); + if (row_num >= height) + return; if (new_row) { PRInt32 width; @@ -862,6 +888,7 @@ } } +#ifdef APNG // got the header of a new frame that's coming void frame_info_callback(png_structp png_ptr, png_uint_32 frame_num) @@ -871,11 +898,15 @@ nsPNGDecoder *decoder = static_cast(png_get_progressive_ptr(png_ptr)); +#ifdef APNG // old frame is done if (!decoder->mFrameIsHidden) +#endif decoder->EndImageFrame(); +#ifdef APNG decoder->mFrameIsHidden = PR_FALSE; +#endif x_offset = png_get_next_frame_x_offset(png_ptr, decoder->mInfo); y_offset = png_get_next_frame_y_offset(png_ptr, decoder->mInfo); @@ -884,6 +915,7 @@ decoder->CreateFrame(x_offset, y_offset, width, height, decoder->format); } +#endif void end_callback(png_structp png_ptr, png_infop info_ptr) @@ -902,12 +934,14 @@ nsPNGDecoder *decoder = static_cast(png_get_progressive_ptr(png_ptr)); +#ifdef APNG if (png_get_valid(png_ptr, info_ptr, PNG_INFO_acTL)) { PRInt32 num_plays = png_get_num_plays(png_ptr, info_ptr); decoder->mImage->SetLoopCount(num_plays - 1); } if (!decoder->mFrameIsHidden) +#endif decoder->EndImageFrame(); decoder->mImage->DecodingComplete(); --- xulrunner-1.9.0.19.orig/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp +++ xulrunner-1.9.0.19/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp @@ -192,12 +192,17 @@ return NS_ERROR_OUT_OF_MEMORY; mImageLoad->SetImage(mImage); - nsresult result = mImage->SetDiscardable("image/jpeg"); - if (NS_FAILED(result)) { - mState = JPEG_ERROR; - PR_LOG(gJPEGDecoderAccountingLog, PR_LOG_DEBUG, - (" (could not set image container to discardable)")); - return result; + + // Don't discard if we're multipart, and assume we are for safety. + PRBool multipart = PR_TRUE; + if (NS_SUCCEEDED(mImageLoad->GetIsMultiPartChannel(&multipart)) && !multipart) { + nsresult result = mImage->SetDiscardable("image/jpeg"); + if (NS_FAILED(result)) { + mState = JPEG_ERROR; + PR_LOG(gJPEGDecoderAccountingLog, PR_LOG_DEBUG, + (" (could not set image container to discardable)")); + return result; + } } } --- xulrunner-1.9.0.19.orig/modules/libpr0n/encoders/png/nsPNGEncoder.cpp +++ xulrunner-1.9.0.19/modules/libpr0n/encoders/png/nsPNGEncoder.cpp @@ -51,7 +51,9 @@ NS_IMPL_THREADSAFE_ISUPPORTS2(nsPNGEncoder, imgIEncoder, nsIInputStream) nsPNGEncoder::nsPNGEncoder() : mPNG(nsnull), mPNGinfo(nsnull), +#ifdef APNG mIsAnimation(PR_FALSE), +#endif mImageBuffer(nsnull), mImageBufferSize(0), mImageBufferUsed(0), mImageBufferReadPoint(0) { @@ -109,9 +111,12 @@ PRUint32 aInputFormat, const nsAString& aOutputOptions) { - PRBool useTransparency = PR_TRUE, skipFirstFrame = PR_FALSE; + PRBool useTransparency = PR_TRUE; +#ifdef APNG + PRBool skipFirstFrame = PR_FALSE; PRUint32 numFrames = 1; PRUint32 numPlays = 0; // For animations, 0 == forever +#endif // can't initialize more than once if (mImageBuffer != nsnull) @@ -124,14 +129,19 @@ return NS_ERROR_INVALID_ARG; // parse and check any provided output options - nsresult rv = ParseOptions(aOutputOptions, &useTransparency, &skipFirstFrame, - &numFrames, &numPlays, nsnull, nsnull, - nsnull, nsnull, nsnull); + nsresult rv = ParseOptions(aOutputOptions, &useTransparency, +#ifdef APNG + &skipFirstFrame, &numFrames, &numPlays, + nsnull, nsnull, nsnull, +#endif + nsnull, nsnull); if (rv != NS_OK) { return rv; } +#ifdef APNG if (numFrames > 1) { mIsAnimation = PR_TRUE; } +#endif // initialize mPNG = png_create_write_struct(PNG_LIBPNG_VER_STRING, @@ -181,10 +191,12 @@ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); +#ifdef APNG if (mIsAnimation) { png_set_first_frame_is_hidden(mPNG, mPNGinfo, skipFirstFrame); png_set_acTL(mPNG, mPNGinfo, numFrames, numPlays); } +#endif // XXX: support PLTE, gAMA, tRNS, bKGD? @@ -203,9 +215,11 @@ const nsAString& aFrameOptions) { PRBool useTransparency= PR_TRUE; +#ifdef APNG PRUint32 delay_ms = 500; PRUint32 dispose_op = PNG_DISPOSE_OP_NONE; PRUint32 blend_op = PNG_BLEND_OP_SOURCE; +#endif PRUint32 x_offset = 0, y_offset = 0; // must be initialized @@ -229,17 +243,22 @@ } // parse and check any provided output options - nsresult rv = ParseOptions(aFrameOptions, &useTransparency, nsnull, - nsnull, nsnull, &dispose_op, &blend_op, - &delay_ms, &x_offset, &y_offset); + nsresult rv = ParseOptions(aFrameOptions, &useTransparency, +#ifdef APNG + nsnull, nsnull, nsnull, &dispose_op, + &blend_op, &delay_ms, +#endif + &x_offset, &y_offset); if (rv != NS_OK) { return rv; } +#ifdef APNG if (mIsAnimation) { // XXX the row pointers arg (#3) is unused, can it be removed? png_write_frame_head(mPNG, mPNGinfo, nsnull, aWidth, aHeight, x_offset, y_offset, delay_ms, 1000, dispose_op, blend_op); } +#endif // Stride is the padded width of each row, so it better be longer (I'm afraid // people will not understand what stride means, so check it well) @@ -283,9 +302,11 @@ return NS_ERROR_INVALID_ARG; } +#ifdef APNG if (mIsAnimation) { png_write_frame_tail(mPNG, mPNGinfo); } +#endif return NS_OK; } @@ -321,12 +342,14 @@ nsresult nsPNGEncoder::ParseOptions(const nsAString& aOptions, PRBool* useTransparency, +#ifdef APNG PRBool* skipFirstFrame, PRUint32* numFrames, PRUint32* numPlays, PRUint32* frameDispose, PRUint32* frameBlend, PRUint32* frameDelay, +#endif PRUint32* offsetX, PRUint32* offsetY) { @@ -355,6 +378,7 @@ return NS_ERROR_INVALID_ARG; } +#ifdef APNG // skipfirstframe=[yes|no] } else if (nsCRT::strcmp(token, "skipfirstframe") == 0 && skipFirstFrame) { if (!value) { return NS_ERROR_INVALID_ARG; } @@ -414,6 +438,7 @@ if (!value) { return NS_ERROR_INVALID_ARG; } if (PR_sscanf(value, "%u", frameDelay) != 1) { return NS_ERROR_INVALID_ARG; } +#endif // xoffset=# } else if (nsCRT::strcmp(token, "xoffset") == 0 && offsetX) { --- xulrunner-1.9.0.19.orig/modules/libpr0n/encoders/png/nsPNGEncoder.h +++ xulrunner-1.9.0.19/modules/libpr0n/encoders/png/nsPNGEncoder.h @@ -65,12 +65,14 @@ protected: nsresult ParseOptions(const nsAString& aOptions, PRBool* useTransparency, +#ifdef APNG PRBool* skipFirstFrame, PRUint32* numAnimatedFrames, PRUint32* numIterations, PRUint32* frameDispose, PRUint32* frameBlend, PRUint32* frameDelay, +#endif PRUint32* offsetX, PRUint32* offsetY); void ConvertHostARGBRow(const PRUint8* aSrc, PRUint8* aDest, @@ -83,7 +85,9 @@ png_struct* mPNG; png_info* mPNGinfo; +#ifdef APNG PRBool mIsAnimation; +#endif // image buffer PRUint8* mImageBuffer; --- xulrunner-1.9.0.19.orig/modules/libpref/src/prefread.h +++ xulrunner-1.9.0.19/modules/libpref/src/prefread.h @@ -62,7 +62,8 @@ const char *pref, PrefValue val, PrefType type, - PRBool defPref); + PRBool defPref, + PRBool lockPref); /* structure fields are private */ typedef struct PrefParseState { @@ -83,6 +84,7 @@ char *vb; /* value buffer (ptr into lb) */ PrefType vtype; /* PREF_STRING,INT,BOOL */ PRBool fdefault; /* PR_TRUE if (default) pref */ + PRBool flock; /* PR_TRUE if pref to be locked */ } PrefParseState; /** --- xulrunner-1.9.0.19.orig/modules/libpref/src/prefread.cpp +++ xulrunner-1.9.0.19/modules/libpref/src/prefread.cpp @@ -75,6 +75,7 @@ #define BITS_PER_HEX_DIGIT 4 static const char kUserPref[] = "user_pref"; +static const char kLockPref[] = "lockPref"; static const char kPref[] = "pref"; static const char kTrue[] = "true"; static const char kFalse[] = "false"; @@ -161,7 +162,7 @@ default: break; } - (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault); + (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault, ps->flock); return PR_TRUE; } @@ -220,6 +221,7 @@ ps->vb = NULL; ps->vtype = PREF_INVALID; ps->fdefault = PR_FALSE; + ps->flock = PR_FALSE; } switch (c) { case '/': /* begin comment block or line? */ @@ -230,7 +232,9 @@ break; case 'u': /* indicating user_pref */ case 'p': /* indicating pref */ - ps->smatch = (c == 'u' ? kUserPref : kPref); + case 'l': /* indicating lockPref */ + ps->smatch = (c == 'u' ? kUserPref : + (c == 'p' ? kPref : kLockPref)); ps->sindex = 1; ps->nextstate = PREF_PARSE_UNTIL_OPEN_PAREN; state = PREF_PARSE_MATCH_STRING; @@ -274,7 +278,8 @@ /* name parsing */ case PREF_PARSE_UNTIL_NAME: if (c == '\"' || c == '\'') { - ps->fdefault = (ps->smatch == kPref); + ps->fdefault = (ps->smatch != kUserPref); + ps->flock = (ps->smatch == kLockPref); ps->quotechar = c; ps->nextstate = PREF_PARSE_UNTIL_COMMA; /* return here when done */ state = PREF_PARSE_QUOTED_STRING; --- xulrunner-1.9.0.19.orig/modules/libpref/src/prefapi.cpp +++ xulrunner-1.9.0.19/modules/libpref/src/prefapi.cpp @@ -336,8 +336,6 @@ pref->userPref, (PrefType) PREF_TYPE(pref))) sourcePref = &pref->userPref; - else if (PREF_IS_LOCKED(pref)) - sourcePref = &pref->defaultPref; else // do not save default prefs that haven't changed return PL_DHASH_NEXT; @@ -957,7 +955,10 @@ const char *pref, PrefValue value, PrefType type, - PRBool isDefault) + PRBool isDefault, + PRBool isLocked) { pref_HashPref(pref, value, type, isDefault); + if (isLocked) + PREF_LockPref(pref, PR_TRUE); } --- xulrunner-1.9.0.19.orig/modules/libpref/src/prefapi.h +++ xulrunner-1.9.0.19/modules/libpref/src/prefapi.h @@ -207,7 +207,8 @@ const char *pref, PrefValue value, PrefType type, - PRBool isDefault); + PRBool isDefault, + PRBool isLocked); NSPR_END_EXTERN_C #endif --- xulrunner-1.9.0.19.orig/modules/libpref/src/init/all.js +++ xulrunner-1.9.0.19/modules/libpref/src/init/all.js @@ -501,6 +501,7 @@ pref("javascript.allow.mailnews", false); pref("javascript.options.strict", false); pref("javascript.options.relimit", false); +pref("javascript.options.showInConsole", true); // advanced prefs pref("security.enable_java", true); @@ -2229,7 +2230,7 @@ pref("network.hosts.smtp_server", "localhost"); pref("network.hosts.pop_server", "pop"); pref("network.protocol-handler.warn-external.file", false); -pref("layout.css.dpi", -1); // max(96dpi, System setting) +pref("layout.css.dpi", 0); // System setting pref("browser.drag_out_of_frame_style", 1); pref("editor.singleLine.pasteNewlines", 0); @@ -2258,7 +2259,7 @@ pref("ui.allow_platform_file_picker", true); // should NetworkManager be authoritative for online/offline status? -pref("toolkit.networkmanager.disable", false); +pref("toolkit.networkmanager.disable", true); pref("helpers.global_mime_types_file", "/etc/mime.types"); pref("helpers.global_mailcap_file", "/etc/mailcap"); --- xulrunner-1.9.0.19.orig/modules/libjar/nsJAR.h +++ xulrunner-1.9.0.19/modules/libjar/nsJAR.h @@ -133,6 +133,9 @@ mCache = cache; } + PRInt64 GetMtime() { + return mMtime; + } protected: //-- Private data members nsCOMPtr mZipFile; // The zip/jar file on disk @@ -144,6 +147,7 @@ PRIntervalTime mReleaseTime; // used by nsZipReaderCache for flushing entries nsZipReaderCache* mCache; // if cached, this points to the cache it's contained in PRLock* mLock; + PRInt64 mMtime; PRInt32 mTotalItemsInManifest; //-- Private functions --- xulrunner-1.9.0.19.orig/modules/libjar/nsJAR.cpp +++ xulrunner-1.9.0.19/modules/libjar/nsJAR.cpp @@ -127,6 +127,7 @@ mReleaseTime(PR_INTERVAL_NO_TIMEOUT), mCache(nsnull), mLock(nsnull), + mMtime(0), mTotalItemsInManifest(0) { } @@ -170,13 +171,16 @@ if (mLock) return NS_ERROR_FAILURE; // Already open! mZipFile = zipFile; + nsresult rv = zipFile->GetLastModifiedTime(&mMtime); + if (NS_FAILED(rv)) return rv; + mLock = PR_NewLock(); NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY); PRFileDesc *fd = OpenFile(); NS_ENSURE_TRUE(fd, NS_ERROR_FAILURE); - nsresult rv = mZip.OpenArchive(fd); + rv = mZip.OpenArchive(fd); if (NS_FAILED(rv)) Close(); return rv; @@ -1121,6 +1125,7 @@ { NS_ENSURE_ARG_POINTER(zipFile); nsresult rv; + nsCOMPtr antiLockZipGrip; nsAutoLock lock(mLock); #ifdef ZIP_CACHE_HIT_RATE @@ -1131,15 +1136,23 @@ rv = zipFile->GetNativePath(path); if (NS_FAILED(rv)) return rv; + PRInt64 Mtime; + rv = zipFile->GetLastModifiedTime(&Mtime); + if (NS_FAILED(rv)) return rv; + nsCStringKey key(path); nsJAR* zip = static_cast(static_cast(mZips.Get(&key))); // AddRefs - if (zip) { + if (zip && (Mtime == zip->GetMtime())) { #ifdef ZIP_CACHE_HIT_RATE mZipCacheHits++; #endif zip->ClearReleaseTime(); } else { + if (zip) { + antiLockZipGrip = zip; + mZips.Remove(&key); + } zip = new nsJAR(); if (zip == nsnull) return NS_ERROR_OUT_OF_MEMORY; --- xulrunner-1.9.0.19.orig/modules/plugin/base/src/nsPluginHostImpl.cpp +++ xulrunner-1.9.0.19/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -260,6 +260,24 @@ nsIFile *nsPluginHostImpl::sPluginTempDir; nsPluginHostImpl *nsPluginHostImpl::sInst; +// Globally disable plugins +static +int pluginsdisabled() +{ + static int _disabled = -1; + + if (_disabled >= 0) + return _disabled; + + const char *env = PR_GetEnv("MOZILLA_DISABLE_PLUGINS"); + if (env && env[0]) + _disabled = 1; + else + _disabled = 0; + + return _disabled; +} + //////////////////////////////////////////////////////////////////////// // flat file reg funcs static @@ -5380,6 +5398,10 @@ // possible reset in subsequent ScanPluginsDirectory calls PRBool pluginschanged = PR_FALSE; + if (pluginsdisabled()) { + mPluginsLoaded = PR_TRUE; + return NS_OK; + } // Scan the app-defined list of plugin dirs. rv = dirService->Get(NS_APP_PLUGINS_DIR_LIST, NS_GET_IID(nsISimpleEnumerator), getter_AddRefs(dirList)); if (NS_SUCCEEDED(rv)) { @@ -5694,6 +5716,9 @@ nsresult nsPluginHostImpl::ReadPluginInfo() { + if (pluginsdisabled()) + return NS_ERROR_FAILURE; + nsresult rv; nsCOMPtr directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID,&rv)); --- xulrunner-1.9.0.19.orig/modules/plugin/base/src/nsJSNPRuntime.cpp +++ xulrunner-1.9.0.19/modules/plugin/base/src/nsJSNPRuntime.cpp @@ -1045,7 +1045,8 @@ NPObject *npobj = (NPObject *)::JS_GetPrivate(cx, obj); - return _retainobject(npobj); + if (LookupNPP(npobj) == npp) + return _retainobject(npobj); } if (!sJSObjWrappers.ops) { @@ -1960,10 +1961,8 @@ LookupNPP(NPObject *npobj) { if (npobj->_class == &nsJSObjWrapper::sJSObjWrapperNPClass) { - NS_ERROR("NPP requested for NPObject of class " - "nsJSObjWrapper::sJSObjWrapperNPClass!\n"); - - return nsnull; + nsJSObjWrapper* o = static_cast(npobj); + return o->mNpp; } NPObjWrapperHashEntry *entry = static_cast --- xulrunner-1.9.0.19.orig/modules/oji/src/nsCSecurityContext.h +++ xulrunner-1.9.0.19/modules/oji/src/nsCSecurityContext.h @@ -50,6 +50,7 @@ #include "nsISecurityContext.h" #include "nsIPrincipal.h" #include "nsCOMPtr.h" +#include "nsString.h" struct JSContext; @@ -105,13 +106,22 @@ nsCSecurityContext(nsIPrincipal* principal); virtual ~nsCSecurityContext(void); + //////////////////////////////////////////////////////////////////////////// + // Miscellaneous + + const nsCString& GetFakeOrigin() const { return mFakeOrigin; } + void SetFakeOrigin(nsCString& fakeOrigin) { mFakeOrigin.Assign(fakeOrigin); } + protected: JSStackFrame *m_pJStoJavaFrame; JSContext *m_pJSCX; private: + nsresult GetOriginImpl(nsXPIDLCString& origin); + nsCOMPtr m_pPrincipal; PRBool m_HasUniversalJavaCapability; PRBool m_HasUniversalBrowserReadCapability; + nsXPIDLCString mFakeOrigin; }; #endif // nsCSecurityContext_h___ --- xulrunner-1.9.0.19.orig/modules/oji/src/nsCSecurityContext.cpp +++ xulrunner-1.9.0.19/modules/oji/src/nsCSecurityContext.cpp @@ -57,6 +57,7 @@ #include "nsIScriptSecurityManager.h" #include "nsIServiceManager.h" #include "nsCRT.h" +#include "nsNetUtil.h" #include "nsTraceRefcnt.h" @@ -103,38 +104,70 @@ return NS_OK; } - -NS_METHOD -nsCSecurityContext::GetOrigin(char* buf, int buflen) +nsresult +nsCSecurityContext::GetOriginImpl(nsXPIDLCString& origin) { + nsresult rv = NS_OK; + if (!m_pPrincipal) { // Get the Script Security Manager. - nsresult rv = NS_OK; nsCOMPtr secMan = do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv); - if (NS_FAILED(rv) || !secMan) { + if (NS_FAILED(rv) || !secMan) return NS_ERROR_FAILURE; - } secMan->GetSubjectPrincipal(getter_AddRefs(m_pPrincipal)); - if (!m_pPrincipal) { + if (!m_pPrincipal) return NS_ERROR_FAILURE; - } } - nsXPIDLCString origin; m_pPrincipal->GetOrigin(getter_Copies(origin)); + if (origin.IsEmpty()) + return NS_ERROR_FAILURE; + + return NS_OK; +} + +// This method is called from the OJI plugin without checking its return +// value (from getAndPackSecurityInfo() in remotejni.cpp). So we need to +// set the origin appropriately except in the very worst of circumstances, +// and only then do an error return. +NS_METHOD +nsCSecurityContext::GetOrigin(char* buf, int buflen) +{ + nsXPIDLCString origin; + PRBool javaCompatible = PR_FALSE; + + if (NS_SUCCEEDED(GetOriginImpl(origin))) { + if (NS_FAILED(NS_CheckIsJavaCompatibleURLString(origin, &javaCompatible))) + javaCompatible = PR_FALSE; + } else { + javaCompatible = PR_FALSE; + } PRInt32 originlen = origin.Length(); - if (origin.IsEmpty() || originlen > buflen - 1) { - return NS_ERROR_FAILURE; + + // Don't pass back a value that Java won't be able to understand or + // won't handle correctly. Instead pass back something that Java will + // understand but won't be able to use to access the network, and for + // which same-origin checks will always fail. + if (!javaCompatible) { + if (mFakeOrigin.IsVoid()) { + if (NS_FAILED(NS_MakeRandomInvalidURLString(mFakeOrigin))) + return NS_ERROR_FAILURE; + } + origin.Assign(mFakeOrigin); + originlen = origin.Length(); } + if (originlen > buflen - 1) + return NS_ERROR_FAILURE; + // Copy the string into to user supplied buffer. Is there a better // way to do this? memcpy(buf, origin, originlen); - buf[originlen] = nsnull; // Gotta terminate it. + buf[originlen] = '\0'; // Gotta terminate it. return NS_OK; } --- xulrunner-1.9.0.19.orig/modules/oji/src/ProxyJNI.cpp +++ xulrunner-1.9.0.19/modules/oji/src/ProxyJNI.cpp @@ -47,6 +47,7 @@ #include "nsVoidArray.h" #include "plstr.h" #include "ProxyClassLoader.h" +#include "nsCSecurityContext.h" #include "ProxyJNI.h" #include "nsDataHashtable.h" @@ -281,6 +282,7 @@ nsISecureEnv* mSecureEnv; nsISecurityContext* mContext; jbool mInProxyFindClass; + nsXPIDLCString mFakeOrigin; static ProxyJNIEnv& GetProxyEnv(JNIEnv* env) { return *(ProxyJNIEnv*)env; } @@ -293,6 +295,27 @@ } } + // Don't generate a new fake origin on every call to + // nsCSecurityContext::GetOrigin(). + nsresult getOrSetFakeOrigin(nsCSecurityContext *securityContext) + { + if (!securityContext) + return NS_OK; + if (!mFakeOrigin.IsVoid()) + securityContext->SetFakeOrigin(mFakeOrigin); + char origin[256]; + nsresult rv = securityContext->GetOrigin(origin, 256); + if (NS_FAILED(rv)) + return rv; + if (mFakeOrigin.IsVoid()) { + const nsCString& contextFakeOrigin = + securityContext->GetFakeOrigin(); + if (!contextFakeOrigin.IsVoid()) + mFakeOrigin.Assign(contextFakeOrigin); + } + return NS_OK; + } + static jint JNICALL GetVersion(JNIEnv* env) { jint version = 0; @@ -499,10 +522,10 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult result; - result = secureEnv->NewObject(clazz, method->mMethodID, jargs, &outObject, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + secureEnv->NewObject(clazz, method->mMethodID, jargs, &outObject, securityContext); NS_IF_RELEASE(securityContext); - return outObject; } @@ -513,8 +536,9 @@ nsISecureEnv* secureEnv = GetSecureEnv(env); JNIMethod* method = (JNIMethod*)methodID; nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult result; - result = secureEnv->NewObject(clazz, method->mMethodID, args, &outObject, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + secureEnv->NewObject(clazz, method->mMethodID, args, &outObject, securityContext); NS_IF_RELEASE(securityContext); return outObject; } @@ -568,7 +592,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult rv = secureEnv->CallMethod(method->mReturnType, obj, method->mMethodID, args, &outValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + rv = secureEnv->CallMethod(method->mReturnType, obj, method->mMethodID, args, &outValue, securityContext); NS_IF_RELEASE(securityContext); return NS_SUCCEEDED(rv) ? outValue : kErrorValue; } @@ -586,8 +612,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult result; - result = secureEnv->CallMethod(jvoid_type, obj, method->mMethodID, args, &unusedValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + secureEnv->CallMethod(jvoid_type, obj, method->mMethodID, args, &unusedValue, securityContext); NS_IF_RELEASE(securityContext); } @@ -675,7 +702,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult rv = secureEnv->CallNonvirtualMethod(method->mReturnType, obj, clazz, method->mMethodID, args, &outValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + rv = secureEnv->CallNonvirtualMethod(method->mReturnType, obj, clazz, method->mMethodID, args, &outValue, securityContext); NS_IF_RELEASE(securityContext); return NS_SUCCEEDED(rv) ? outValue : kErrorValue; } @@ -693,8 +722,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult result; - result = secureEnv->CallNonvirtualMethod(jvoid_type, obj, clazz, method->mMethodID, args, &unusedValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + secureEnv->CallNonvirtualMethod(jvoid_type, obj, clazz, method->mMethodID, args, &unusedValue, securityContext); NS_IF_RELEASE(securityContext); } @@ -780,7 +810,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult rv = secureEnv->GetField(field->mFieldType, obj, field->mFieldID, &outValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + rv = secureEnv->GetField(field->mFieldType, obj, field->mFieldID, &outValue, securityContext); NS_IF_RELEASE(securityContext); return NS_SUCCEEDED(rv) ? outValue : kErrorValue; } @@ -808,8 +840,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult result; - result = secureEnv->SetField(field->mFieldType, obj, field->mFieldID, value, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + secureEnv->SetField(field->mFieldType, obj, field->mFieldID, value, securityContext); NS_IF_RELEASE(securityContext); } @@ -864,7 +897,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult rv = secureEnv->CallStaticMethod(method->mReturnType, clazz, method->mMethodID, args, &outValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + rv = secureEnv->CallStaticMethod(method->mReturnType, clazz, method->mMethodID, args, &outValue, securityContext); NS_IF_RELEASE(securityContext); return NS_SUCCEEDED(rv) ? outValue : kErrorValue; } @@ -882,8 +917,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult result; - result = secureEnv->CallStaticMethod(jvoid_type, clazz, method->mMethodID, args, &unusedValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + secureEnv->CallStaticMethod(jvoid_type, clazz, method->mMethodID, args, &unusedValue, securityContext); NS_IF_RELEASE(securityContext); } @@ -969,7 +1005,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult rv = secureEnv->GetStaticField(field->mFieldType, clazz, field->mFieldID, &outValue, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + rv = secureEnv->GetStaticField(field->mFieldType, clazz, field->mFieldID, &outValue, securityContext); NS_IF_RELEASE(securityContext); return NS_SUCCEEDED(rv) ? outValue : kErrorValue; } @@ -997,8 +1035,9 @@ ProxyJNIEnv& proxyEnv = GetProxyEnv(env); nsISecureEnv* secureEnv = GetSecureEnv(env); nsISecurityContext* securityContext = proxyEnv.getContext(); - nsresult result; - result = secureEnv->SetStaticField(field->mFieldType, clazz, field->mFieldID, value, securityContext); + nsresult rv = proxyEnv.getOrSetFakeOrigin((nsCSecurityContext*)securityContext); + if (NS_SUCCEEDED(rv)) + secureEnv->SetStaticField(field->mFieldType, clazz, field->mFieldID, value, securityContext); NS_IF_RELEASE(securityContext); } @@ -1734,9 +1773,8 @@ ProxyJNIEnv::~ProxyJNIEnv() { this->functions = NULL; - - if (mSecureEnv != NULL) - mSecureEnv->Release(); + + NS_IF_RELEASE(mSecureEnv); } JNIEnv* CreateProxyJNI(nsIJVMPlugin* jvmPlugin, nsISecureEnv* inSecureEnv) --- xulrunner-1.9.0.19.orig/uriloader/base/nsURILoader.cpp +++ xulrunner-1.9.0.19/uriloader/base/nsURILoader.cpp @@ -440,7 +440,8 @@ return NS_OK; } - // If we aren't allowed to try other listeners, we're done here. + // If we aren't allowed to try other listeners, just skip through to + // trying to convert the data. if (!(mFlags & nsIURILoader::DONT_RETARGET)) { // @@ -519,44 +520,39 @@ return rv; } } + } else { + LOG((" DONT_RETARGET flag set, so skipped over random other content " + "listeners and content handlers")); + } + + // + // Fifth step: If no listener prefers this type, see if any stream + // converters exist to transform this content type into + // some other. + // + // Don't do this if the server sent us a MIME type of "*/*" because they saw + // it in our Accept header and got confused. + // XXXbz have to be careful here; may end up in some sort of bizarre infinite + // decoding loop. + if (mContentType != anyType) { + rv = ConvertData(request, m_contentListener, mContentType, anyType); + if (NS_FAILED(rv)) { + m_targetStreamListener = nsnull; + } else if (m_targetStreamListener) { + // We found a converter for this MIME type. We'll just pump data into it + // and let the downstream nsDocumentOpenInfo handle things. + LOG((" Converter taking over now")); + return NS_OK; + } } - } else if (mFlags & nsIURILoader::DONT_RETARGET) { - // External handling was forced, but we must not retarget - // -> abort - LOG((" External handling forced, but not allowed to retarget -> aborting")); - return NS_ERROR_WONT_HANDLE_CONTENT; } NS_ASSERTION(!m_targetStreamListener, "If we found a listener, why are we not using it?"); - // - // Fifth step: If no listener prefers this type, see if any stream - // converters exist to transform this content type into - // some other. - // - - // We always want to do this, since even content being forced to - // be handled externally may need decoding (eg via the unknown - // content decoder). - // Don't do this if the server sent us a MIME type of "*/*" because they saw - // it in our Accept header and got confused. - // XXXbz have to be careful here; may end up in some sort of bizarre infinite - // decoding loop. - if (mContentType != anyType) { - rv = ConvertData(request, m_contentListener, mContentType, anyType); - if (NS_FAILED(rv)) { - m_targetStreamListener = nsnull; - } else if (m_targetStreamListener) { - // We found a converter for this MIME type. We'll just pump data into it - // and let the downstream nsDocumentOpenInfo handle things. - LOG((" Converter taking over now")); - return NS_OK; - } - } - if (mFlags & nsIURILoader::DONT_RETARGET) { - LOG((" Listener not interested and no stream converter exists, and retargeting disallowed -> aborting")); + LOG((" External handling forced or (listener not interested and no " + "stream converter exists), and retargeting disallowed -> aborting")); return NS_ERROR_WONT_HANDLE_CONTENT; } --- xulrunner-1.9.0.19.orig/uriloader/exthandler/nsHandlerService.js +++ xulrunner-1.9.0.19/uriloader/exthandler/nsHandlerService.js @@ -609,25 +609,24 @@ try { file.initWithPath(aPath); - - if (file.exists()) - return file; } catch(ex) { // Note: for historical reasons, we don't actually check to see // if the exception is NS_ERROR_FILE_UNRECOGNIZED_PATH, which is what // nsILocalFile::initWithPath throws when a path is relative. - file = this._dirSvc.get("XCurProcD", Ci.nsIFile); try { file.append(aPath); - if (file.exists()) - return file; } catch(ex) {} } + if (file && file.exists() && + file.isExecutable() && + file.isFile()) + return file; + return null; }, --- xulrunner-1.9.0.19.orig/uriloader/exthandler/unix/nsOSHelperAppService.cpp +++ xulrunner-1.9.0.19/uriloader/exthandler/unix/nsOSHelperAppService.cpp @@ -67,7 +67,6 @@ #include "nsDirectoryServiceUtils.h" #include "prenv.h" // for PR_GetEnv() #include "nsAutoPtr.h" -#include // for system() #define LOG(args) PR_LOG(mLog, PR_LOG_DEBUG, args) #define LOG_ENABLED() PR_LOG_TEST(mLog, PR_LOG_DEBUG) @@ -1141,9 +1140,32 @@ aMinorType, aTypeOptions, testCommand); + if (NS_FAILED(rv)) + continue; + nsCOMPtr process = do_CreateInstance(NS_PROCESS_CONTRACTID, &rv); + if (NS_FAILED(rv)) + continue; + nsCOMPtr file(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv)); + if (NS_FAILED(rv)) + continue; + rv = file->InitWithNativePath(NS_LITERAL_CSTRING("/bin/sh")); + if (NS_FAILED(rv)) + continue; + rv = process->Init(file); + if (NS_FAILED(rv)) + continue; + const char *args[] = { "-c", testCommand.get() }; LOG(("Running Test: %s\n", testCommand.get())); - // XXX this should not use system(), since that can block the UI thread! - if (NS_SUCCEEDED(rv) && system(testCommand.get()) != 0) { + PRUint32 pid; + rv = process->Run(PR_TRUE, args, 2, &pid); + if (NS_FAILED(rv)) + continue; + PRInt32 exitValue; + rv = process->GetExitValue(&exitValue); + if (NS_FAILED(rv)) + continue; + LOG(("Exit code: %d\n", exitValue)); + if (exitValue) { match = PR_FALSE; } } --- xulrunner-1.9.0.19.orig/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +++ xulrunner-1.9.0.19/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp @@ -50,6 +50,12 @@ NS_IMETHODIMP nsMIMEInfoUnix::GetHasDefaultHandler(PRBool *_retval) { + // if mDefaultApplication is set, it means the application has been set from + // either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to + // give the GNOME answer. + if (mDefaultApplication) + return nsMIMEInfoImpl::GetHasDefaultHandler(_retval); + *_retval = PR_FALSE; nsCOMPtr vfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); if (vfs) { @@ -58,16 +64,18 @@ *_retval = PR_TRUE; } - if (*_retval) - return NS_OK; - - // If we didn't find a VFS handler, fallback. - return nsMIMEInfoImpl::GetHasDefaultHandler(_retval); + return NS_OK; } nsresult nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile *aFile) { + // if mDefaultApplication is set, it means the application has been set from + // either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to + // give the GNOME answer. + if (mDefaultApplication) + return nsMIMEInfoImpl::LaunchDefaultWithFile(aFile); + nsCAutoString nativePath; aFile->GetNativePath(nativePath); --- xulrunner-1.9.0.19.orig/toolkit/toolkit-makefiles.sh +++ xulrunner-1.9.0.19/toolkit/toolkit-makefiles.sh @@ -1116,7 +1116,7 @@ " fi -if [ "$MOZ_JAVAXPCOM" ]; then +if [ " " ]; then add_makefiles " extensions/java/Makefile extensions/java/xpcom/Makefile --- xulrunner-1.9.0.19.orig/toolkit/themes/gnomestripe/global/jar.mn +++ xulrunner-1.9.0.19/toolkit/themes/gnomestripe/global/jar.mn @@ -1,4 +1,5 @@ classic.jar: +% override chrome://global/skin/icons/loading_16.png chrome://global/skin/icons/loading_16_grey.gif + skin/classic/global/autocomplete.css + skin/classic/global/popup.css + skin/classic/global/menu.css @@ -37,6 +38,7 @@ + skin/classic/global/icons/find.png (icons/find.png) + skin/classic/global/icons/folder-item.png (icons/folder-item.png) + skin/classic/global/icons/informationGhosted-64.png (icons/informationGhosted-64.png) ++ skin/classic/global/icons/loading_16_grey.gif (../../pinstripe/global/icons/loading_16_grey.gif) + skin/classic/global/icons/loading_16.png (icons/loading_16.png) + skin/classic/global/icons/notloading_16.png (icons/notloading_16.png) + skin/classic/global/icons/notfound.png (icons/notfound.png) --- xulrunner-1.9.0.19.orig/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp +++ xulrunner-1.9.0.19/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp @@ -2029,8 +2029,9 @@ return NS_ERROR_FAILURE; } const nsCSubstring& str = Substring(chunk, start, 4); - const PRUint32 *p = reinterpret_cast(str.BeginReading()); - entry->mAddChunkId = PR_ntohl(*p); + PRUint32 p; + memcpy(&p, reinterpret_cast(str.BeginReading()), 4); + entry->mAddChunkId = PR_ntohl(p); if (entry->mAddChunkId == 0) { NS_WARNING("Received invalid chunk number."); return NS_ERROR_FAILURE; @@ -2058,8 +2059,9 @@ if (chunkType == CHUNK_SUB) { const nsCSubstring& str = Substring(chunk, start, 4); - const PRUint32 *p = reinterpret_cast(str.BeginReading()); - entry->mAddChunkId = PR_ntohl(*p); + PRUint32 p; + memcpy(&p, reinterpret_cast(str.BeginReading()), 4); + entry->mAddChunkId = PR_ntohl(p); if (entry->mAddChunkId == 0) { NS_WARNING("Received invalid chunk number."); return NS_ERROR_FAILURE; --- xulrunner-1.9.0.19.orig/toolkit/components/url-classifier/src/Makefile.in +++ xulrunner-1.9.0.19/toolkit/components/url-classifier/src/Makefile.in @@ -41,5 +41,9 @@ nsUrlClassifierListManager.js \ $(NULL) +ifeq ($(OS_TEST),alpha) +MOZ_OPTIMIZE_FLAGS := -O0 +endif + include $(topsrcdir)/config/rules.mk --- xulrunner-1.9.0.19.orig/toolkit/xre/nsAppRunner.cpp +++ xulrunner-1.9.0.19/toolkit/xre/nsAppRunner.cpp @@ -278,6 +278,16 @@ #include "nsGTKToolkit.h" #endif +// Save literal putenv string to environment variable. +static void +SaveToEnv(const char *putenv) +{ + char *expr = strdup(putenv); + if (expr) + PR_SetEnv(expr); + // We intentionally leak |expr| here since it is required by PR_SetEnv. +} + // Save the given word to the specified environment variable. static void SaveWordToEnv(const char *name, const nsACString & word) @@ -1580,7 +1590,7 @@ gRestartArgv[gRestartArgc] = nsnull; } - PR_SetEnv("MOZ_LAUNCHED_CHILD=1"); + SaveToEnv("MOZ_LAUNCHED_CHILD=1"); #if defined(XP_MACOSX) LaunchChildMac(gRestartArgc, gRestartArgv); @@ -1806,7 +1816,7 @@ PRBool offline = PR_FALSE; aProfileSvc->GetStartOffline(&offline); if (offline) { - PR_SetEnv("XRE_START_OFFLINE=1"); + SaveToEnv("XRE_START_OFFLINE=1"); } return LaunchChild(aNative); @@ -1818,7 +1828,7 @@ { nsresult rv; - PR_SetEnv("XRE_IMPORT_PROFILES=1"); + SaveToEnv("XRE_IMPORT_PROFILES=1"); // try to import old-style profiles { // scope XPCOM @@ -2729,7 +2739,7 @@ } #endif - PR_SetEnv("MOZ_LAUNCHED_CHILD="); + SaveToEnv("MOZ_LAUNCHED_CHILD="); gRestartArgc = gArgc; gRestartArgv = (char**) malloc(sizeof(char*) * (gArgc + 1)); @@ -2768,7 +2778,7 @@ PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n"); return 1; } else if (ar == ARG_FOUND) { - PR_SetEnv("MOZ_NO_REMOTE=1"); + SaveToEnv("MOZ_NO_REMOTE=1"); } // Handle -help and -version command line arguments. @@ -2850,6 +2860,8 @@ PR_fprintf(PR_STDERR, "Error: no display specified\n"); return 1; } + } else { + SaveWordToEnv("DISPLAY", nsDependentCString(display_name)); } display = gdk_display_open(display_name); if (!display) { @@ -3170,14 +3182,14 @@ // clear out any environment variables which may have been set // during the relaunch process now that we know we won't be relaunching. - PR_SetEnv("XRE_PROFILE_PATH="); - PR_SetEnv("XRE_PROFILE_LOCAL_PATH="); - PR_SetEnv("XRE_PROFILE_NAME="); - PR_SetEnv("XRE_START_OFFLINE="); - PR_SetEnv("XRE_IMPORT_PROFILES="); - PR_SetEnv("NO_EM_RESTART="); - PR_SetEnv("XUL_APP_FILE="); - PR_SetEnv("XRE_BINARY_PATH="); + SaveToEnv("XRE_PROFILE_PATH="); + SaveToEnv("XRE_PROFILE_LOCAL_PATH="); + SaveToEnv("XRE_PROFILE_NAME="); + SaveToEnv("XRE_START_OFFLINE="); + SaveToEnv("XRE_IMPORT_PROFILES="); + SaveToEnv("NO_EM_RESTART="); + SaveToEnv("XUL_APP_FILE="); + SaveToEnv("XRE_BINARY_PATH="); #ifdef XP_MACOSX // we re-initialize the command-line service and do appleevents munging @@ -3273,10 +3285,10 @@ else { char* noEMRestart = PR_GetEnv("NO_EM_RESTART"); if (noEMRestart && *noEMRestart) { - PR_SetEnv("NO_EM_RESTART=1"); + SaveToEnv("NO_EM_RESTART=1"); } else { - PR_SetEnv("NO_EM_RESTART=0"); + SaveToEnv("NO_EM_RESTART=0"); } } --- xulrunner-1.9.0.19.orig/toolkit/xre/nsXREDirProvider.cpp +++ xulrunner-1.9.0.19/toolkit/xre/nsXREDirProvider.cpp @@ -614,6 +614,7 @@ } static const char *const kAppendPrefDir[] = { "defaults", "preferences", nsnull }; +static const char *const kAppendSysPrefDir[] = { "defaults", "syspref", nsnull }; #ifdef DEBUG_bsmedberg static void @@ -670,6 +671,7 @@ LoadAppDirIntoArray(mXULAppDir, kAppendPrefDir, directories); LoadDirsIntoArray(mAppBundleDirectories, kAppendPrefDir, directories); + LoadAppDirIntoArray(mXULAppDir, kAppendSysPrefDir, directories); rv = NS_NewArrayEnumerator(aResult, directories); } --- xulrunner-1.9.0.19.orig/toolkit/content/jar.mn +++ xulrunner-1.9.0.19/toolkit/content/jar.mn @@ -8,7 +8,8 @@ * content/global/license.html (license.html) content/global/XPCNativeWrapper.js (XPCNativeWrapper.js) * content/global/xul.css (xul.css) -* content/global/about.xhtml (about.xhtml) + content/global/about.xhtml (about.xhtml) + content/global/about.dtd content/global/plugins.html content/global/plugins.css + content/global/buildconfig.html (buildconfig.html) --- xulrunner-1.9.0.19.orig/toolkit/content/about.dtd +++ xulrunner-1.9.0.19/toolkit/content/about.dtd @@ -0,0 +1,7 @@ + + + + + + + --- xulrunner-1.9.0.19.orig/toolkit/content/Makefile.in +++ xulrunner-1.9.0.19/toolkit/content/Makefile.in @@ -45,8 +45,6 @@ include $(DEPTH)/config/autoconf.mk -DEFINES += -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) - ifdef ENABLE_TESTS DIRS += tests endif --- xulrunner-1.9.0.19.orig/toolkit/content/about.xhtml +++ xulrunner-1.9.0.19/toolkit/content/about.xhtml @@ -8,6 +8,8 @@ %aboutDTD; %globalDTD; + +%aboutDTD2; ]> +
  • &about.readme.debian.beforeLink;&about.readme.debian.linkTitle;&about.readme.debian.afterLink;
  • +
  • &about.bugs.beforeLink;&about.bugs.linkTitle;&about.bugs.afterLink;
  • &about.buildconfig.beforeLink; &about.buildconfig.linkTitle; &about.buildconfig.afterLink;
  • + + + --- xulrunner-1.9.0.19.orig/editor/libeditor/text/crashtests/crashtests.list +++ xulrunner-1.9.0.19/editor/libeditor/text/crashtests/crashtests.list @@ -0,0 +1 @@ +load 580151-1.xhtml --- xulrunner-1.9.0.19.orig/xulrunner/Makefile.in +++ xulrunner-1.9.0.19/xulrunner/Makefile.in @@ -47,7 +47,6 @@ setup \ stub \ app \ - examples \ $(NULL) ifeq ($(OS_ARCH),WINNT) --- xulrunner-1.9.0.19.orig/xulrunner/stub/nsXULStub.cpp +++ xulrunner-1.9.0.19/xulrunner/stub/nsXULStub.cpp @@ -208,8 +208,12 @@ // 3) give up struct stat fileStat; - - if (!realpath(argv[0], iniPath) || stat(iniPath, &fileStat)) { + strncpy(tmpPath, argv[0], sizeof(tmpPath)); + lastSlash = strrchr(tmpPath, '/'); + if (lastSlash) { + *lastSlash = 0; + realpath(tmpPath, iniPath); + } else { const char *path = getenv("PATH"); if (!path) return 1; @@ -222,8 +226,11 @@ char *token = strtok(pathdup, ":"); while (token) { sprintf(tmpPath, "%s/%s", token, argv[0]); - if (realpath(tmpPath, iniPath) && stat(iniPath, &fileStat) == 0) { + if (stat(tmpPath, &fileStat) == 0) { found = PR_TRUE; + lastSlash = strrchr(tmpPath, '/'); + *lastSlash = 0; + realpath(tmpPath, iniPath); break; } token = strtok(NULL, ":"); @@ -232,11 +239,15 @@ if (!found) return 1; } + lastSlash = iniPath + strlen(iniPath); + *lastSlash = '/'; #endif +#ifndef XP_UNIX lastSlash = strrchr(iniPath, PATH_SEPARATOR_CHAR); if (!lastSlash) return 1; +#endif *(++lastSlash) = '\0'; @@ -311,6 +322,52 @@ DosSetExtLIBPATH(tmpPath, BEGIN_LIBPATH); #endif + const char *env; + env = getenv("MOZILLA_JEMALLOC"); + if (env && env[0]) { + // Fill tmpPath with location to the jemalloc library + strcpy(tmpPath, greDir); + lastSlash = strrchr(tmpPath, PATH_SEPARATOR_CHAR); + if (lastSlash) + lastSlash++; + else + lastSlash = tmpPath; + *lastSlash = '\0'; + strncpy(lastSlash, JEMALLOC_LIB, MAXPATHLEN - (lastSlash - tmpPath) - 1); + + // Don't do anything if libjemalloc doesn't exist + struct stat st; + if (stat(tmpPath, &st) == 0 && S_ISREG(st.st_mode)) { + // Avoid infinite loop + unsetenv("MOZILLA_JEMALLOC"); + + // Keep previously set LD_PRELOAD + char *ldpreload; + env = getenv("LD_PRELOAD"); + setenv("MOZILLA_OLD_PRELOAD", env ? env : "", 1); + if (env && env[0]) { + int len = strlen(env); + ldpreload = (char *) malloc(len + strlen(tmpPath) + 2); + strcpy(ldpreload, env); + ldpreload[len] = ':'; + ldpreload[len + 1] = '\0'; + } else { + ldpreload = (char *) malloc(strlen(tmpPath) + 1); + *ldpreload = '\0'; + } + // Add jemalloc to LD_PRELOAD + strcat(ldpreload, tmpPath); + setenv("LD_PRELOAD", ldpreload, 1); + execv(argv[0], argv); + } + } + // Even if execv fails we want to do this cleanup + env = getenv("MOZILLA_OLD_PRELOAD"); + if (env) { + setenv("LD_PRELOAD", env, 1); + unsetenv("MOZILLA_OLD_PRELOAD"); + } + rv = XPCOMGlueStartup(greDir); if (NS_FAILED(rv)) { Output(PR_TRUE, "Couldn't load XPCOM.\n"); --- xulrunner-1.9.0.19.orig/xulrunner/stub/Makefile.in +++ xulrunner-1.9.0.19/xulrunner/stub/Makefile.in @@ -102,3 +102,5 @@ ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,shell32) endif + +nsXULStub.o: DEFINES += -DJEMALLOC_LIB=\"$(DLL_PREFIX)jemalloc$(DLL_SUFFIX)\" --- xulrunner-1.9.0.19.orig/xulrunner/setup/nsXULAppInstall.js +++ xulrunner-1.9.0.19/xulrunner/setup/nsXULAppInstall.js @@ -243,7 +243,7 @@ #else aDirectory = Components.classes["@mozilla.org/file/local;1"]. createInstance(nsILocalFile); - aDirectory.initWithPath("/usr/lib"); + aDirectory.initWithPath("/usr/local/lib"); if (vendor) aDirectory.append(vendor.toLowerCase()); #endif --- xulrunner-1.9.0.19.orig/xulrunner/app/nsXULRunnerApp.cpp +++ xulrunner-1.9.0.19/xulrunner/app/nsXULRunnerApp.cpp @@ -43,7 +43,6 @@ #include "nsXULAppAPI.h" #include "nsXPCOMGlue.h" -#include "nsRegisterGRE.h" #include "nsAppRunner.h" #include "nsILocalFile.h" #include "nsIXULAppInstall.h" @@ -165,12 +164,6 @@ " -h, --help show this message\n" " -v, --version show version\n" " --gre-version print the GRE version string on stdout\n" - " --register-global register this GRE in the machine registry\n" - " --register-user register this GRE in the user registry\n" - " --unregister-global unregister this GRE formerly registered with\n" - " --register-global\n" - " --unregister-user unregister this GRE formely registered with\n" - " --register-user\n" " --find-gre Find a GRE with version and print\n" " the path on stdout\n" " --install-app [ []]\n" @@ -307,42 +300,6 @@ if (NS_FAILED(rv)) return 2; - PRBool registerGlobal = IsArg(argv[1], "register-global"); - PRBool registerUser = IsArg(argv[1], "register-user"); - if (registerGlobal || registerUser) { - if (argc != 2) { - Usage(argv[0]); - return 1; - } - - nsCOMPtr regDir; - rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); - if (NS_FAILED(rv)) - return 2; - - return RegisterXULRunner(registerGlobal, regDir, - kGREProperties, - NS_ARRAY_LENGTH(kGREProperties), - milestone.get()) ? 0 : 2; - } - - registerGlobal = IsArg(argv[1], "unregister-global"); - registerUser = IsArg(argv[1], "unregister-user"); - if (registerGlobal || registerUser) { - if (argc != 2) { - Usage(argv[0]); - return 1; - } - - nsCOMPtr regDir; - rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); - if (NS_FAILED(rv)) - return 2; - - UnregisterXULRunner(registerGlobal, regDir, milestone.get()); - return 0; - } - if (IsArg(argv[1], "find-gre")) { if (argc != 3) { Usage(argv[0]); --- xulrunner-1.9.0.19.orig/xulrunner/app/xulrunner.js +++ xulrunner-1.9.0.19/xulrunner/app/xulrunner.js @@ -39,7 +39,8 @@ // We need to override the default values of these preferences since all.js // assumes these are in the navigator package, which for us is non-existant. // XXX(darin): perhaps all.js should not be seamonkey specific -pref("general.useragent.locale", "@AB_CD@"); +pref("intl.locale.matchOS", true); +pref("general.useragent.locale", "chrome://global/locale/intl.properties"); pref("font.language.group", "chrome://global/locale/intl.properties"); pref("intl.accept_languages", "chrome://global/locale/intl.properties"); pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties"); --- xulrunner-1.9.0.19.orig/xulrunner/app/Makefile.in +++ xulrunner-1.9.0.19/xulrunner/app/Makefile.in @@ -47,8 +47,6 @@ include $(DEPTH)/config/autoconf.mk -DIRS = profile - PREF_JS_EXPORTS = $(srcdir)/xulrunner.js GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js) @@ -115,7 +113,9 @@ $(EXTRA_DSO_LIBS) \ $(MOZ_JS_LIBS) \ $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ + -Wl,--no-as-needed \ $(XPCOM_LIBS) \ + -Wl,--as-needed \ $(NSPR_LIBS) \ $(TK_LIBS) \ $(NULL) @@ -204,7 +204,7 @@ ifneq (,$(filter-out OS2 WINNT Darwin BeOS,$(OS_ARCH))) -xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk +xulrunner:: $(topsrcdir)/browser/app/mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ -e "s|%MOZ_USER_DIR%|.mozilla/xulrunner|" \ -e "s|%MREDIR%|$(mredir)|" > $@ --- xulrunner-1.9.0.19.orig/xulrunner/installer/libxul-unstable.pc.in +++ xulrunner-1.9.0.19/xulrunner/installer/libxul-unstable.pc.in @@ -9,4 +9,4 @@ Version: %MOZILLA_VERSION% Requires: %NSPR_NAME% >= %NSPR_VERSION% Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom -Cflags: -I${includedir}/${includetype} -fshort-wchar +Cflags: -I${includedir}/${includetype} %WCHAR_CFLAGS% --- xulrunner-1.9.0.19.orig/xulrunner/installer/libxul-embedding-unstable.pc.in +++ xulrunner-1.9.0.19/xulrunner/installer/libxul-embedding-unstable.pc.in @@ -8,4 +8,4 @@ Description: Static library for version-independent embedding of the Mozilla runtime (unstable API) Version: %MOZILLA_VERSION% Libs: -L${sdkdir}/lib -lxpcomglue -Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} -fshort-wchar +Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} %WCHAR_CFLAGS% --- xulrunner-1.9.0.19.orig/xulrunner/installer/libxul.pc.in +++ xulrunner-1.9.0.19/xulrunner/installer/libxul.pc.in @@ -13,4 +13,4 @@ Version: %MOZILLA_VERSION% Requires: %NSPR_NAME% >= %NSPR_VERSION% Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom -Cflags: -I${includedir}/${includetype} -fshort-wchar \ No newline at end of file +Cflags: -I${includedir}/${includetype} %WCHAR_CFLAGS% --- xulrunner-1.9.0.19.orig/xulrunner/installer/Makefile.in +++ xulrunner-1.9.0.19/xulrunner/installer/Makefile.in @@ -67,7 +67,7 @@ include $(topsrcdir)/toolkit/mozapps/installer/packager.mk -$(MOZILLA_VERSION).system.conf: $(topsrcdir)/config/milestone.txt Makefile +1.9.system.conf: $(topsrcdir)/config/milestone.txt Makefile printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \ $(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@ @@ -75,9 +75,9 @@ # to register xulrunner per-user, override this with $HOME/.gre.d regdir = /etc/gre.d -install:: $(MOZILLA_VERSION).system.conf +install:: 1.9.system.conf $(NSINSTALL) -D $(DESTDIR)$(regdir) - $(SYSINSTALL) $^ $(DESTDIR)$(regdir) + $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir) endif # Add pkg-config files to the install:: target @@ -118,6 +118,7 @@ -e "s|%sdkdir%|$(sdkdir)|" \ -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \ -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \ @@ -128,4 +129,4 @@ @echo pkg_config_file: $(pkg_config_files) $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(libdir)/pkgconfig -GARBAGE += $(MOZILLA_VERSION).system.conf $(pkg_config_files) +GARBAGE += 1.9.system.conf $(pkg_config_files) --- xulrunner-1.9.0.19.orig/xulrunner/installer/libxul-embedding.pc.in +++ xulrunner-1.9.0.19/xulrunner/installer/libxul-embedding.pc.in @@ -12,4 +12,4 @@ Description: Static library for version-independent embedding of the Mozilla runtime Version: %MOZILLA_VERSION% Libs: -L${sdkdir}/lib -lxpcomglue -Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} -fshort-wchar +Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} %WCHAR_CFLAGS% --- xulrunner-1.9.0.19.orig/extensions/pref/autoconfig/src/nsReadConfig.cpp +++ xulrunner-1.9.0.19/extensions/pref/autoconfig/src/nsReadConfig.cpp @@ -284,10 +284,13 @@ jsFile->AppendNative(NS_LITERAL_CSTRING("Essential Files")); #endif } else { - rv = NS_GetSpecialDirectory(NS_APP_DEFAULTS_50_DIR, + rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(jsFile)); if (NS_FAILED(rv)) return rv; + rv = jsFile->AppendNative(NS_LITERAL_CSTRING("defaults")); + if (NS_FAILED(rv)) + return rv; rv = jsFile->AppendNative(NS_LITERAL_CSTRING("autoconfig")); if (NS_FAILED(rv)) return rv; --- xulrunner-1.9.0.19.orig/extensions/python/xpcom/src/Makefile.in +++ xulrunner-1.9.0.19/extensions/python/xpcom/src/Makefile.in @@ -82,7 +82,7 @@ include $(topsrcdir)/config/config.mk -CXXFLAGS += -DPYTHON_SO=\"libpython$(MOZ_PYTHON_VER_DOTTED).so\" +CXXFLAGS += -DPYTHON_SO=\"$(PYTHON_SO)\" EXTRA_DSO_LDOPTS += $(XPCOM_GLUE_LDOPTS) \ $(MOZ_COMPONENT_LIBS) \ --- xulrunner-1.9.0.19.orig/extensions/python/xpcom/src/loader/Makefile.in +++ xulrunner-1.9.0.19/extensions/python/xpcom/src/loader/Makefile.in @@ -69,6 +69,7 @@ EXTRA_DSO_LDOPTS += $(XPCOM_GLUE_LDOPTS) \ $(MOZ_COMPONENT_LIBS) \ + -Wl,-rpath,/usr/lib/xulrunner-1.9 \ $(NULL) include $(topsrcdir)/config/rules.mk --- xulrunner-1.9.0.19.orig/extensions/python/xpcom/src/module/Makefile.in +++ xulrunner-1.9.0.19/extensions/python/xpcom/src/module/Makefile.in @@ -77,6 +77,7 @@ else EXTRA_DSO_LDOPTS += $(XPCOM_GLUE_LDOPTS) \ $(MOZ_COMPONENT_LIBS) \ + -Wl,-rpath,/usr/lib/xulrunner-1.9 $(NULL) endif IMPORT_LIBRARY := $(SHARED_LIBRARY:.pyd=.lib) --- xulrunner-1.9.0.19.orig/extensions/java/xpcom/Makefile.in +++ xulrunner-1.9.0.19/extensions/java/xpcom/Makefile.in @@ -41,7 +41,11 @@ include $(DEPTH)/config/autoconf.mk -DIRS = interfaces glue +DIRS = glue + +ifndef DEB_NO_JAR +DIRS += interfaces +endif ifdef ENABLE_TESTS DIRS += tests @@ -50,8 +54,10 @@ include $(topsrcdir)/config/rules.mk # Build the implementation Java classes +ifndef DEB_NO_JAR libs:: $(MAKE) -C src jar-libs install:: $(MAKE) -C src jar-install +endif --- xulrunner-1.9.0.19.orig/xpcom/glue/nsCOMArray.cpp +++ xulrunner-1.9.0.19/xpcom/glue/nsCOMArray.cpp @@ -55,11 +55,7 @@ nsCOMArray_base::~nsCOMArray_base() { - PRInt32 count = Count(), i; - for (i = 0; i < count; ++i) { - nsISupports* obj = ObjectAt(i); - NS_IF_RELEASE(obj); - } + Clear(); } PRInt32 @@ -135,9 +131,10 @@ { if (PRUint32(aIndex) < PRUint32(Count())) { nsISupports* element = ObjectAt(aIndex); - NS_IF_RELEASE(element); - return mArray.RemoveElementAt(aIndex); + PRBool result = mArray.RemoveElementAt(aIndex); + NS_IF_RELEASE(element); + return result; } return PR_FALSE; @@ -155,7 +152,9 @@ void nsCOMArray_base::Clear() { - mArray.EnumerateForwards(ReleaseObjects, nsnull); + nsAutoVoidArray objects; + objects = mArray; mArray.Clear(); + objects.EnumerateForwards(ReleaseObjects, nsnull); } --- xulrunner-1.9.0.19.orig/xpcom/glue/nsTextFormatter.cpp +++ xulrunner-1.9.0.19/xpcom/glue/nsTextFormatter.cpp @@ -920,7 +920,7 @@ return -1; } - ap = nas[i-1].ap; + VARARGS_ASSIGN(ap, nas[i-1].ap); dolPt = fmt; c = *fmt++; } --- xulrunner-1.9.0.19.orig/xpcom/glue/nsVoidArray.h +++ xulrunner-1.9.0.19/xpcom/glue/nsVoidArray.h @@ -193,6 +193,12 @@ SetArray(reinterpret_cast(mAutoBuf), kAutoBufSize, 0, PR_FALSE, PR_TRUE); } + + nsAutoVoidArray& operator=(const nsVoidArray& other) + { + nsVoidArray::operator=(other); + return *this; + } protected: // The internal storage --- xulrunner-1.9.0.19.orig/xpcom/glue/nsThreadUtils.cpp +++ xulrunner-1.9.0.19/xpcom/glue/nsThreadUtils.cpp @@ -187,24 +187,27 @@ } #endif // XPCOM_GLUE_AVOID_NSPR +inline PRBool +hasPendingEvents(nsIThread *thread) +{ + PRBool val; + return NS_SUCCEEDED(thread->HasPendingEvents(&val)) && val; +} + PRBool NS_HasPendingEvents(nsIThread *thread) { -#ifdef MOZILLA_INTERNAL_API if (!thread) { +#ifndef MOZILLA_INTERNAL_API + nsCOMPtr current; + NS_GetCurrentThread(getter_AddRefs(current)); + return hasPendingEvents(current); +#else thread = NS_GetCurrentThread(); NS_ENSURE_TRUE(thread, PR_FALSE); - } -#else - nsCOMPtr current; - if (!thread) { - NS_GetCurrentThread(getter_AddRefs(current)); - NS_ENSURE_TRUE(current, PR_FALSE); - thread = current.get(); - } #endif - PRBool val; - return NS_SUCCEEDED(thread->HasPendingEvents(&val)) && val; + } + return hasPendingEvents(thread); } PRBool --- xulrunner-1.9.0.19.orig/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp +++ xulrunner-1.9.0.19/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp @@ -86,19 +86,21 @@ GetFrozenFunctionsFunc XPCOMGlueLoad(const char *xpcomFile) { - char xpcomDir[MAXPATHLEN]; - if (realpath(xpcomFile, xpcomDir)) { - char *lastSlash = strrchr(xpcomDir, '/'); - if (lastSlash) { - *lastSlash = '\0'; + char xulFile[MAXPATHLEN]; + char *lastSlash = strrchr(xpcomFile, '/'); + if (!lastSlash) { + snprintf(xulFile, MAXPATHLEN, "./%s", xpcomFile); + return XPCOMGlueLoad(xulFile); + } + *lastSlash = '\0'; - XPCOMGlueLoadDependentLibs(xpcomDir, ReadDependentCB); + XPCOMGlueLoadDependentLibs(xpcomFile, ReadDependentCB); - snprintf(lastSlash, MAXPATHLEN - strlen(xpcomDir), "/" XUL_DLL); + snprintf(xulFile, MAXPATHLEN - strlen(xpcomFile), "%s/" XUL_DLL, xpcomFile); - sXULLibHandle = dlopen(xpcomDir, RTLD_GLOBAL | RTLD_LAZY); - } - } + sXULLibHandle = dlopen(xulFile, RTLD_GLOBAL | RTLD_LAZY); + + *lastSlash = '/'; // RTLD_DEFAULT is not defined in non-GNU toolchains, and it is // (void*) 0 in any case. --- xulrunner-1.9.0.19.orig/xpcom/glue/standalone/Makefile.in +++ xulrunner-1.9.0.19/xpcom/glue/standalone/Makefile.in @@ -62,7 +62,7 @@ ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) LINKSRC = nsGlueLinkingWin.cpp endif -ifneq (,$(filter AIX DragonFly FreeBSD Linux NetBSD OpenBSD SunOS,$(OS_ARCH))) +ifneq (,$(filter AIX DragonFly FreeBSD GNU GNU_% Linux NetBSD OpenBSD SunOS,$(OS_ARCH))) LINKSRC = nsGlueLinkingDlopen.cpp endif ifeq (OS2,$(OS_ARCH)) --- xulrunner-1.9.0.19.orig/xpcom/build/nsXPComInit.cpp +++ xulrunner-1.9.0.19/xpcom/build/nsXPComInit.cpp @@ -289,6 +289,23 @@ static PRBool CheckUpdateFile() { nsresult rv; + nsCOMPtr compregFile; + rv = nsDirectoryService::gService->Get(NS_XPCOM_COMPONENT_REGISTRY_FILE, + NS_GET_IID(nsIFile), + getter_AddRefs(compregFile)); + + if (NS_FAILED(rv)) { + NS_WARNING("Getting NS_XPCOM_COMPONENT_REGISTRY_FILE failed"); + return PR_FALSE; + } + + PRBool exists; + if (NS_FAILED(compregFile->Exists(&exists)) || !exists) + return PR_TRUE; + + PRInt64 compregModTime; + compregFile->GetLastModifiedTime(&compregModTime); + nsCOMPtr file; rv = nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, NS_GET_IID(nsIFile), @@ -301,28 +318,39 @@ file->AppendNative(nsDependentCString(".autoreg")); - PRBool exists; file->Exists(&exists); if (!exists) - return PR_FALSE; + goto next; - nsCOMPtr compregFile; - rv = nsDirectoryService::gService->Get(NS_XPCOM_COMPONENT_REGISTRY_FILE, + PRInt64 autoregModTime; + file->GetLastModifiedTime(&autoregModTime); + + if (LL_CMP(autoregModTime, >, compregModTime)) + return PR_TRUE; + +next: + nsCOMPtr greFile; + rv = nsDirectoryService::gService->Get(NS_GRE_DIR, NS_GET_IID(nsIFile), - getter_AddRefs(compregFile)); + getter_AddRefs(greFile)); - if (NS_FAILED(rv)) { - NS_WARNING("Getting NS_XPCOM_COMPONENT_REGISTRY_FILE failed"); + NS_WARNING("Getting NS_GRE_DIR failed"); return PR_FALSE; } - if (NS_FAILED(compregFile->Exists(&exists)) || !exists) - return PR_TRUE; + greFile->AppendNative(nsDependentCString(".autoreg")); - PRInt64 compregModTime, autoregModTime; - compregFile->GetLastModifiedTime(&compregModTime); - file->GetLastModifiedTime(&autoregModTime); + PRBool equals; + rv = greFile->Equals(file, &equals); + if (NS_SUCCEEDED(rv) && equals) + return PR_FALSE; + + greFile->Exists(&exists); + if (!exists) + return PR_FALSE; + + greFile->GetLastModifiedTime(&autoregModTime); return LL_CMP(autoregModTime, >, compregModTime); } --- xulrunner-1.9.0.19.orig/xpcom/io/nsLocalFileUnix.cpp +++ xulrunner-1.9.0.19/xpcom/io/nsLocalFileUnix.cpp @@ -280,12 +280,21 @@ nsresult nsLocalFile::FillStatCache() { +#ifdef HAVE_STAT64 + if (stat64(mPath.get(), &mCachedStat) == -1) { + // try lstat it may be a symlink + if (lstat64(mPath.get(), &mCachedStat) == -1) { + return NSRESULT_FOR_ERRNO(); + } + } +#else if (stat(mPath.get(), &mCachedStat) == -1) { // try lstat it may be a symlink if (lstat(mPath.get(), &mCachedStat) == -1) { return NSRESULT_FOR_ERRNO(); } } +#endif mHaveCachedStat = PR_TRUE; return NS_OK; } @@ -1109,9 +1118,12 @@ } #endif - /* XXX autoconf for and use stat64 if available */ if (!S_ISDIR(mCachedStat.st_mode)) { +#ifdef HAVE_STAT64 + *aFileSize = mCachedStat.st_size; +#else LL_UI2L(*aFileSize, (PRUint32)mCachedStat.st_size); +#endif } return NS_OK; } @@ -1136,11 +1148,17 @@ CHECK_mPath(); NS_ENSURE_ARG(aFileSize); +#ifdef HAVE_LSTAT64 + struct stat64 sbuf; + if (lstat64(mPath.get(), &sbuf) == -1) + return NSRESULT_FOR_ERRNO(); + *aFileSize = sbuf.st_size; +#else struct stat sbuf; if (lstat(mPath.get(), &sbuf) == -1) return NSRESULT_FOR_ERRNO(); - /* XXX autoconf for and use lstat64 if available */ LL_UI2L(*aFileSize, (PRUint32)sbuf.st_size); +#endif return NS_OK; } --- xulrunner-1.9.0.19.orig/xpcom/io/nsLocalFileUnix.h +++ xulrunner-1.9.0.19/xpcom/io/nsLocalFileUnix.h @@ -113,7 +113,11 @@ ~nsLocalFile() {} protected: +#ifdef HAVE_STAT64 + struct stat64 mCachedStat; +#else struct stat mCachedStat; +#endif nsCString mPath; PRPackedBool mHaveCachedStat; --- xulrunner-1.9.0.19.orig/xpcom/io/nsAppFileLocationProvider.cpp +++ xulrunner-1.9.0.19/xpcom/io/nsAppFileLocationProvider.cpp @@ -99,6 +99,8 @@ #define NS_MACOSX_USER_PLUGIN_DIR "OSXUserPlugins" #define NS_MACOSX_LOCAL_PLUGIN_DIR "OSXLocalPlugins" #define NS_MAC_CLASSIC_PLUGIN_DIR "MacSysPlugins" +#elif XP_UNIX +#define NS_SYSTEM_PLUGINS_DIR "SysPlugins" #endif #define DEFAULTS_DIR_NAME NS_LITERAL_CSTRING("defaults") @@ -254,6 +256,13 @@ if (NS_SUCCEEDED(rv)) rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME); } +#ifdef XP_UNIX + else if (nsCRT::strcmp(prop, NS_SYSTEM_PLUGINS_DIR) == 0) { + static const char *const sysLPlgDir = "/usr/lib/mozilla/plugins"; + rv = NS_NewNativeLocalFile(nsDependentCString(sysLPlgDir), + PR_FALSE, getter_AddRefs(localFile)); + } +#endif #endif else if (nsCRT::strcmp(prop, NS_APP_SEARCH_DIR) == 0) { @@ -596,7 +605,7 @@ *_retval = new nsAppDirectoryEnumerator(this, keys); #else - static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull }; + static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, NS_SYSTEM_PLUGINS_DIR, nsnull }; if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) { static const char nullstr = 0; keys[0] = &nullstr; --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp @@ -38,6 +38,7 @@ /* Implement shared vtbl methods. */ #include "xptcprivate.h" +#include "xptiprivate.h" extern "C" { nsresult @@ -47,7 +48,6 @@ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; nsXPTCMiniVariant* dispatchParams = NULL; - nsIInterfaceInfo* iface_info = NULL; const nsXPTMethodInfo* info; PRUint8 paramCount; PRUint8 i; @@ -55,11 +55,8 @@ NS_ASSERTION(self,"no self"); - self->GetInterfaceInfo(&iface_info); - NS_ASSERTION(iface_info,"no interface info"); - - iface_info->GetMethodInfo(PRUint16(methodIndex), &info); - NS_ASSERTION(info,"no interface info"); + self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); + NS_ASSERTION(info,"no method info"); paramCount = info->GetParamCount(); @@ -107,9 +104,7 @@ } } - result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams); - - NS_RELEASE(iface_info); + result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams); if(dispatchParams != paramBuffer) delete [] dispatchParams; --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s @@ -24,6 +24,7 @@ * Contributor(s): * Brendan Eich * Stuart Parmenter + * Thiemo Seufer * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -44,139 +45,123 @@ #include #include -.text -.globl invoke_count_words -.globl invoke_copy_to_stack - -# We need a variable number of words allocated from the stack for copies of -# the params, and this space must come between the high frame (where ra, gp, -# and s0 are saved) and the low frame (where a0-a3 are saved by the callee -# functions we invoke). - -LOCALSZ=4 # s0, s1, ra, gp -NARGSAVE=4 # a0, a1, a2, a3 -HIFRAMESZ=(LOCALSZ*SZREG) -LOFRAMESZ=(NARGSAVE*SZREG) -FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK - -# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause -# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12. -RAOFF=FRAMESZ - (2*SZREG) -GPOFF=FRAMESZ - (3*SZREG) -S0OFF=FRAMESZ - (4*SZREG) -S1OFF=FRAMESZ - (5*SZREG) - -# These are not magic -- they are just our argsave slots in the caller frame. -A0OFF=FRAMESZ -A1OFF=FRAMESZ + (1*SZREG) -A2OFF=FRAMESZ + (2*SZREG) -A3OFF=FRAMESZ + (3*SZREG) - - # - # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params) - # a0 a1 a2 a3 - -NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra) - - .set noreorder - .cpload t9 - .set reorder - +# NARGSAVE is the argument space in the callers frame, including extra +# 'shadowed' space for the argument registers. The minimum of 4 +# argument slots is sometimes predefined in the header files. +#ifndef NARGSAVE +#define NARGSAVE 4 +#endif + +#define LOCALSZ 3 /* gp, fp, ra */ +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK) + +#define RAOFF (FRAMESZ - (1*SZREG)) +#define FPOFF (FRAMESZ - (2*SZREG)) +#define GPOFF (FRAMESZ - (3*SZREG)) + +#define A0OFF (FRAMESZ + (0*SZREG)) +#define A1OFF (FRAMESZ + (1*SZREG)) +#define A2OFF (FRAMESZ + (2*SZREG)) +#define A3OFF (FRAMESZ + (3*SZREG)) + + .text + +# +# _NS_InvokeByIndex_P(that, methodIndex, paramCount, params) +# a0 a1 a2 a3 + + .globl _NS_InvokeByIndex_P + .align 2 + .type _NS_InvokeByIndex_P,@function + .ent _NS_InvokeByIndex_P,0 + .frame fp, FRAMESZ, ra +_NS_InvokeByIndex_P: + SETUP_GP subu sp, FRAMESZ - # specify the save register mask -- XXX do we want the a0-a3 here, given - # our "split" frame where the args are saved below a dynamicly allocated - # region under the high frame? - # - # 10010000000000010000000011110000 - .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG) - - # thou shalt not use .cprestore if yer frame has variable size... - # .cprestore GPOFF - - REG_S ra, RAOFF(sp) - - # this happens automatically with .cprestore, but we cannot use that op... - REG_S gp, GPOFF(sp) - REG_S s0, S0OFF(sp) - REG_S s1, S1OFF(sp) - - REG_S a0, A0OFF(sp) - REG_S a1, A1OFF(sp) - REG_S a2, A2OFF(sp) - REG_S a3, A3OFF(sp) + # specify the save register mask for gp, fp, ra, a3 - a0 + .mask 0xD00000F0, RAOFF-FRAMESZ - # invoke_count_words(paramCount, params) - move a0, a2 - move a1, a3 + sw ra, RAOFF(sp) + sw fp, FPOFF(sp) - jal invoke_count_words - lw gp, GPOFF(sp) + # we can't use .cprestore in a variable stack frame + sw gp, GPOFF(sp) - # save the old sp so we can pop the param area and any "low frame" - # needed as an argsave area below the param block for callees that - # we invoke. - move s0, sp - - REG_L a1, A2OFF(sp) # a1 = paramCount - REG_L a2, A3OFF(sp) # a2 = params - - # we define a word as 4 bytes, period end of story! - sll v0, 2 # 4 bytes * result of invoke_copy_words - subu v0, LOFRAMESZ # but we take back the argsave area built into - # our stack frame -- SWEET! - subu sp, sp, v0 # make room - move a0, sp # a0 = param stack address - move s1, a0 # save it for later -- it should be safe here - - # the old sp is still saved in s0, but we now need another argsave - # area ("low frame") for the invoke_copy_to_stack call. - subu sp, sp, LOFRAMESZ + sw a0, A0OFF(sp) + sw a1, A1OFF(sp) + sw a2, A2OFF(sp) + sw a3, A3OFF(sp) + + # save bottom of fixed frame + move fp, sp + + # extern "C" uint32 + # invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s); + la t9, invoke_count_words + move a0, a2 + move a1, a3 + jalr t9 + lw gp, GPOFF(fp) - # copy the param into the stack areas + # allocate variable stack, with a size of: + # wordsize (of 4 bytes) * result (already aligned to dword) + # but a minimum of 16 byte + sll v0, 2 + slt t0, v0, 16 + beqz t0, 1f + li v0, 16 +1: subu sp, v0 + + # let a0 point to the bottom of the variable stack, allocate + # another fixed stack for: + # extern "C" void # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, - # nsXPTCVariant* s) - jal invoke_copy_to_stack - lw gp, GPOFF(s0) - - move sp, s0 # get orig sp back, popping params and argsave - - REG_L a0, A0OFF(sp) # a0 = set "that" to be "this" - REG_L a1, A1OFF(sp) # a1 = methodIndex - - # t1 = methodIndex * 4 - # (use shift instead of mult) - sll t1, a1, 2 - - # calculate the function we need to jump to, - # which must then be saved in t9 + # nsXPTCVariant* s); + la t9, invoke_copy_to_stack + move a0, sp + lw a1, A2OFF(fp) + lw a2, A3OFF(fp) + subu sp, 16 + jalr t9 + lw gp, GPOFF(fp) + + # back to the variable stack frame + addu sp, 16 + + # calculate the function we need to jump to, which must then be + # stored in t9 + lw a0, A0OFF(fp) # a0 = set "that" to be "this" + lw t0, A1OFF(fp) # a1 = methodIndex lw t9, 0(a0) - addu t9, t9, t1 - lw t9, 8(t9) - - # a1..a3 and f13..f14 should now be set to what - # invoke_copy_to_stack told us. skip a0 and f12 - # because that is the "this" pointer - - REG_L a1, 1*SZREG(s1) - REG_L a2, 2*SZREG(s1) - REG_L a3, 3*SZREG(s1) - - l.d $f13, 8(s1) - l.d $f14, 16(s1) - - # Create the stack pointer for the function, which must have 4 words - # of space for callee-saved args. invoke_count_words allocated space - # for a0 starting at s1, so we just move s1 into sp. - move sp, s1 + # t0 = methodIndex << PTRLOG + sll t0, t0, PTRLOG + addu t9, t0 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ + lw t9, (t9) +#else /* not G++ V3 ABI */ + lw t9, 2*PTRSIZE(t9) +#endif /* G++ V3 ABI */ + + # Set a1-a3 to what invoke_copy_to_stack told us. a0 is already + # the "this" pointer. We don't have to care about floating + # point arguments, the non-FP "this" pointer as first argument + # means they'll never be used. + lw a1, 1*SZREG(sp) + lw a2, 2*SZREG(sp) + lw a3, 3*SZREG(sp) + + jalr t9 + # Micro-optimization: There's no gp usage below this point, so + # we don't reload. + # lw gp, GPOFF(fp) - jalr ra, t9 - lw gp, GPOFF(s0) + # leave variable stack frame + move sp, fp - move sp, s0 + lw ra, RAOFF(sp) + lw fp, FPOFF(sp) - REG_L ra, RAOFF(sp) - REG_L s0, S0OFF(sp) - addu sp, FRAMESZ + addiu sp, FRAMESZ j ra -.end _XPTC_InvokeByIndex +END(_NS_InvokeByIndex_P) --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp @@ -39,6 +39,7 @@ * ***** END LICENSE BLOCK ***** */ #include "xptcprivate.h" +#include "xptiprivate.h" /* * This is for MIPS O32 ABI @@ -54,7 +55,6 @@ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; nsXPTCMiniVariant* dispatchParams = NULL; - nsIInterfaceInfo* iface_info = NULL; const nsXPTMethodInfo* info; PRUint8 paramCount; PRUint8 i; @@ -62,11 +62,8 @@ NS_ASSERTION(self,"no self"); - self->GetInterfaceInfo(&iface_info); - NS_ASSERTION(iface_info,"no interface info"); - - iface_info->GetMethodInfo(PRUint16(methodIndex), &info); - NS_ASSERTION(info,"no interface info"); + self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); + NS_ASSERTION(info,"no method info"); paramCount = info->GetParamCount(); @@ -109,9 +106,7 @@ } } - result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams); - - NS_RELEASE(iface_info); + result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams); if(dispatchParams != paramBuffer) delete [] dispatchParams; --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_m68k.cpp +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_m68k.cpp @@ -128,8 +128,8 @@ } } -XPTC_PUBLIC_API(nsresult) -XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, +EXPORT_XPCOM_API(nsresult) +NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, PRUint32 paramCount, nsXPTCVariant* params) { PRUint32 result, n; --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s @@ -0,0 +1,142 @@ +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corp, Inc. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Stuart Parmenter + * Chris Waterson + * Thiemo Seufer + */ + +/* This code is for MIPS using the O32 ABI. */ + +#include +#include + +# NARGSAVE is the argument space in the callers frame, including extra +# 'shadowed' space for the argument registers. The minimum of 4 +# argument slots is sometimes predefined in the header files. +#ifndef NARGSAVE +#define NARGSAVE 4 +#endif + +#define LOCALSZ 2 /* gp, ra */ +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK) + +#define RAOFF (FRAMESZ - (1*SZREG)) +#define GPOFF (FRAMESZ - (2*SZREG)) + +#define A0OFF (FRAMESZ + (0*SZREG)) +#define A1OFF (FRAMESZ + (1*SZREG)) +#define A2OFF (FRAMESZ + (2*SZREG)) +#define A3OFF (FRAMESZ + (3*SZREG)) + + .text + +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ +#define STUB_ENTRY(x) \ + .if x < 10; \ + .globl _ZN14nsXPTCStubBase5Stub ##x ##Ev; \ + .type _ZN14nsXPTCStubBase5Stub ##x ##Ev,@function; \ + .aent _ZN14nsXPTCStubBase5Stub ##x ##Ev,0; \ +_ZN14nsXPTCStubBase5Stub ##x ##Ev:; \ + SETUP_GP; \ + li t0,x; \ + b sharedstub; \ + .elseif x < 100; \ + .globl _ZN14nsXPTCStubBase6Stub ##x ##Ev; \ + .type _ZN14nsXPTCStubBase6Stub ##x ##Ev,@function; \ + .aent _ZN14nsXPTCStubBase6Stub ##x ##Ev,0; \ +_ZN14nsXPTCStubBase6Stub ##x ##Ev:; \ + SETUP_GP; \ + li t0,x; \ + b sharedstub; \ + .elseif x < 1000; \ + .globl _ZN14nsXPTCStubBase7Stub ##x ##Ev; \ + .type _ZN14nsXPTCStubBase7Stub ##x ##Ev,@function; \ + .aent _ZN14nsXPTCStubBase7Stub ##x ##Ev,0; \ +_ZN14nsXPTCStubBase7Stub ##x ##Ev:; \ + SETUP_GP; \ + li t0,x; \ + b sharedstub; \ + .else; \ + .err; \ + .endif +#else /* not G++ V3 ABI */ +#define STUB_ENTRY(x) \ + .globl Stub ##x ##__14nsXPTCStubBase; \ + .type Stub ##x ##__14nsXPTCStubBase,@function; \ + .aent Stub ##x ##__14nsXPTCStubBase,0; \ +Stub ##x ##__14nsXPTCStubBase:; \ + SETUP_GP; \ + li t0,x; \ + b sharedstub +#endif /* G++ V3 ABI */ + +# SENTINEL_ENTRY is handled in the cpp file. +#define SENTINEL_ENTRY(x) + +# +# open a dummy frame for the function entries +# + .align 2 + .type dummy,@function + .ent dummy, 0 + .frame sp, FRAMESZ, ra +dummy: + SETUP_GP + +#include "xptcstubsdef.inc" + +sharedstub: + subu sp, FRAMESZ + + # specify the save register mask for gp, ra, a0-a3 + .mask 0x900000F0, RAOFF-FRAMESZ + + sw ra, RAOFF(sp) + SAVE_GP(GPOFF) + + # Micro-optimization: a0 is already loaded, and its slot gets + # ignored by PrepareAndDispatch, so no need to save it here. + # sw a0, A0OFF(sp) + sw a1, A1OFF(sp) + sw a2, A2OFF(sp) + sw a3, A3OFF(sp) + + la t9, PrepareAndDispatch + + # t0 is methodIndex + move a1, t0 + # have a2 point to the begin of the argument space on stack + addiu a2, sp, FRAMESZ + + # PrepareAndDispatch(that, methodIndex, args) + jalr t9 + + # Micro-optimization: Using jalr explicitly has the side-effect + # of not triggering .cprestore. This is ok because we have no + # gp reference below this point. It also allows better + # instruction sscheduling. + # lw gp, GPOFF(fp) + + lw ra, RAOFF(sp) + addiu sp, FRAMESZ + j ra + END(dummy) --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/Makefile.in @@ -64,7 +64,7 @@ # # Lots of Unixish x86 flavors # -ifneq (,$(filter FreeBSD NetBSD OpenBSD BSD_OS Darwin,$(OS_ARCH))) +ifneq (,$(filter FreeBSD NetBSD OpenBSD BSD_OS Darwin GNU,$(OS_ARCH))) ifeq (86,$(findstring 86,$(OS_TEST))) CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp ifeq (Darwin,$(OS_ARCH)) @@ -222,12 +222,13 @@ # Linux/HPPA/gcc # ifeq ($(OS_ARCH),Linux) -ifneq (,$(filter hppa2.0 hppa1.1,$(OS_TEST))) +ifneq (,$(filter hppa hppa2.0 hppa1.1,$(OS_TEST))) ifndef GNU_CXX $(error Unknown C++ compiler, xptcall assembly will probably be incorrect.) else CPPSRCS := xptcinvoke_pa32.cpp xptcstubs_pa32.cpp ASFILES := xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s +MOZ_OPTIMIZE_FLAGS := -O0 endif endif endif @@ -276,11 +277,7 @@ ifneq (,$(findstring mips, $(OS_TEST))) CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s -#xptcstubs_mips.cpp -# xptcstubs_asm_mips.s -ifdef GNU_CC -ASFLAGS += $(INCLUDES) -x assembler-with-cpp -D__GNUC__ -endif +ASFLAGS += -I$(PUBLIC) -x assembler-with-cpp endif endif @@ -466,10 +463,7 @@ ifeq ($(OS_ARCH),Linux) ifneq (,$(findstring mips, $(OS_TEST))) -xptcstubs_asm_mips.o: xptcstubs_asm_mips.s.m4 $(PUBLIC)/xptcstubsdef.inc - m4 $(INCLUDES) $< > ./xptcstubs_asm_mips.s && \ - $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_mips.s - $(RM) -f ./xptcstubs_asm_mips.s +xptcstubs_asm_mips.o: $(PUBLIC)/xptcstubsdef.inc endif endif --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h @@ -67,7 +67,7 @@ * */ -#if defined(LINUX) || (defined(__GLIBC__) && defined(__FreeBSD_kernel__)) +#if defined(LINUX) || (defined(__GLIBC__) && (defined(__FreeBSD_kernel__) || defined(__GNU__))) #if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7) /* Old gcc 2.7.x.x. What does gcc 2.8.x do?? */ --- xulrunner-1.9.0.19.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp +++ xulrunner-1.9.0.19/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp @@ -24,6 +24,7 @@ * Contributor(s): * Stuart Parmenter * Brendan Eich + * Thiemo Seufer * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"), @@ -52,10 +53,8 @@ // Count a word for a0 even though it's never stored or loaded // We do this only for alignment of register pairs. PRUint32 result = 1; - for (PRUint32 i = 0; i < paramCount; i++, s++) + for (PRUint32 i = 0; i < paramCount; i++, result++, s++) { - result++; - if (s->IsPtrData()) continue; @@ -68,6 +67,9 @@ result++; result++; break; + + default: + break; } } return (result + 1) & ~(PRUint32)1; @@ -88,8 +90,6 @@ continue; } - *((void**)d) = s->val.p; - switch(s->type) { case nsXPTType::T_I64 : @@ -104,19 +104,20 @@ if ((PRWord)d & 4) d++; *((double*) d) = s->val.d; d++; break; + default: + *((void**)d) = s->val.p; + break; } } } -extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, +extern "C" nsresult _NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, PRUint32 paramCount, nsXPTCVariant* params); -extern "C" -XPTC_PUBLIC_API(nsresult) -XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, +EXPORT_XPCOM_API(nsresult) +NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, PRUint32 paramCount, nsXPTCVariant* params) { - return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params); -} - + return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params); +} --- xulrunner-1.9.0.19.orig/intl/uconv/idl/nsIScriptableUConv.idl +++ xulrunner-1.9.0.19/intl/uconv/idl/nsIScriptableUConv.idl @@ -102,3 +102,16 @@ */ attribute string charset; }; + +[scriptable, uuid(f7ed6618-5ff5-4f0b-bb83-48ce63eb289b)] +interface nsIScriptableUnicodeConverter_1_9_BRANCH : nsIScriptableUnicodeConverter +{ + /** + * Internal use + * + * When this attribute is set, all charsets may be accessed. + * When it is not set (the default), charsets with the isXSSVulnerable flag + * may not be accessed + */ + attribute boolean isInternal; +}; --- xulrunner-1.9.0.19.orig/intl/uconv/idl/nsICharsetConverterManager.idl +++ xulrunner-1.9.0.19/intl/uconv/idl/nsICharsetConverterManager.idl @@ -113,10 +113,11 @@ * character encoding may be used for certain purposes, if it is * multi-byte, and the language code for it. See charsetData.properties * for the source of this data. Some known property names: - * notForBrowser - not to be used in the bowser. + * notForBrowser - not to be used in the browser. * notForOutgoing - not to be used for exporting files. * LangGroup - language code for charset, e.g. 'he' and 'zh-CN'. * isMultibyte - is this a multi-byte charset? + * isXSSVulnerable - not to be used in untrusted web content * * @param charset name of the character encoding, e.g. 'iso-8859-15'. * @param prop property desired for the character encoding. @@ -135,3 +136,16 @@ nsIAtom getCharsetLangGroup(in string charset); nsIAtom getCharsetLangGroupRaw(in string charset); }; + +[scriptable, uuid(36982132-707c-4d77-b27f-958e76e022de)] +interface nsICharsetConverterManager_1_9_BRANCH : nsICharsetConverterManager +{ + /** + * "Internal" versions of getUnicodeDecoder* will return a decoder for any + * charset; the other versions will return NS_ERROR_UCONV_NOCONV if the + * requested charset is vulnerable to XSS attacks and should not be used + * with untrusted input + */ + nsIUnicodeDecoder getUnicodeDecoderInternal(in string charset); + nsIUnicodeDecoder getUnicodeDecoderRawInternal(in string charset); +}; --- xulrunner-1.9.0.19.orig/intl/uconv/src/nsCharsetConverterManager.h +++ xulrunner-1.9.0.19/intl/uconv/src/nsCharsetConverterManager.h @@ -46,10 +46,11 @@ #include "nsINativeUConvService.h" #endif -class nsCharsetConverterManager : public nsICharsetConverterManager +class nsCharsetConverterManager : public nsICharsetConverterManager_1_9_BRANCH { NS_DECL_ISUPPORTS NS_DECL_NSICHARSETCONVERTERMANAGER + NS_DECL_NSICHARSETCONVERTERMANAGER_1_9_BRANCH public: --- xulrunner-1.9.0.19.orig/intl/uconv/src/charsetData.properties +++ xulrunner-1.9.0.19/intl/uconv/src/charsetData.properties @@ -47,6 +47,10 @@ ## charset_name.notForOutgoing = anything - specifies that this charset is ## not to be used for exporting files ('SaveAsCharset' in composer) ## +## charset_name.isXSSVulnerable = anything - specifies that this charset is +## known to be vulnerable to XSS attacks and should not be exposed to web +## content +## ## charset_name.LangGroup = ## ## charset_name.isMultibyte = multi byte charsets @@ -67,6 +71,13 @@ x-ibm1046.notForBrowser = true iso-8859-8-e.notForBrowser = true utf-7.notForBrowser = true +x-mac-arabic.notForBrowser = true +x-mac-farsi.notForBrowser = true +x-mac-hebrew.notForBrowser = true + +x-mac-arabic.isXSSVulnerable = true +x-mac-farsi.isXSSVulnerable = true +x-mac-hebrew.isXSSVulnerable = true t.61-8bit.notForOutgoing = true utf-7.notForOutgoing = true --- xulrunner-1.9.0.19.orig/intl/uconv/src/nsCharsetConverterManager.cpp +++ xulrunner-1.9.0.19/intl/uconv/src/nsCharsetConverterManager.cpp @@ -69,8 +69,9 @@ // Class nsCharsetConverterManager [implementation] -NS_IMPL_THREADSAFE_ISUPPORTS1(nsCharsetConverterManager, - nsICharsetConverterManager) +NS_IMPL_THREADSAFE_ISUPPORTS2(nsCharsetConverterManager, + nsICharsetConverterManager, + nsICharsetConverterManager_1_9_BRANCH) nsCharsetConverterManager::nsCharsetConverterManager() :mDataBundle(NULL), mTitleBundle(NULL) @@ -223,6 +224,20 @@ } NS_IMETHODIMP +nsCharsetConverterManager::GetUnicodeDecoderRaw(const char * aSrc, + nsIUnicodeDecoder ** aResult) +{ + nsresult rv; + + nsAutoString str; + rv = GetCharsetData(aSrc, NS_LITERAL_STRING(".isXSSVulnerable").get(), str); + if (NS_SUCCEEDED(rv)) + return NS_ERROR_UCONV_NOCONV; + + return GetUnicodeDecoderRawInternal(aSrc, aResult); +} + +NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeDecoder(const char * aSrc, nsIUnicodeDecoder ** aResult) { @@ -237,8 +252,22 @@ } NS_IMETHODIMP -nsCharsetConverterManager::GetUnicodeDecoderRaw(const char * aSrc, - nsIUnicodeDecoder ** aResult) +nsCharsetConverterManager::GetUnicodeDecoderInternal(const char * aSrc, + nsIUnicodeDecoder ** aResult) +{ + // resolve the charset first + nsCAutoString charset; + + // fully qualify to possibly avoid vtable call + nsCharsetConverterManager::GetCharsetAlias(aSrc, charset); + + return nsCharsetConverterManager::GetUnicodeDecoderRawInternal(charset.get(), + aResult); +} + +NS_IMETHODIMP +nsCharsetConverterManager::GetUnicodeDecoderRawInternal(const char * aSrc, + nsIUnicodeDecoder ** aResult) { *aResult= nsnull; nsCOMPtr decoder; --- xulrunner-1.9.0.19.orig/intl/uconv/src/nsScriptableUConv.cpp +++ xulrunner-1.9.0.19/intl/uconv/src/nsScriptableUConv.cpp @@ -52,9 +52,12 @@ static PRInt32 gInstanceCount = 0; /* Implementation file */ -NS_IMPL_ISUPPORTS1(nsScriptableUnicodeConverter, nsIScriptableUnicodeConverter) +NS_IMPL_ISUPPORTS2(nsScriptableUnicodeConverter, + nsIScriptableUnicodeConverter, + nsIScriptableUnicodeConverter_1_9_BRANCH) nsScriptableUnicodeConverter::nsScriptableUnicodeConverter() +: mIsInternal(PR_FALSE) { PR_AtomicIncrement(&gInstanceCount); } @@ -270,13 +273,27 @@ return InitConverter(); } +NS_IMETHODIMP +nsScriptableUnicodeConverter::GetIsInternal(PRBool *aIsInternal) +{ + *aIsInternal = mIsInternal; + return NS_OK; +} + +NS_IMETHODIMP +nsScriptableUnicodeConverter::SetIsInternal(const PRBool aIsInternal) +{ + mIsInternal = aIsInternal; + return NS_OK; +} + nsresult nsScriptableUnicodeConverter::InitConverter() { nsresult rv = NS_OK; mEncoder = NULL ; - nsCOMPtr ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv); + nsCOMPtr ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv); if (NS_SUCCEEDED( rv) && (nsnull != ccm)) { // get charset atom due to getting unicode converter @@ -286,7 +303,11 @@ if(NS_SUCCEEDED(rv)) { rv = mEncoder->SetOutputErrorBehavior(nsIUnicodeEncoder::kOnError_Replace, nsnull, (PRUnichar)'?'); if(NS_SUCCEEDED(rv)) { - rv = ccm->GetUnicodeDecoder(mCharset.get(), getter_AddRefs(mDecoder)); + rv = mIsInternal ? + ccm->GetUnicodeDecoderInternal(mCharset.get(), + getter_AddRefs(mDecoder)) : + ccm->GetUnicodeDecoder(mCharset.get(), + getter_AddRefs(mDecoder)); } } } --- xulrunner-1.9.0.19.orig/intl/uconv/src/nsScriptableUConv.h +++ xulrunner-1.9.0.19/intl/uconv/src/nsScriptableUConv.h @@ -44,11 +44,12 @@ #include "nsICharsetConverterManager.h" #include "nsIScriptableUConv.h" -class nsScriptableUnicodeConverter : public nsIScriptableUnicodeConverter +class nsScriptableUnicodeConverter : public nsIScriptableUnicodeConverter_1_9_BRANCH { public: NS_DECL_ISUPPORTS NS_DECL_NSISCRIPTABLEUNICODECONVERTER + NS_DECL_NSISCRIPTABLEUNICODECONVERTER_1_9_BRANCH nsScriptableUnicodeConverter(); virtual ~nsScriptableUnicodeConverter(); @@ -59,6 +60,7 @@ nsCAutoString mCharset; nsCOMPtr mEncoder; nsCOMPtr mDecoder; + PRPackedBool mIsInternal; nsresult FinishWithLength(char **_retval, PRInt32* aLength); nsresult ConvertFromUnicodeWithLength(const nsAString& aSrc, --- xulrunner-1.9.0.19.orig/js/src/jsinterp.c +++ xulrunner-1.9.0.19/js/src/jsinterp.c @@ -1851,6 +1851,7 @@ JSObject *obj, *obj2, *proto, *parent; jsval lval, rval; JSClass *clasp; + JSTempValueRooter tvr; fun = NULL; obj2 = NULL; @@ -1897,10 +1898,13 @@ if (!obj) return JS_FALSE; + JS_PUSH_SINGLE_TEMP_ROOT(cx, obj, &tvr); + /* Now we have an object with a constructor method; call it. */ vp[1] = OBJECT_TO_JSVAL(obj); if (!js_Invoke(cx, argc, vp, JSINVOKE_CONSTRUCT)) { cx->weakRoots.newborn[GCX_OBJECT] = NULL; + JS_POP_TEMP_ROOT(cx, &tvr); return JS_FALSE; } @@ -1912,12 +1916,14 @@ JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_NEW_RESULT, js_ValueToPrintableString(cx, rval)); + JS_POP_TEMP_ROOT(cx, &tvr); return JS_FALSE; } *vp = OBJECT_TO_JSVAL(obj); } JS_RUNTIME_METER(cx->runtime, constructs); + JS_POP_TEMP_ROOT(cx, &tvr); return JS_TRUE; } --- xulrunner-1.9.0.19.orig/js/src/js.c +++ xulrunner-1.9.0.19/js/src/js.c @@ -132,8 +132,8 @@ #ifdef EDITLINE JS_BEGIN_EXTERN_C -extern char *readline(const char *prompt); -extern void add_history(char *line); +extern JS_EXPORT_API(char) *readline(const char *prompt); +extern JS_EXPORT_API(void) add_history(char *line); JS_END_EXTERN_C #endif --- xulrunner-1.9.0.19.orig/js/src/jslock.c +++ xulrunner-1.9.0.19/js/src/jslock.c @@ -48,6 +48,8 @@ #include "jspubtd.h" #include "jsutil.h" /* Added by JSIFY */ #include "jstypes.h" +#include "jsapi.h" +#include "jsarray.h" #include "jsbit.h" #include "jscntxt.h" #include "jsdtoa.h" @@ -355,7 +357,10 @@ obj = scope->object; if (obj) { nslots = scope->map.freeslot; - for (i = 0; i != nslots; ++i) { + i = (STOBJ_GET_CLASS(obj) == &js_SlowArrayClass) + ? JSSLOT_PRIVATE + 1 + : JSSLOT_PRIVATE; + for (; i < nslots; ++i) { v = STOBJ_GET_SLOT(obj, i); if (JSVAL_IS_STRING(v) && !js_MakeStringImmutable(cx, JSVAL_TO_STRING(v))) { --- xulrunner-1.9.0.19.orig/js/src/jsgc.c +++ xulrunner-1.9.0.19/js/src/jsgc.c @@ -3519,6 +3519,7 @@ JS_LOCK_GC(rt); JS_UNKEEP_ATOMS(rt); JS_POP_TEMP_ROOT(cx, &tvr); + cx->weakRoots = savedWeakRoots; } else if (gckind == GC_LAST_CONTEXT && rt->gcPoke) { /* * On shutdown iterate until JSGC_END callback stops creating --- xulrunner-1.9.0.19.orig/js/src/jsarray.c +++ xulrunner-1.9.0.19/js/src/jsarray.c @@ -619,9 +619,17 @@ if (OBJ_IS_DENSE_ARRAY(cx, obj)) { /* Don't reallocate if we're not actually shrinking our slots. */ - jsuint oldsize = ARRAY_DENSE_LENGTH(obj); - if (oldsize >= newlen && !ResizeSlots(cx, obj, oldsize, newlen)) - return JS_FALSE; + jsuint capacity = ARRAY_DENSE_LENGTH(obj); + if (capacity > newlen) { + jsuint numNonHolesRemoved = 0; + jsval *slots; + for (slots = obj->dslots + newlen; slots < obj->dslots + capacity; slots++) + if (*slots != JSVAL_HOLE) + numNonHolesRemoved++; + if (!ResizeSlots(cx, obj, capacity, newlen)) + return JS_FALSE; + obj->fslots[JSSLOT_ARRAY_COUNT] -= numNonHolesRemoved; + } } else if (oldlen - newlen < (1 << 24)) { do { --oldlen; @@ -687,6 +695,8 @@ obj->dslots[i] == JSVAL_HOLE)) { JSObject *proto = STOBJ_GET_PROTO(obj); + JSTempValueRooter root; + JSBool rv; if (!proto) { *objp = NULL; @@ -694,7 +704,10 @@ return JS_TRUE; } - return OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp); + JS_PUSH_SINGLE_TEMP_ROOT(cx, proto, &root); + rv = OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp); + JS_POP_TEMP_ROOT(cx, &root); + return rv; } /* FIXME 417501: threadsafety: could race with a lookup on another thread. --- xulrunner-1.9.0.19.orig/js/src/jsxml.c +++ xulrunner-1.9.0.19/js/src/jsxml.c @@ -7050,7 +7050,7 @@ ns = (JSXMLNamespace *) JS_GetPrivate(cx, nsobj); ns->declared = JS_TRUE; - qnargv[0] = vp[2] = OBJECT_TO_JSVAL(nsobj); + qnargv[0] = OBJECT_TO_JSVAL(nsobj); qnargv[1] = OBJECT_TO_JSVAL(xml->name->object); qnobj = js_ConstructObject(cx, &js_QNameClass.base, NULL, NULL, 2, qnargv); if (!qnobj) --- xulrunner-1.9.0.19.orig/js/src/jsemit.c +++ xulrunner-1.9.0.19/js/src/jsemit.c @@ -5833,7 +5833,7 @@ case TOK_FILTER: if (!js_EmitTree(cx, cg, pn->pn_left)) return JS_FALSE; - jmp = js_Emit3(cx, cg, JSOP_FILTER, 0, 0); + jmp = EmitJump(cx, cg, JSOP_FILTER, 0); if (jmp < 0) return JS_FALSE; top = CG_OFFSET(cg); --- xulrunner-1.9.0.19.orig/js/src/jsobj.h +++ xulrunner-1.9.0.19/js/src/jsobj.h @@ -711,6 +711,9 @@ extern JS_FRIEND_API(JSBool) js_GetterOnlyPropertyStub(JSContext *cx, JSObject *obj, jsval id, jsval *vp); +extern JS_FRIEND_API(void) +js_SetObjectWeakRoot(JSContext *cx, JSObject *obj); + JS_END_EXTERN_C #endif /* jsobj_h___ */ --- xulrunner-1.9.0.19.orig/js/src/Makefile.in +++ xulrunner-1.9.0.19/js/src/Makefile.in @@ -48,6 +48,7 @@ LIBRARY_NAME = mozjs LIB_IS_C_ONLY = 1 GRE_MODULE = 1 +SO_VERSION = 1d ifdef GNU_CC ifdef INTEL_CC @@ -77,6 +78,16 @@ RESFILE = js$(MOZ_BITS)40.res endif +ifdef ENABLE_JS_BINARY +SIMPLE_PROGRAMS = js +PROG_LIBS = -L. $(MOZ_JS_LIBS) $(NSPR_LIBS) +$(SIMPLE_PROGRAMS): $(DLL_PREFIX)$(LIBRARY_NAME)$(DLL_SUFFIX) +ifdef HAVE_READLINE +PROG_LIBS += $(READLINE_LIBS) +DEFINES = -DEDITLINE +endif +endif + PACKAGE_FILE = js.pkg # JavaScript must be built shared, even for static builds, as it is used by --- xulrunner-1.9.0.19.orig/js/src/jsdbgapi.c +++ xulrunner-1.9.0.19/js/src/jsdbgapi.c @@ -789,17 +789,18 @@ attrs = sprop->attrs; flags = sprop->flags; shortid = sprop->shortid; + JS_UNLOCK_OBJ(cx, pobj); } else { + OBJ_DROP_PROPERTY(cx, pobj, prop); + if (!OBJ_GET_PROPERTY(cx, pobj, propid, &value) || !OBJ_GET_ATTRIBUTES(cx, pobj, propid, prop, &attrs)) { - OBJ_DROP_PROPERTY(cx, pobj, prop); return JS_FALSE; } getter = setter = NULL; flags = 0; shortid = 0; } - OBJ_DROP_PROPERTY(cx, pobj, prop); /* Recall that obj is native, whether or not pobj is native. */ if (!js_DefineNativeProperty(cx, obj, propid, value, getter, setter, --- xulrunner-1.9.0.19.orig/js/src/jsapi.h +++ xulrunner-1.9.0.19/js/src/jsapi.h @@ -138,34 +138,6 @@ #define JSFUN_DISJOINT_FLAGS(f) ((f) & 0x0f) #define JSFUN_GSFLAGS(f) ((f) & (JSFUN_GETTER | JSFUN_SETTER)) -#ifdef MOZILLA_1_8_BRANCH - -/* - * Squeeze three more bits into existing 8-bit flags by taking advantage of - * the invalid combination (JSFUN_GETTER | JSFUN_SETTER). - */ -#define JSFUN_GETTER_TEST(f) (JSFUN_GSFLAGS(f) == JSFUN_GETTER) -#define JSFUN_SETTER_TEST(f) (JSFUN_GSFLAGS(f) == JSFUN_SETTER) -#define JSFUN_FLAGS_TEST(f,t) (JSFUN_GSFLAGS(~(f)) ? (f) & (t) : 0) -#define JSFUN_BOUND_METHOD_TEST(f) JSFUN_FLAGS_TEST(f, JSFUN_BOUND_METHOD) -#define JSFUN_HEAVYWEIGHT_TEST(f) JSFUN_FLAGS_TEST(f, JSFUN_HEAVYWEIGHT) - -#define JSFUN_GSFLAG2ATTR(f) (JSFUN_GETTER_TEST(f) ? JSPROP_GETTER : \ - JSFUN_SETTER_TEST(f) ? JSPROP_SETTER : 0) - -#define JSFUN_THISP_FLAGS(f) (JSFUN_GSFLAGS(~(f)) ? 0 : \ - (f) & JSFUN_THISP_PRIMITIVE) -#define JSFUN_THISP_TEST(f,t) ((f) == (t) || (f) == JSFUN_THISP_PRIMITIVE) - -#define JSFUN_THISP_STRING 0x30 /* |this| may be a primitive string */ -#define JSFUN_THISP_NUMBER 0x70 /* |this| may be a primitive number */ -#define JSFUN_THISP_BOOLEAN 0xb0 /* |this| may be a primitive boolean */ -#define JSFUN_THISP_PRIMITIVE 0xf0 /* |this| may be any primitive value */ - -#define JSFUN_FLAGS_MASK 0xf8 /* overlay JSFUN_* attributes */ - -#else - #define JSFUN_GETTER_TEST(f) ((f) & JSFUN_GETTER) #define JSFUN_SETTER_TEST(f) ((f) & JSFUN_SETTER) #define JSFUN_BOUND_METHOD_TEST(f) ((f) & JSFUN_BOUND_METHOD) @@ -191,8 +163,6 @@ instead of defaulting to class gsops for property holding function */ -#endif - /* * Re-use JSFUN_LAMBDA, which applies only to scripted functions, for use in * JSFunctionSpec arrays that specify generic native prototype methods, i.e., @@ -1433,11 +1403,6 @@ struct JSFunctionSpec { const char *name; JSNative call; -#ifdef MOZILLA_1_8_BRANCH - uint8 nargs; - uint8 flags; - uint16 extra; -#else uint16 nargs; uint16 flags; @@ -1448,7 +1413,6 @@ * If fast native, minimum required argc. */ uint32 extra; -#endif }; /* --- xulrunner-1.9.0.19.orig/js/src/jsobj.c +++ xulrunner-1.9.0.19/js/src/jsobj.c @@ -342,9 +342,7 @@ #if JS_HAS_GETTER_SETTER JSObject *obj2; JSProperty *prop; - uintN attrs; #endif - jsval val; JS_CHECK_RECURSION(cx, return NULL); @@ -369,44 +367,60 @@ ok = JS_TRUE; for (i = 0, length = ida->length; i < length; i++) { + JSTempValueRooter v; + JSTempValueRooter setter; + PRBool hasGetter, hasSetter; + id = ida->vector[i]; + JS_PUSH_SINGLE_TEMP_ROOT(cx, JSVAL_VOID, &v); #if JS_HAS_GETTER_SETTER ok = OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop); if (!ok) - break; + goto brk; if (!prop) - continue; - ok = OBJ_GET_ATTRIBUTES(cx, obj2, id, prop, &attrs); - if (ok) { - if (OBJ_IS_NATIVE(obj2) && - (attrs & (JSPROP_GETTER | JSPROP_SETTER))) { - val = JSVAL_NULL; - if (attrs & JSPROP_GETTER) - val = (jsval) ((JSScopeProperty*)prop)->getter; - if (attrs & JSPROP_SETTER) { - if (val != JSVAL_NULL) { - /* Mark the getter, then set val to setter. */ - ok = (MarkSharpObjects(cx, JSVAL_TO_OBJECT(val), - NULL) - != NULL); - } - val = (jsval) ((JSScopeProperty*)prop)->setter; - } - } else { - ok = OBJ_GET_PROPERTY(cx, obj, id, &val); + goto cont; + JS_PUSH_SINGLE_TEMP_ROOT(cx, JSVAL_VOID, &setter); + if (!OBJ_IS_NATIVE(obj2)) { + OBJ_DROP_PROPERTY(cx, obj2, prop); + hasGetter = hasSetter = PR_FALSE; + } else { + JSScopeProperty *sprop = (JSScopeProperty *) prop; + uintN attrs = sprop->attrs; + hasGetter = (attrs & JSPROP_GETTER); + hasSetter = (attrs & JSPROP_SETTER); + if (hasGetter) + v.u.value = (jsval) ((JSScopeProperty*)sprop)->getter; + if (hasSetter) + setter.u.value = (jsval) ((JSScopeProperty*)sprop)->setter; + JS_UNLOCK_OBJ(cx, obj2); + } + if (hasSetter) { + /* Mark the getter, then set value to setter. */ + if (hasGetter && !JSVAL_IS_PRIMITIVE(v.u.value)) { + ok = !!MarkSharpObjects(cx, JSVAL_TO_OBJECT(v.u.value), NULL); } + if (ok) + v.u.value = setter.u.value; + } else if (!hasGetter) { + ok = OBJ_GET_PROPERTY(cx, obj, id, &(v.u.value)); } - OBJ_DROP_PROPERTY(cx, obj2, prop); + JS_POP_TEMP_ROOT(cx, &setter); #else - ok = OBJ_GET_PROPERTY(cx, obj, id, &val); + ok = OBJ_GET_PROPERTY(cx, obj, id, &(v.u.value)); #endif if (!ok) - break; - if (!JSVAL_IS_PRIMITIVE(val) && - !MarkSharpObjects(cx, JSVAL_TO_OBJECT(val), NULL)) { + goto brk; + if (!JSVAL_IS_PRIMITIVE(v.u.value) && + !MarkSharpObjects(cx, JSVAL_TO_OBJECT(v.u.value), NULL)) { ok = JS_FALSE; - break; + goto brk; } + cont: + JS_POP_TEMP_ROOT(cx, &v); + continue; + brk: + JS_POP_TEMP_ROOT(cx, &v); + break; } if (!ok || !idap) JS_DestroyIdArray(cx, ida); @@ -738,13 +752,9 @@ valcnt = 0; if (prop) { - ok = OBJ_GET_ATTRIBUTES(cx, obj2, id, prop, &attrs); - if (!ok) { - OBJ_DROP_PROPERTY(cx, obj2, prop); - goto error; - } - if (OBJ_IS_NATIVE(obj2) && - (attrs & (JSPROP_GETTER | JSPROP_SETTER))) { + if (OBJ_IS_NATIVE(obj2)) { + JSScopeProperty *sprop = (JSScopeProperty *) prop; + attrs = sprop->attrs; if (attrs & JSPROP_GETTER) { val[valcnt] = (jsval) ((JSScopeProperty *)prop)->getter; gsopold[valcnt] = @@ -763,13 +773,18 @@ valcnt++; } + JS_UNLOCK_OBJ(cx, obj2); } else { + OBJ_DROP_PROPERTY(cx, obj2, prop); + } + if (!valcnt) { valcnt = 1; gsop[0] = NULL; gsopold[0] = NULL; ok = OBJ_GET_PROPERTY(cx, obj, id, &val[0]); + if (!ok) + goto error; } - OBJ_DROP_PROPERTY(cx, obj2, prop); } #else /* !JS_HAS_GETTER_SETTER */ @@ -784,12 +799,11 @@ gsop[0] = NULL; gsopold[0] = NULL; ok = OBJ_GET_PROPERTY(cx, obj, id, &val[0]); - -#endif /* !JS_HAS_GETTER_SETTER */ - if (!ok) goto error; +#endif /* !JS_HAS_GETTER_SETTER */ + /* * If id is a string that's not an identifier, then it needs to be * quoted. Also, negative integer ids must be quoted. @@ -3367,9 +3381,12 @@ } scope = OBJ_SCOPE(obj2); if (!MAP_IS_NATIVE(&scope->map)) { + JSTempValueRooter root; /* Whoops, newresolve handed back a foreign obj2. */ JS_ASSERT(obj2 != obj); + JS_PUSH_SINGLE_TEMP_ROOT(cx, obj2, &root); ok = OBJ_LOOKUP_PROPERTY(cx, obj2, id, objp, propp); + JS_POP_TEMP_ROOT(cx, &root); if (!ok || *propp) goto cleanup; JS_LOCK_OBJ(cx, obj2); @@ -3433,7 +3450,12 @@ if (!proto) break; if (!OBJ_IS_NATIVE(proto)) { - if (!OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp)) + JSTempValueRooter root; + JSBool rv; + JS_PUSH_SINGLE_TEMP_ROOT(cx, proto, &root); + rv = OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp); + JS_POP_TEMP_ROOT(cx, &root); + if (!rv) return -1; return protoIndex + 1; } @@ -5209,6 +5231,12 @@ return JS_FALSE; } +JS_FRIEND_API(void) +js_SetObjectWeakRoot(JSContext *cx, JSObject *obj) +{ + cx->weakRoots.newborn[GCX_OBJECT] = obj; +} + #ifdef DEBUG /* Routines to print out values during debugging. */ --- xulrunner-1.9.0.19.orig/js/src/jsopcode.c +++ xulrunner-1.9.0.19/js/src/jsopcode.c @@ -441,13 +441,18 @@ static ptrdiff_t SprintPut(Sprinter *sp, const char *s, size_t len) { - ptrdiff_t offset; - char *bp; + ptrdiff_t offset = sp->size; /* save old size */ + char *bp = sp->base; /* save old base */ /* Allocate space for s, including the '\0' at the end. */ if (!SprintEnsureBuffer(sp, len)) return -1; + if (sp->base != bp && /* buffer was realloc'ed */ + s >= bp && s < bp + offset) { /* s was within the buffer */ + s = sp->base + (s - bp); /* this is where it lives now */ + } + /* Advance offset and copy s into sp's buffer. */ offset = sp->offset; sp->offset += len; --- xulrunner-1.9.0.19.orig/js/src/xpconnect/idl/nsIXPConnect.idl +++ xulrunner-1.9.0.19/js/src/xpconnect/idl/nsIXPConnect.idl @@ -606,9 +606,9 @@ in JSObjectPtr aNewParent, in nsISupports aCOMObj); void - reparentScopeAwareWrappers(in JSContextPtr aJSContext, - in JSObjectPtr aOldScope, - in JSObjectPtr aNewScope); + moveWrappers(in JSContextPtr aJSContext, + in JSObjectPtr aOldScope, + in JSObjectPtr aNewScope); void clearAllWrappedNativeSecurityPolicies(); --- xulrunner-1.9.0.19.orig/js/src/xpconnect/shell/Makefile.in +++ xulrunner-1.9.0.19/js/src/xpconnect/shell/Makefile.in @@ -61,7 +61,9 @@ LIBS = \ $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(MOZ_JS_LIBS) \ + -Wl,--no-as-needed \ $(XPCOM_LIBS) \ + -Wl,--as-needed \ $(NSPR_LIBS) \ $(NULL) @@ -84,7 +86,7 @@ # look at mozilla/js/src/editline, which is license-free (but not part # of the mozilla build.) # -ifdef JS_READLINE +ifdef HAVE_READLINE DEFINES += -DEDITLINE -LIBS += -lreadline $(JS_READLINE_EXTRA_LIBS) +LIBS += $(READLINE_LIBS) endif --- xulrunner-1.9.0.19.orig/js/src/xpconnect/shell/xpcshell.cpp +++ xulrunner-1.9.0.19/js/src/xpconnect/shell/xpcshell.cpp @@ -575,13 +575,8 @@ } JSShellErrNum; JSErrorFormatString jsShell_ErrorFormatString[JSErr_Limit] = { -#if JS_HAS_DFLT_MSG_STRINGS #define MSG_DEF(name, number, count, exception, format) \ { format, count } , -#else -#define MSG_DEF(name, number, count, exception, format) \ - { NULL, count } , -#endif #include "jsshell.msg" #undef MSG_DEF }; @@ -597,8 +592,8 @@ #ifdef EDITLINE extern "C" { -extern char *readline(const char *prompt); -extern void add_history(char *line); +extern JS_EXPORT_API(char) *readline(const char *prompt); +extern JS_EXPORT_API(void) add_history(char *line); } #endif --- xulrunner-1.9.0.19.orig/js/src/xpconnect/src/xpcwrappednative.cpp +++ xulrunner-1.9.0.19/js/src/xpconnect/src/xpcwrappednative.cpp @@ -1299,7 +1299,7 @@ // Now we can just fix up the parent and return the wrapper - if(!JS_SetParent(ccx, wrapper->GetFlatJSObject(), aNewParent)) + if(aNewParent && !JS_SetParent(ccx, wrapper->GetFlatJSObject(), aNewParent)) { NS_RELEASE(wrapper); return NS_ERROR_FAILURE; --- xulrunner-1.9.0.19.orig/js/src/xpconnect/src/xpcwrappedjsclass.cpp +++ xulrunner-1.9.0.19/js/src/xpconnect/src/xpcwrappedjsclass.cpp @@ -263,6 +263,28 @@ jsid funid; jsval fun; + // Don't call the actual function on a content object. We'll determine + // whether or not a content object is capable of implementing the + // interface (i.e. whether the interface is scriptable) and most content + // objects don't have QI implementations anyway. Also see bug 503926. + if(!STOBJ_IS_SYSTEM(JS_GetGlobalForObject(ccx, jsobj))) + { + nsCOMPtr objprin; + nsIScriptSecurityManager *ssm = XPCWrapper::GetSecurityManager(); + if(ssm) + { + nsresult rv = ssm->GetObjectPrincipal(ccx, jsobj, getter_AddRefs(objprin)); + NS_ENSURE_SUCCESS(rv, nsnull); + + PRBool isSystem; + rv = ssm->IsSystemPrincipal(objprin, &isSystem); + NS_ENSURE_SUCCESS(rv, nsnull); + + if(!isSystem) + return nsnull; + } + } + // check upfront for the existence of the function property funid = mRuntime->GetStringID(XPCJSRuntime::IDX_QUERY_INTERFACE); if(!OBJ_GET_PROPERTY(cx, jsobj, funid, &fun) || JSVAL_IS_PRIMITIVE(fun)) @@ -1207,6 +1229,17 @@ xpcc->SetException(nsnull); ccx.GetThreadData()->SetException(nsnull); + if(XPCPerThreadData::IsMainThread(ccx)) + { + ssm = XPCWrapper::GetSecurityManager(); + if(ssm && !PushObjectPrincipal(cx, obj, ssm, &popPrincipal)) + { + JS_ReportOutOfMemory(cx); + retval = NS_ERROR_OUT_OF_MEMORY; + goto pre_call_clean_up; + } + } + // We use js_AllocStack, js_Invoke, and js_FreeStack so that the gcthings // we use as args will be rooted by the engine as we do conversions and // prepare to do the function call. This adds a fair amount of complexity, @@ -1548,17 +1581,6 @@ JS_ClearPendingException(cx); - if(XPCPerThreadData::IsMainThread(ccx)) - { - ssm = XPCWrapper::GetSecurityManager(); - if(ssm && !PushObjectPrincipal(cx, obj, ssm, &popPrincipal)) - { - JS_ReportOutOfMemory(cx); - retval = NS_ERROR_OUT_OF_MEMORY; - goto done; - } - } - if(XPT_MD_IS_GETTER(info->flags)) success = JS_GetProperty(cx, obj, name, &result); else if(XPT_MD_IS_SETTER(info->flags)) @@ -1595,9 +1617,6 @@ } } - if(popPrincipal) - ssm->PopContextPrincipal(ccx); - if(!success) { PRBool forceReport; @@ -1817,6 +1836,9 @@ if(sp) js_FreeStack(cx, mark); + if(popPrincipal) + ssm->PopContextPrincipal(ccx); + #ifdef DEBUG_stats_jband endTime = PR_IntervalNow(); printf("%s::%s %d ( c->js ) \n", GetInterfaceName(), info->GetName(), PR_IntervalToMilliseconds(endTime-startTime)); --- xulrunner-1.9.0.19.orig/js/src/xpconnect/src/nsXPConnect.cpp +++ xulrunner-1.9.0.19/js/src/xpconnect/src/nsXPConnect.cpp @@ -1523,11 +1523,11 @@ return JS_DHASH_NEXT; } -/* void reparentScopeAwareWrappers(in JSContextPtr aJSContext, in JSObjectPtr aOldScope, in JSObjectPtr aNewScope); */ +/* void moveWrappers(in JSContextPtr aJSContext, in JSObjectPtr aOldScope, in JSObjectPtr aNewScope); */ NS_IMETHODIMP -nsXPConnect::ReparentScopeAwareWrappers(JSContext *aJSContext, - JSObject *aOldScope, - JSObject *aNewScope) +nsXPConnect::MoveWrappers(JSContext *aJSContext, + JSObject *aOldScope, + JSObject *aNewScope) { XPCCallContext ccx(NATIVE_CALLER, aJSContext); if(!ccx.IsValid()) @@ -1585,35 +1585,41 @@ if(NS_FAILED(rv)) return NS_ERROR_FAILURE; + JSObject *newParent = aOldScope; + // If the wrapper doesn't want precreate, then we don't need to // worry about reparenting it. if(!sciWrapper.GetFlags().WantPreCreate()) continue; - JSObject *newParent = aOldScope; rv = sciWrapper.GetCallback()->PreCreate(identity, ccx, aOldScope, &newParent); if(NS_FAILED(rv)) return rv; - if(newParent != aOldScope) + if(newParent == aOldScope) { - // The wrapper returned a new parent. If the new parent is in - // a different scope, then we need to reparent it, otherwise, - // the old scope is fine. - - XPCWrappedNativeScope *betterScope = - XPCWrappedNativeScope::FindInJSObjectScope(ccx, newParent); - if(betterScope == oldScope) - continue; - - NS_ASSERTION(betterScope == newScope, "Weird scope returned"); + // The old scope still works for this wrapper. We have to assume + // that the wrapper will continue to return the old scope from + // PreCreate, so don't move it. + continue; } - else + + // The wrapper returned a new parent. If the new parent is in + // a different scope, then we need to reparent it, otherwise, + // the old scope is fine. + + XPCWrappedNativeScope *betterScope = + XPCWrappedNativeScope::FindInJSObjectScope(ccx, newParent); + if(betterScope == oldScope) { - // The old scope still works for this wrapper. - continue; + // The wrapper asked for a different object, but that object + // was in the same scope. We assume here that the new parent + // simply hasn't been reparented yet. + newParent = nsnull; } + else + NS_ASSERTION(betterScope == newScope, "Weird scope returned"); // Now, reparent the wrapper, since we know that it wants to be // reparented. --- xulrunner-1.9.0.19.orig/js/src/xpconnect/src/XPCSafeJSObjectWrapper.cpp +++ xulrunner-1.9.0.19/js/src/xpconnect/src/XPCSafeJSObjectWrapper.cpp @@ -410,13 +410,18 @@ return JS_FALSE; } + JSObject *scopeobj = JS_GetGlobalForObject(cx, unsafeObj); + OBJ_TO_INNER_OBJECT(cx, scopeobj); + if (!scopeobj) { + return JS_FALSE; + } + // If we either have no scripted function in the requested slot yet, // or if the scope of the unsafeObj changed since we compiled the // scripted function, re-compile to make sure the scripted function // is properly scoped etc. if (JSVAL_IS_VOID(*scriptedFunVal) || - JS_GetGlobalForObject(cx, unsafeObj) != - JS_GetGlobalForObject(cx, JSVAL_TO_OBJECT(*scriptedFunVal))) { + scopeobj != JS_GetGlobalForObject(cx, JSVAL_TO_OBJECT(*scriptedFunVal))) { // Check whether we have a cached principal or not. jsval pv; if (!::JS_GetReservedSlot(cx, obj, XPC_SJOW_SLOT_PRINCIPAL, &pv)) { @@ -443,8 +448,7 @@ JSFunction *scriptedFun = ::JS_CompileFunctionForPrincipals(cx, - JS_GetGlobalForObject(cx, unsafeObj), - jsprin, nsnull, 0, nsnull, + scopeobj, jsprin, nsnull, 0, nsnull, funScript.get(), funScript.Length(), "XPCSafeJSObjectWrapper.cpp", __LINE__); --- xulrunner-1.9.0.19.orig/js/src/liveconnect/nsCLiveconnect.cpp +++ xulrunner-1.9.0.19/js/src/liveconnect/nsCLiveconnect.cpp @@ -63,6 +63,8 @@ #include "nsISecurityContext.h" #include "nsIServiceManager.h" #include "nsIJSContextStack.h" +#include "nsJVMManager.h" +#include "nsIPluginInstancePeer2.h" PR_BEGIN_EXTERN_C @@ -220,6 +222,48 @@ JS_EndRequest(mContext); } +// nsILiveconnect methods (which constitute OJI's Java-to-JavaScript API) may +// call back into Java (using the OJI plugin's implementation of the +// nsISecureEnv interface). But these nsISecureEnv methods assume there is +// JavaScript on the stack, and Java code can call nsILiveconnect methods +// "spontaneously" (without any JavaScript on the stack). So the +// nsCLiveconnect methods below (those that implement the nsILiveconnect +// interface) always create an AutoPushJSContext object, which guarantees the +// presence on the JavaScript stack of at least a dummy frame with a principal. +// +// Ordinarily we rely on jsj_enter_js() to tell us which JSContext to pass to +// the AutoPushJSContext constructor, and really only need to create an +// AutoPushJSContext object after jsj_enter_js() has returned. But the first +// time jsj_enter_js() is called we initialize a bunch of Java classes and +// their methods and fields (in jsj.c's init_netscape_java_classes() and +// init_java_VM_reflection()). This involves calling into Java, and thus +// using the plugin's nsISecureEnv methods -- which assume there is JavaScript +// on the stack. +// +// So to deal with this edge case (to make sure jsj_enter_js() behaves +// properly the first time it's called) we need to create an AutoPushJSContext +// object *before* calling jsj_enter_js() -- which requires that we know which +// JSContex to pass to the AutoPushJSContext constructor before the call to +// jsj_enter_js(); +// +// That's what this function does -- it tells us which JSContext the call to +// jsj_enter_js() will return (as a result of indirectly calling +// map_jsj_thread_to_js_context_impl() in lcglue.cpp). +static JSContext* JSContextForPluginInstance(nsIPluginInstance* pluginInstance) +{ + JSContext* context = NULL; + if (pluginInstance) { + nsCOMPtr pluginPeer; + if (NS_SUCCEEDED(pluginInstance->GetPeer(getter_AddRefs(pluginPeer)))) { + nsresult rv; + nsCOMPtr pluginPeer2 = do_QueryInterface(pluginPeer, &rv); + if (NS_SUCCEEDED(rv)) { + pluginPeer2->GetJSContext(&context); + } + } + } + return context; +} //////////////////////////////////////////////////////////////////////////// // from nsISupports and AggregatedQueryInterface: @@ -266,13 +310,17 @@ JSBool dummy_bool = PR_FALSE; JSErrorReporter saved_state = NULL; - jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); - if (!jsj_env) + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) return NS_ERROR_FAILURE; AutoPushJSContext autopush(securitySupports, cx); if (NS_FAILED(autopush.ResultOfPush())) - goto done; + return NS_ERROR_FAILURE; + + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); + if (!jsj_env) + return NS_ERROR_FAILURE; if (!name) { JS_ReportError(cx, "illegal null member name"); @@ -324,14 +372,18 @@ JSBool dummy_bool = PR_FALSE; JSErrorReporter saved_state = NULL; + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) + return NS_ERROR_FAILURE; + + AutoPushJSContext autopush(securitySupports, cx); + if (NS_FAILED(autopush.ResultOfPush())) + return NS_ERROR_FAILURE; + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); if (!jsj_env) return NS_ERROR_FAILURE; - AutoPushJSContext autopush(securitySupports, cx); - if (NS_FAILED(autopush.ResultOfPush())) - goto done; - // =-= sudu: check to see if slot can be passed in as is. // Should it be converted to a jsint? if (!JS_GetElement(cx, js_obj, slot, &js_val)) @@ -374,14 +426,18 @@ jsval js_val; JSErrorReporter saved_state = NULL; - jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); - if (!jsj_env) + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) return NS_ERROR_FAILURE; AutoPushJSContext autopush(securitySupports, cx); if (NS_FAILED(autopush.ResultOfPush())) - goto done; - + return NS_ERROR_FAILURE; + + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); + if (!jsj_env) + return NS_ERROR_FAILURE; + if (!name) { JS_ReportError(cx, "illegal null member name"); goto done; @@ -424,14 +480,18 @@ jsval js_val; JSErrorReporter saved_state = NULL; - jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); - if (!jsj_env) + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) return NS_ERROR_FAILURE; AutoPushJSContext autopush(securitySupports, cx); if (NS_FAILED(autopush.ResultOfPush())) - goto done; - + return NS_ERROR_FAILURE; + + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); + if (!jsj_env) + return NS_ERROR_FAILURE; + if (!jsj_ConvertJavaObjectToJSValue(cx, jEnv, java_obj, &js_val)) goto done; JS_SetElement(cx, js_obj, slot, &js_val); @@ -465,14 +525,18 @@ jsval js_val; JSErrorReporter saved_state = NULL; - jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); - if (!jsj_env) + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) return NS_ERROR_FAILURE; AutoPushJSContext autopush(securitySupports, cx); if (NS_FAILED(autopush.ResultOfPush())) - goto done; - + return NS_ERROR_FAILURE; + + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); + if (!jsj_env) + return NS_ERROR_FAILURE; + if (!name) { JS_ReportError(cx, "illegal null member name"); goto done; @@ -519,15 +583,20 @@ JSErrorReporter saved_state = NULL; jobject result = NULL; + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) + return NS_ERROR_FAILURE; + + AutoPushJSContext autopush(securitySupports, cx); + if (NS_FAILED(autopush.ResultOfPush())) + return NS_ERROR_FAILURE; + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); if (!jsj_env) return NS_ERROR_FAILURE; result = NULL; - AutoPushJSContext autopush(securitySupports, cx); - if (NS_FAILED(autopush.ResultOfPush())) - goto done; - + if (!name) { JS_ReportError(cx, "illegal null JavaScript function name"); goto done; @@ -601,15 +670,20 @@ JSPrincipals *principals = NULL; JSBool eval_succeeded = PR_FALSE; + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) + return NS_ERROR_FAILURE; + + AutoPushJSContext autopush(securitySupports, cx); + if (NS_FAILED(autopush.ResultOfPush())) + return NS_ERROR_FAILURE; + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); if (!jsj_env) return NS_ERROR_FAILURE; result = NULL; - AutoPushJSContext autopush(securitySupports, cx); - if (NS_FAILED(autopush.ResultOfPush())) - goto done; - + if (!script) { JS_ReportError(cx, "illegal null string eval argument"); goto done; @@ -672,15 +746,20 @@ JSJavaThreadState *jsj_env = NULL; JSObjectHandle *handle = NULL; + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) + return NS_ERROR_FAILURE; + + AutoPushJSContext autopush(securitySupports, cx); + if (NS_FAILED(autopush.ResultOfPush())) + return NS_ERROR_FAILURE; + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports); if (!jsj_env) return NS_ERROR_FAILURE; err_msg = NULL; - AutoPushJSContext autopush(securitySupports, cx); - if (NS_FAILED(autopush.ResultOfPush())) - goto done; - + js_obj = JSJ_callbacks->map_java_object_to_js_object(jEnv, mJavaClient, &err_msg); if (!js_obj) { if (err_msg) { @@ -753,14 +832,19 @@ jstring result = NULL; JSString *jsstr = NULL; + cx = JSContextForPluginInstance(reinterpret_cast(mJavaClient)); + if (!cx) + return NS_ERROR_FAILURE; + + AutoPushJSContext autopush(nsnull, cx); + if (NS_FAILED(autopush.ResultOfPush())) + return NS_ERROR_FAILURE; + jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, NULL, 0, NULL ); if (!jsj_env) return NS_ERROR_FAILURE; result = NULL; - AutoPushJSContext autopush(nsnull, cx); - if (NS_FAILED(autopush.ResultOfPush())) - return NS_ERROR_FAILURE; jsstr = JS_ValueToString(cx, OBJECT_TO_JSVAL(js_obj)); if (jsstr) --- xulrunner-1.9.0.19.orig/js/src/liveconnect/jsj_JavaArray.c +++ xulrunner-1.9.0.19/js/src/liveconnect/jsj_JavaArray.c @@ -254,6 +254,7 @@ if (access_java_array_element(cx, jEnv, obj, id, NULL, JS_FALSE)) { *objp = obj; *propp = (JSProperty*)1; + js_SetObjectWeakRoot(cx, obj); } else { *objp = NULL; *propp = NULL; --- xulrunner-1.9.0.19.orig/js/src/liveconnect/jsj_JavaClass.c +++ xulrunner-1.9.0.19/js/src/liveconnect/jsj_JavaClass.c @@ -321,6 +321,7 @@ if (lookup_static_member_by_id(cx, jEnv, obj, NULL, id, NULL)) { *objp = obj; *propp = (JSProperty*)1; + js_SetObjectWeakRoot(cx, obj); } else { *objp = NULL; *propp = NULL; --- xulrunner-1.9.0.19.orig/js/src/liveconnect/jsj_JavaObject.c +++ xulrunner-1.9.0.19/js/src/liveconnect/jsj_JavaObject.c @@ -841,6 +841,7 @@ *objp = obj; *propp = (JSProperty*)1; } + js_SetObjectWeakRoot(cx, *objp); } else { *objp = NULL; *propp = NULL; --- xulrunner-1.9.0.19.orig/js/src/liveconnect/Makefile.in +++ xulrunner-1.9.0.19/js/src/liveconnect/Makefile.in @@ -63,6 +63,8 @@ caps \ necko \ string \ + plugin \ + oji \ $(NULL) CSRCS = \ --- xulrunner-1.9.0.19.orig/js/tests/e4x/Regress/regress-561031.js +++ xulrunner-1.9.0.19/js/tests/e4x/Regress/regress-561031.js @@ -0,0 +1,1830 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributor: Gary Kwong + */ + +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try {} catch(e) {} +try { + if (2 == 0) { } else { [].(0); } +} catch (e) {} +reportCompare(0, 0, "ok"); --- xulrunner-1.9.0.19.orig/content/xslt/crashtests/545927.html +++ xulrunner-1.9.0.19/content/xslt/crashtests/545927.html @@ -0,0 +1,28 @@ + + + + + + + + --- xulrunner-1.9.0.19.orig/content/xslt/crashtests/crashtests.list +++ xulrunner-1.9.0.19/content/xslt/crashtests/crashtests.list @@ -3,3 +3,4 @@ load 485286.xml load 528300.xml load 528488.xml +load 545927.html --- xulrunner-1.9.0.19.orig/content/xslt/src/xslt/txXSLTNumberCounters.cpp +++ xulrunner-1.9.0.19/content/xslt/src/xslt/txXSLTNumberCounters.cpp @@ -220,8 +220,8 @@ void txRomanCounter::appendNumber(PRInt32 aNumber, nsAString& aDest) { - // Numbers bigger then 3999 can't be done in roman - if (aNumber >= 4000) { + // Numbers bigger then 3999 and negative numbers can't be done in roman + if (PRUint32(aNumber) >= 4000) { txDecimalCounter().appendNumber(aNumber, aDest); return; } --- xulrunner-1.9.0.19.orig/content/xslt/src/xslt/txNodeSorter.cpp +++ xulrunner-1.9.0.19/content/xslt/src/xslt/txNodeSorter.cpp @@ -178,7 +178,15 @@ // Create and set up memoryblock for sort-values and indexarray PRUint32 len = static_cast(aNodes->size()); - void* mem = PR_Malloc(len * (sizeof(PRUint32) + mNKeys * sizeof(TxObject*))); + + // Don't overflow when calculating the length of the sort buffer. + PRUint32 itemSize = sizeof(PRUint32) + mNKeys * sizeof(TxObject*); + if (mNKeys > (PR_UINT32_MAX - sizeof(PRUint32)) / sizeof(TxObject*) || + len >= PR_UINT32_MAX / itemSize) { + return NS_ERROR_OUT_OF_MEMORY; + } + + void* mem = PR_Malloc(len * itemSize); NS_ENSURE_TRUE(mem, NS_ERROR_OUT_OF_MEMORY); PRUint32* indexes = static_cast(mem); --- xulrunner-1.9.0.19.orig/content/svg/content/src/nsSVGPathElement.cpp +++ xulrunner-1.9.0.19/content/svg/content/src/nsSVGPathElement.cpp @@ -959,9 +959,11 @@ if (aMarks->Length()) aMarks->ElementAt(aMarks->Length() - 1).angle = prevAngle; } else { - aMarks->ElementAt(aMarks->Length() - 1).angle = - nsSVGUtils::AngleBisect(prevAngle, startAngle); - prevAngle = endAngle; + if (aMarks->Length()) { + aMarks->ElementAt(aMarks->Length() - 1).angle = + nsSVGUtils::AngleBisect(prevAngle, startAngle); + prevAngle = endAngle; + } } aMarks->AppendElement(nsSVGMark(x, y, 0)); --- xulrunner-1.9.0.19.orig/content/base/public/nsIContentUtils.h +++ xulrunner-1.9.0.19/content/base/public/nsIContentUtils.h @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * 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 ***** */ +#ifndef nsIContentUtils_h__ +#define nsIContentUtils_h__ + +// C4EA618E-A3D9-4524-8EEA-E92F26FC44DB +#define NS_ICONTENTUTILS_IID \ +{ 0xC4EA618E, 0xA3D9, 0x4524, \ + { 0x8E, 0xEA, 0xE9, 0x2F, 0x26, 0xFC, 0x44, 0xDB } } + +class nsIContentUtils : public nsISupports +{ +public: + NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTUTILS_IID) + NS_DECL_ISUPPORTS + + virtual PRBool IsSafeToRunScript(); +}; + +NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentUtils, NS_ICONTENTUTILS_IID) + +#endif /* nsIContentUtils_h__ */ --- xulrunner-1.9.0.19.orig/content/base/public/nsIContentPolicy.idl +++ xulrunner-1.9.0.19/content/base/public/nsIContentPolicy.idl @@ -112,7 +112,7 @@ const unsigned long TYPE_PING = 10; /** - * Indicates an XMLHttpRequest. + * Indicates an XMLHttpRequest. Also used for document.load. */ const unsigned long TYPE_XMLHTTPREQUEST = 11; --- xulrunner-1.9.0.19.orig/content/base/public/nsContentUtils.h +++ xulrunner-1.9.0.19/content/base/public/nsContentUtils.h @@ -1134,6 +1134,11 @@ nsISupports* aExtra = nsnull); /** + * Returns true if aPrincipal is the system principal. + */ + static PRBool IsSystemPrincipal(nsIPrincipal* aPrincipal); + + /** * Trigger a link with uri aLinkURI. If aClick is false, this triggers a * mouseover on the link, otherwise it triggers a load after doing a * security check using aContent's principal. --- xulrunner-1.9.0.19.orig/content/base/public/Makefile.in +++ xulrunner-1.9.0.19/content/base/public/Makefile.in @@ -53,6 +53,7 @@ nsContentErrors.h \ nsContentPolicyUtils.h \ nsContentUtils.h \ +nsIContentUtils.h \ nsIDocument.h \ nsIDocumentObserver.h \ nsIMutationObserver.h \ --- xulrunner-1.9.0.19.orig/content/base/public/nsContentCID.h +++ xulrunner-1.9.0.19/content/base/public/nsContentCID.h @@ -219,6 +219,10 @@ #define NS_HTMLPARANOIDFRAGMENTSINK_CID \ { 0xa47e9526, 0x6e48, 0x4574, { 0x9d, 0x6c, 0x31, 0x64, 0xe2, 0x71, 0xf7, 0x4e } } +// {A47EF526-6E48-4574-9D60-3164E271F75E} +#define NS_HTMLPARANOIDFRAGMENTSINK2_CID \ +{ 0xa47ef526, 0x6e48, 0x4574, { 0x9d, 0x60, 0x31, 0x64, 0xe2, 0x71, 0xf7, 0x5e } } + // {4B664E54-72A2-4bbf-A5C2-66D4DC3066A0} #define NS_XMLFRAGMENTSINK_CID \ { 0x4b664e54, 0x72a2, 0x4bbf, { 0xa5, 0xc2, 0x66, 0xd4, 0xdc, 0x30, 0x66, 0xa0 } } @@ -231,6 +235,10 @@ #define NS_XHTMLPARANOIDFRAGMENTSINK_CID \ { 0x2d78bbf0, 0xe26c, 0x482b, { 0x92, 0xb3, 0x78, 0xa7, 0xb2, 0xaf, 0xc8, 0xf7} } +// {AD78BBF0-E261-482B-32B3-78A7B2AFC8F7} +#define NS_XHTMLPARANOIDFRAGMENTSINK2_CID \ +{ 0xad78bbf0, 0xe261, 0x482b, { 0x32, 0xb3, 0x78, 0xa7, 0xb2, 0xaf, 0xc8, 0xf7} } + // {3986B301-097C-11d3-BF87-00105A1B0627} #define NS_XULPOPUPLISTENER_CID \ { 0x3986b301, 0x97c, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } --- xulrunner-1.9.0.19.orig/content/base/test/test_bug461735.html +++ xulrunner-1.9.0.19/content/base/test/test_bug461735.html @@ -17,21 +17,31 @@
     
     
    +
     
     
    +
     
    --- xulrunner-1.9.0.19.orig/content/base/src/nsNodeUtils.cpp +++ xulrunner-1.9.0.19/content/base/src/nsNodeUtils.cpp @@ -237,8 +237,22 @@ if (aNode->IsNodeOfType(nsINode::eELEMENT)) { nsIDocument* ownerDoc = aNode->GetOwnerDoc(); + nsIContent* cont = static_cast(aNode); if (ownerDoc) { - ownerDoc->ClearBoxObjectFor(static_cast(aNode)); + ownerDoc->ClearBoxObjectFor(cont); + } + + NS_ASSERTION(aNode->HasFlag(NODE_FORCE_XBL_BINDINGS) || + !ownerDoc || + !ownerDoc->BindingManager() || + !ownerDoc->BindingManager()->GetBinding(cont), + "Non-forced node has binding on destruction"); + + // if NODE_FORCE_XBL_BINDINGS is set, the node might still have a binding + // attached + if (aNode->HasFlag(NODE_FORCE_XBL_BINDINGS) && + ownerDoc && ownerDoc->BindingManager()) { + ownerDoc->BindingManager()->ChangeDocumentFor(cont, ownerDoc, nsnull); } } --- xulrunner-1.9.0.19.orig/content/base/src/nsGenericElement.cpp +++ xulrunner-1.9.0.19/content/base/src/nsGenericElement.cpp @@ -2714,15 +2714,15 @@ } } - PRUint32 childCount = aChildArray.ChildCount(); - NS_ENSURE_TRUE(aIndex <= childCount, NS_ERROR_ILLEGAL_VALUE); - nsMutationGuard::DidMutate(); - PRBool isAppend = (aIndex == childCount); - + // Do this before checking the child-count since this could cause mutations mozAutoDocUpdate updateBatch(aDocument, UPDATE_CONTENT_MODEL, aNotify); + PRUint32 childCount = aChildArray.ChildCount(); + NS_ENSURE_TRUE(aIndex <= childCount, NS_ERROR_ILLEGAL_VALUE); + PRBool isAppend = (aIndex == childCount); + rv = aChildArray.InsertChildAt(aKid, aIndex); NS_ENSURE_SUCCESS(rv, rv); @@ -3194,6 +3194,8 @@ nsINode* container = NODE_FROM(aParent, aDocument); + mozAutoDocConditionalContentUpdateBatch batch(aDocument, PR_TRUE); + // Figure out which index to insert at if (aRefChild) { refContent = do_QueryInterface(aRefChild); @@ -3243,11 +3245,6 @@ } } - // We want an update batch when we expect several mutations to be performed, - // which is when we're replacing a node, or when we're inserting a fragment. - mozAutoDocConditionalContentUpdateBatch(aDocument, - aReplace || nodeType == nsIDOMNode::DOCUMENT_FRAGMENT_NODE); - // If we're replacing if (aReplace) { // Getting (and addrefing) the following child here is sort of wasteful --- xulrunner-1.9.0.19.orig/content/base/src/nsDOMAttribute.cpp +++ xulrunner-1.9.0.19/content/base/src/nsDOMAttribute.cpp @@ -789,7 +789,7 @@ aHasChild = !value.IsEmpty(); if (aSetText && aHasChild) { - mChild->SetText(value, PR_TRUE); + mChild->SetText(value, PR_FALSE); } return NS_OK; --- xulrunner-1.9.0.19.orig/content/base/src/nsDocument.cpp +++ xulrunner-1.9.0.19/content/base/src/nsDocument.cpp @@ -4253,13 +4253,9 @@ NS_IMETHODIMP nsDocument::Normalize() { - PRInt32 count = mChildren.ChildCount(); - for (PRInt32 i = 0; i < count; ++i) { + for (PRInt32 i = 0; i < mChildren.ChildCount(); ++i) { nsCOMPtr node(do_QueryInterface(mChildren.ChildAt(i))); - - if (node) { - node->Normalize(); - } + node->Normalize(); } return NS_OK; @@ -5718,11 +5714,30 @@ } void +nsDocument::AsyncBlockOnload() +{ + while (mAsyncOnloadBlockCount) { + --mAsyncOnloadBlockCount; + BlockOnload(); + } +} + +void nsDocument::BlockOnload() { // If mScriptGlobalObject is null, we shouldn't be messing with the loadgroup // -- it's not ours. if (mOnloadBlockCount == 0 && mScriptGlobalObject) { + if (!nsContentUtils::IsSafeToRunScript()) { + // Because AddRequest may lead to OnStateChange calls in chrome, + // block onload only when there are no script blockers. + ++mAsyncOnloadBlockCount; + if (mAsyncOnloadBlockCount == 1) { + nsContentUtils::AddScriptRunner( + NS_NEW_RUNNABLE_METHOD(nsDocument, this, AsyncBlockOnload)); + } + return; + } nsCOMPtr loadGroup = GetDocumentLoadGroup(); if (loadGroup) { loadGroup->AddRequest(mOnloadBlocker, nsnull); @@ -5734,7 +5749,7 @@ void nsDocument::UnblockOnload(PRBool aFireSync) { - if (mOnloadBlockCount == 0) { + if (mOnloadBlockCount == 0 && mAsyncOnloadBlockCount == 0) { NS_NOTREACHED("More UnblockOnload() calls than BlockOnload() calls; dropping call"); return; } @@ -5744,7 +5759,7 @@ // If mScriptGlobalObject is null, we shouldn't be messing with the loadgroup // -- it's not ours. if (mOnloadBlockCount == 0 && mScriptGlobalObject) { - if (aFireSync) { + if (aFireSync && mAsyncOnloadBlockCount == 0) { // Increment mOnloadBlockCount, since DoUnblockOnload will decrement it ++mOnloadBlockCount; DoUnblockOnload(); @@ -5793,6 +5808,11 @@ return; } + if (mAsyncOnloadBlockCount != 0) { + // We need to wait until the async onload block has been handled. + PostUnblockOnloadEvent(); + } + // If mScriptGlobalObject is null, we shouldn't be messing with the loadgroup // -- it's not ours. if (mScriptGlobalObject) { --- xulrunner-1.9.0.19.orig/content/base/src/nsGenericDOMDataNode.cpp +++ xulrunner-1.9.0.19/content/base/src/nsGenericDOMDataNode.cpp @@ -354,8 +354,7 @@ { aReturn.Truncate(); - // XXX add <0 checks if types change - PRUint32 textLength = PRUint32( mText.GetLength() ); + PRUint32 textLength = mText.GetLength(); if (aStart > textLength) { return NS_ERROR_DOM_INDEX_SIZE_ERR; } @@ -423,6 +422,20 @@ return NS_ERROR_DOM_INDEX_SIZE_ERR; } + if (aCount > textLength - aOffset) { + aCount = textLength - aOffset; + } + + PRUint32 endOffset = aOffset + aCount; + + // Make sure the text fragment can hold the new data. + if (aLength > aCount && !mText.CanGrowBy(aLength - aCount)) { + // This exception isn't per spec, but the spec doesn't actually + // say what to do here. + + return NS_ERROR_DOM_DOMSTRING_SIZE_ERR; + } + nsIDocument *document = GetCurrentDoc(); mozAutoDocUpdate updateBatch(document, UPDATE_CONTENT_MODEL, aNotify); @@ -436,12 +449,6 @@ oldValue = GetCurrentValueAtom(); } - PRUint32 endOffset = aOffset + aCount; - if (endOffset > textLength) { - aCount = textLength - aOffset; - endOffset = textLength; - } - if (aNotify) { CharacterDataChangeInfo info = { aOffset == textLength, @@ -469,10 +476,10 @@ NS_ENSURE_TRUE(to, NS_ERROR_OUT_OF_MEMORY); // Copy over appropriate data - if (0 != aOffset) { + if (aOffset) { mText.CopyTo(to, 0, aOffset); } - if (0 != aLength) { + if (aLength) { memcpy(to + aOffset, aBuffer, aLength * sizeof(PRUnichar)); } if (endOffset != textLength) { --- xulrunner-1.9.0.19.orig/content/base/src/nsDocument.h +++ xulrunner-1.9.0.19/content/base/src/nsDocument.h @@ -676,6 +676,9 @@ virtual nsISupports* GetCurrentContentSink(); + // Only BlockOnload should call this! + void AsyncBlockOnload(); + protected: /** @@ -860,7 +863,10 @@ // 2) We haven't had Destroy() called on us yet. nsCOMPtr mLayoutHistoryState; + // Currently active onload blockers PRUint32 mOnloadBlockCount; + // Onload blockers which haven't been activated yet + PRUint32 mAsyncOnloadBlockCount; nsCOMPtr mOnloadBlocker; // A map from unvisited URI hashes to content elements --- xulrunner-1.9.0.19.orig/content/base/src/nsObjectLoadingContent.cpp +++ xulrunner-1.9.0.19/content/base/src/nsObjectLoadingContent.cpp @@ -417,7 +417,11 @@ // end up trying to dispatch to a nsFrameLoader, which will complain that // it couldn't find a way to handle application/octet-stream - chan->SetContentType(mContentType); + nsCAutoString typeHint, dummy; + NS_ParseContentType(mContentType, typeHint, dummy); + if (!typeHint.IsEmpty()) { + chan->SetContentType(typeHint); + } } else { mContentType = channelType; } @@ -1292,7 +1296,11 @@ // MIME Type hint if (!aTypeHint.IsEmpty()) { - chan->SetContentType(aTypeHint); + nsCAutoString typeHint, dummy; + NS_ParseContentType(aTypeHint, typeHint, dummy); + if (!typeHint.IsEmpty()) { + chan->SetContentType(typeHint); + } } // Set up the channel's principal and such, like nsDocShell::DoURILoad does --- xulrunner-1.9.0.19.orig/content/base/src/nsContentUtils.cpp +++ xulrunner-1.9.0.19/content/base/src/nsContentUtils.cpp @@ -56,6 +56,7 @@ #include "nsIDOMScriptObjectFactory.h" #include "nsDOMCID.h" #include "nsContentUtils.h" +#include "nsIContentUtils.h" #include "nsIXPConnect.h" #include "nsIContent.h" #include "nsIDocument.h" @@ -1201,7 +1202,7 @@ return NS_ERROR_NOT_AVAILABLE; } - return sXPConnect->ReparentScopeAwareWrappers(cx, oldScopeObj, newScopeObj); + return sXPConnect->MoveWrappers(cx, oldScopeObj, newScopeObj); } nsIDocShell * @@ -3937,6 +3938,14 @@ return aLoadingPrincipal->CheckMayLoad(aURIToLoad, PR_TRUE); } +PRBool +nsContentUtils::IsSystemPrincipal(nsIPrincipal* aPrincipal) +{ + PRBool isSystem; + nsresult rv = sSecurityManager->IsSystemPrincipal(aPrincipal, &isSystem); + return NS_SUCCEEDED(rv) && isSystem; +} + /* static */ void nsContentUtils::TriggerLink(nsIContent *aContent, nsPresContext *aPresContext, @@ -4264,6 +4273,13 @@ } } +NS_IMPL_ISUPPORTS1(nsIContentUtils, nsIContentUtils) + +PRBool +nsIContentUtils::IsSafeToRunScript() +{ + return nsContentUtils::IsSafeToRunScript(); +} /* static */ PRBool --- xulrunner-1.9.0.19.orig/content/base/src/nsContentSink.cpp +++ xulrunner-1.9.0.19/content/base/src/nsContentSink.cpp @@ -1529,20 +1529,26 @@ &nsGkAtoms::acronym, &nsGkAtoms::address, &nsGkAtoms::area, + &nsGkAtoms::article, + &nsGkAtoms::aside, &nsGkAtoms::b, &nsGkAtoms::bdo, &nsGkAtoms::big, &nsGkAtoms::blockquote, &nsGkAtoms::br, &nsGkAtoms::button, + &nsGkAtoms::canvas, &nsGkAtoms::caption, &nsGkAtoms::center, &nsGkAtoms::cite, &nsGkAtoms::code, &nsGkAtoms::col, &nsGkAtoms::colgroup, + &nsGkAtoms::command, + &nsGkAtoms::datalist, &nsGkAtoms::dd, &nsGkAtoms::del, + &nsGkAtoms::details, &nsGkAtoms::dfn, &nsGkAtoms::dir, &nsGkAtoms::div, @@ -1550,7 +1556,10 @@ &nsGkAtoms::dt, &nsGkAtoms::em, &nsGkAtoms::fieldset, + &nsGkAtoms::figcaption, + &nsGkAtoms::figure, &nsGkAtoms::font, + &nsGkAtoms::footer, &nsGkAtoms::form, &nsGkAtoms::h1, &nsGkAtoms::h2, @@ -1558,6 +1567,8 @@ &nsGkAtoms::h4, &nsGkAtoms::h5, &nsGkAtoms::h6, + &nsGkAtoms::header, + &nsGkAtoms::hgroup, &nsGkAtoms::hr, &nsGkAtoms::i, &nsGkAtoms::img, @@ -1569,22 +1580,32 @@ &nsGkAtoms::li, &nsGkAtoms::listing, &nsGkAtoms::map, + &nsGkAtoms::mark, &nsGkAtoms::menu, + &nsGkAtoms::meter, + &nsGkAtoms::nav, &nsGkAtoms::nobr, + &nsGkAtoms::noscript, &nsGkAtoms::ol, &nsGkAtoms::optgroup, &nsGkAtoms::option, + &nsGkAtoms::output, &nsGkAtoms::p, &nsGkAtoms::pre, &nsGkAtoms::q, + &nsGkAtoms::rp, + &nsGkAtoms::rt, + &nsGkAtoms::ruby, &nsGkAtoms::s, &nsGkAtoms::samp, + &nsGkAtoms::section, &nsGkAtoms::select, &nsGkAtoms::small, &nsGkAtoms::span, &nsGkAtoms::strike, &nsGkAtoms::strong, &nsGkAtoms::sub, + &nsGkAtoms::summary, &nsGkAtoms::sup, &nsGkAtoms::table, &nsGkAtoms::tbody, @@ -1593,11 +1614,14 @@ &nsGkAtoms::tfoot, &nsGkAtoms::th, &nsGkAtoms::thead, + &nsGkAtoms::time, &nsGkAtoms::tr, + &nsGkAtoms::track, &nsGkAtoms::tt, &nsGkAtoms::u, &nsGkAtoms::ul, &nsGkAtoms::var, + &nsGkAtoms::wbr, nsnull }; @@ -1610,6 +1634,7 @@ &nsGkAtoms::align, &nsGkAtoms::alt, &nsGkAtoms::autocomplete, + &nsGkAtoms::autofocus, &nsGkAtoms::axis, &nsGkAtoms::background, &nsGkAtoms::bgcolor, @@ -1627,46 +1652,74 @@ &nsGkAtoms::colspan, &nsGkAtoms::color, &nsGkAtoms::compact, + &nsGkAtoms::contenteditable, + &nsGkAtoms::contextmenu, &nsGkAtoms::coords, &nsGkAtoms::datetime, &nsGkAtoms::dir, &nsGkAtoms::disabled, &nsGkAtoms::enctype, + &nsGkAtoms::face, &nsGkAtoms::_for, &nsGkAtoms::frame, &nsGkAtoms::headers, &nsGkAtoms::height, + &nsGkAtoms::hidden, + &nsGkAtoms::high, &nsGkAtoms::href, &nsGkAtoms::hreflang, &nsGkAtoms::hspace, + &nsGkAtoms::icon, &nsGkAtoms::id, &nsGkAtoms::ismap, + &nsGkAtoms::itemid, + &nsGkAtoms::itemprop, + &nsGkAtoms::itemref, + &nsGkAtoms::itemscope, + &nsGkAtoms::itemtype, + &nsGkAtoms::kind, &nsGkAtoms::label, &nsGkAtoms::lang, + &nsGkAtoms::list, &nsGkAtoms::longdesc, &nsGkAtoms::maxlength, + &nsGkAtoms::low, + &nsGkAtoms::max, &nsGkAtoms::media, + &nsGkAtoms::min, &nsGkAtoms::method, &nsGkAtoms::multiple, &nsGkAtoms::name, &nsGkAtoms::nohref, &nsGkAtoms::noshade, + &nsGkAtoms::novalidate, &nsGkAtoms::nowrap, + &nsGkAtoms::open, + &nsGkAtoms::optimum, + &nsGkAtoms::pattern, + &nsGkAtoms::placeholder, &nsGkAtoms::pointSize, &nsGkAtoms::prompt, + &nsGkAtoms::pubdate, + &nsGkAtoms::radiogroup, &nsGkAtoms::readonly, &nsGkAtoms::rel, + &nsGkAtoms::required, &nsGkAtoms::rev, + &nsGkAtoms::reversed, &nsGkAtoms::role, &nsGkAtoms::rows, &nsGkAtoms::rowspan, &nsGkAtoms::rules, &nsGkAtoms::scope, + &nsGkAtoms::scoped, &nsGkAtoms::selected, &nsGkAtoms::shape, &nsGkAtoms::size, &nsGkAtoms::span, + &nsGkAtoms::spellcheck, &nsGkAtoms::src, + &nsGkAtoms::srclang, &nsGkAtoms::start, &nsGkAtoms::summary, &nsGkAtoms::tabindex, @@ -1678,5 +1731,6 @@ &nsGkAtoms::value, &nsGkAtoms::vspace, &nsGkAtoms::width, + &nsGkAtoms::wrap, nsnull }; --- xulrunner-1.9.0.19.orig/content/base/src/nsGkAtomList.h +++ xulrunner-1.9.0.19/content/base/src/nsGkAtomList.h @@ -103,6 +103,8 @@ GK_ATOM(applyTemplates, "apply-templates") GK_ATOM(archive, "archive") GK_ATOM(area, "area") +GK_ATOM(article, "article") +GK_ATOM(aside, "aside") GK_ATOM(ascending, "ascending") GK_ATOM(assign, "assign") GK_ATOM(attribute, "attribute") @@ -111,6 +113,7 @@ GK_ATOM(_auto, "auto") GK_ATOM(autocheck, "autocheck") GK_ATOM(autocomplete, "autocomplete") +GK_ATOM(autofocus, "autofocus") GK_ATOM(autorepeatbutton, "autorepeatbutton") GK_ATOM(axis, "axis") GK_ATOM(b, "b") @@ -236,6 +239,7 @@ GK_ATOM(current, "current") GK_ATOM(cycler, "cycler") GK_ATOM(data, "data") +GK_ATOM(datalist, "datalist") GK_ATOM(dataType, "data-type") GK_ATOM(datasources, "datasources") GK_ATOM(datetime, "datetime") @@ -261,6 +265,7 @@ GK_ATOM(descending, "descending") GK_ATOM(description, "description") GK_ATOM(destructor, "destructor") +GK_ATOM(details, "details") GK_ATOM(dfn, "dfn") GK_ATOM(dialog, "dialog") GK_ATOM(difference, "difference") @@ -332,6 +337,8 @@ GK_ATOM(farthest, "farthest") GK_ATOM(field, "field") GK_ATOM(fieldset, "fieldset") +GK_ATOM(figcaption, "figcaption") +GK_ATOM(figure, "figure") GK_ATOM(fixed, "fixed") GK_ATOM(fixedList, "Fixed-list") GK_ATOM(flags, "flags") @@ -345,6 +352,7 @@ GK_ATOM(font, "font") GK_ATOM(fontWeight, "font-weight") GK_ATOM(fontpicker, "fontpicker") +GK_ATOM(footer, "footer") GK_ATOM(_for, "for") GK_ATOM(forEach, "for-each") GK_ATOM(form, "form") @@ -378,10 +386,13 @@ GK_ATOM(hasSameNode, "has-same-node") GK_ATOM(hbox, "hbox") GK_ATOM(head, "head") +GK_ATOM(header, "header") GK_ATOM(headers, "headers") GK_ATOM(height, "height") +GK_ATOM(hgroup, "hgroup") GK_ATOM(hidden, "hidden") GK_ATOM(hidechrome, "hidechrome") +GK_ATOM(high, "high") GK_ATOM(highest, "highest") GK_ATOM(horizontal, "horizontal") GK_ATOM(hover, "hover") @@ -394,6 +405,7 @@ GK_ATOM(htmlBaseTarget, "html-base-target") GK_ATOM(httpEquiv, "http-equiv") GK_ATOM(i, "i") +GK_ATOM(icon, "icon") GK_ATOM(id, "id") GK_ATOM(_if, "if") GK_ATOM(iframe, "iframe") @@ -430,6 +442,11 @@ GK_ATOM(isempty, "isempty") GK_ATOM(isindex, "isindex") GK_ATOM(ismap, "ismap") +GK_ATOM(itemid, "itemid") +GK_ATOM(itemprop, "itemprop") +GK_ATOM(itemref, "itemref") +GK_ATOM(itemscope, "itemscope") +GK_ATOM(itemtype, "itemtype") GK_ATOM(kbd, "kbd") GK_ATOM(noautofocus, "noautofocus") GK_ATOM(key, "key") @@ -439,6 +456,7 @@ GK_ATOM(keyset, "keyset") GK_ATOM(keytext, "keytext") GK_ATOM(keyup, "keyup") +GK_ATOM(kind, "kind") GK_ATOM(label, "label") GK_ATOM(lang, "lang") GK_ATOM(last, "last") @@ -456,6 +474,7 @@ GK_ATOM(li, "li") GK_ATOM(line, "line") GK_ATOM(link, "link") +GK_ATOM(list, "list") GK_ATOM(listbox, "listbox") GK_ATOM(listboxbody, "listboxbody") GK_ATOM(listcell, "listcell") @@ -470,6 +489,7 @@ GK_ATOM(load, "load") GK_ATOM(localName, "local-name") GK_ATOM(longdesc, "longdesc") +GK_ATOM(low, "low") GK_ATOM(lowerFirst, "lower-first") GK_ATOM(lowest, "lowest") GK_ATOM(lowsrc, "lowsrc") @@ -478,6 +498,7 @@ GK_ATOM(manifest, "manifest") GK_ATOM(marginheight, "marginheight") GK_ATOM(marginwidth, "marginwidth") +GK_ATOM(mark, "mark") GK_ATOM(marquee, "marquee") GK_ATOM(match, "match") GK_ATOM(max, "max") @@ -498,6 +519,7 @@ GK_ATOM(menupopup, "menupopup") GK_ATOM(message, "message") GK_ATOM(meta, "meta") +GK_ATOM(meter, "meter") GK_ATOM(method, "method") GK_ATOM(middle, "middle") GK_ATOM(min, "min") @@ -522,6 +544,7 @@ GK_ATOM(namespaceAlias, "namespace-alias") GK_ATOM(namespaceUri, "namespace-uri") GK_ATOM(NaN, "NaN") +GK_ATOM(nav, "nav") GK_ATOM(negate, "negate") GK_ATOM(never, "never") GK_ATOM(_new, "new") @@ -541,6 +564,7 @@ GK_ATOM(noscript, "noscript") GK_ATOM(noshade, "noshade") GK_ATOM(_not, "not") +GK_ATOM(novalidate, "novalidate") GK_ATOM(nowrap, "nowrap") GK_ATOM(number, "number") GK_ATOM(null, "null") @@ -629,6 +653,7 @@ GK_ATOM(onunload, "onunload") GK_ATOM(open, "open") GK_ATOM(optgroup, "optgroup") +GK_ATOM(optimum, "optimum") GK_ATOM(option, "option") GK_ATOM(_or, "or") GK_ATOM(order, "order") @@ -662,6 +687,7 @@ GK_ATOM(phase, "phase") GK_ATOM(ping, "ping") GK_ATOM(plaintext, "plaintext") +GK_ATOM(placeholder, "placeholder") GK_ATOM(pointSize, "point-size") GK_ATOM(poly, "poly") GK_ATOM(polygon, "polygon") @@ -698,6 +724,7 @@ GK_ATOM(propagate, "propagate") GK_ATOM(properties, "properties") GK_ATOM(property, "property") +GK_ATOM(pubdate, "pubdate") GK_ATOM(q, "q") GK_ATOM(query, "query") GK_ATOM(queryset, "queryset") @@ -711,6 +738,7 @@ GK_ATOM(refresh, "refresh") GK_ATOM(rel, "rel") GK_ATOM(removeelement, "removeelement") +GK_ATOM(required, "required") GK_ATOM(repeat, "repeat") GK_ATOM(replace, "replace") GK_ATOM(reset, "reset") @@ -723,6 +751,7 @@ GK_ATOM(resultPrefix, "result-prefix") GK_ATOM(rev, "rev") GK_ATOM(reverse, "reverse") +GK_ATOM(reversed, "reversed") GK_ATOM(right, "right") GK_ATOM(rightmargin, "rightmargin") GK_ATOM(rightpadding, "rightpadding") @@ -731,13 +760,17 @@ GK_ATOM(row, "row") GK_ATOM(rows, "rows") GK_ATOM(rowspan, "rowspan") +GK_ATOM(rp, "rp") +GK_ATOM(rt, "rt") GK_ATOM(rtl, "rtl") +GK_ATOM(ruby, "ruby") GK_ATOM(rule, "rule") GK_ATOM(rules, "rules") GK_ATOM(s, "s") GK_ATOM(samp, "samp") GK_ATOM(scheme, "scheme") GK_ATOM(scope, "scope") +GK_ATOM(scoped, "scoped") GK_ATOM(screen, "screen") GK_ATOM(screenX, "screenX") GK_ATOM(screenY, "screenY") @@ -748,6 +781,7 @@ GK_ATOM(scrollbox, "scrollbox") GK_ATOM(scrollcorner, "scrollcorner") GK_ATOM(scrolling, "scrolling") +GK_ATOM(section, "section") GK_ATOM(select, "select") GK_ATOM(selectPopupList, "selectPopupList") GK_ATOM(selectable, "selectable") @@ -788,6 +822,7 @@ GK_ATOM(splitter, "splitter") GK_ATOM(spring, "spring") GK_ATOM(src, "src") +GK_ATOM(srclang, "srclang") GK_ATOM(stack, "stack") GK_ATOM(standalone, "standalone") GK_ATOM(standby, "standby") @@ -842,6 +877,7 @@ GK_ATOM(th, "th") GK_ATOM(thead, "thead") GK_ATOM(thumb, "thumb") +GK_ATOM(time, "time") GK_ATOM(title, "title") GK_ATOM(titlebar, "titlebar") GK_ATOM(titletip, "titletip") @@ -858,6 +894,7 @@ GK_ATOM(topmargin, "topmargin") GK_ATOM(toppadding, "toppadding") GK_ATOM(tr, "tr") +GK_ATOM(track, "track") GK_ATOM(trailing, "trailing") GK_ATOM(transform, "transform") GK_ATOM(transformiix, "transformiix") --- xulrunner-1.9.0.19.orig/content/base/src/nsTextFragment.h +++ xulrunner-1.9.0.19/content/base/src/nsTextFragment.h @@ -144,6 +144,11 @@ return mState.mLength; } + PRBool CanGrowBy(size_t n) const + { + return n < (1 << 29) && mState.mLength + n < (1 << 29); + } + /** * Change the contents of this fragment to be a copy of the given * buffer. --- xulrunner-1.9.0.19.orig/content/events/src/nsEventStateManager.cpp +++ xulrunner-1.9.0.19/content/events/src/nsEventStateManager.cpp @@ -2377,7 +2377,7 @@ } nsIFrame* currFrame = mCurrentTarget; - nsIContent* activeContent = nsnull; + nsCOMPtr activeContent; if (mCurrentTarget) activeContent = mCurrentTarget->GetContent(); --- xulrunner-1.9.0.19.orig/content/xul/templates/src/nsXULTreeBuilder.cpp +++ xulrunner-1.9.0.19/content/xul/templates/src/nsXULTreeBuilder.cpp @@ -63,6 +63,8 @@ #include "nsUnicharUtils.h" #include "nsINameSpaceManager.h" #include "nsIDOMClassInfo.h" +#include "nsTreeContentView.h" +#include "nsDOMError.h" // For security check #include "nsIDocument.h" @@ -439,6 +441,9 @@ NS_IMETHODIMP nsXULTreeBuilder::SetSelection(nsITreeSelection* aSelection) { + NS_ENSURE_TRUE(!aSelection || + nsTreeContentView::CanTrustTreeSelection(aSelection), + NS_ERROR_DOM_SECURITY_ERR); mSelection = aSelection; return NS_OK; } --- xulrunner-1.9.0.19.orig/content/xul/templates/src/Makefile.in +++ xulrunner-1.9.0.19/content/xul/templates/src/Makefile.in @@ -102,7 +102,8 @@ include $(topsrcdir)/config/rules.mk LOCAL_INCLUDES = -I$(srcdir)/../../../base/src \ - -I$(srcdir)/../../content/src \ - $(NULL) + -I$(srcdir)/../../content/src \ + -I$(srcdir)/../../../../layout/xul/base/src/tree/src \ + $(NULL) DEFINES += -D_IMPL_NS_LAYOUT --- xulrunner-1.9.0.19.orig/content/html/document/src/nsHTMLDocument.cpp +++ xulrunner-1.9.0.19/content/html/document/src/nsHTMLDocument.cpp @@ -3823,15 +3823,45 @@ mContentEditableCount += aChange; + class DeferredContentEditableCountChangeEvent : public nsRunnable + { + public: + DeferredContentEditableCountChangeEvent(nsHTMLDocument *aDoc, nsIContent *aElement) + : mDoc(aDoc) + , mElement(aElement) + { + } + + NS_IMETHOD Run() { + if (mElement->GetOwnerDoc() == mDoc) { + mDoc->DeferredContentEditableCountChange(mElement); + } + return NS_OK; + } + + private: + nsRefPtr mDoc; + nsCOMPtr mElement; + }; + + nsContentUtils::AddScriptRunner( + new DeferredContentEditableCountChangeEvent(this, aElement)); + + return NS_OK; +} + +void +nsHTMLDocument::DeferredContentEditableCountChange(nsIContent *aElement) +{ if (mParser || (mUpdateNestLevel > 0 && mContentEditableCount > 0 != IsEditingOn())) { - return NS_OK; + return; } EditingState oldState = mEditingState; nsresult rv = EditingStateChanged(); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, ); if (oldState == mEditingState && mEditingState == eContentEditable) { // We just changed the contentEditable state of a node, we need to reset @@ -3840,40 +3870,37 @@ if (node) { nsPIDOMWindow *window = GetWindow(); if (!window) - return NS_ERROR_FAILURE; + return; nsIDocShell *docshell = window->GetDocShell(); if (!docshell) - return NS_ERROR_FAILURE; + return; nsCOMPtr editorDocShell = do_QueryInterface(docshell, &rv); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, ); nsCOMPtr editor; editorDocShell->GetEditor(getter_AddRefs(editor)); if (editor) { nsCOMPtr range; rv = NS_NewRange(getter_AddRefs(range)); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, ); rv = range->SelectNode(node); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, ); nsCOMPtr spellChecker; rv = editor->GetInlineSpellChecker(PR_FALSE, getter_AddRefs(spellChecker)); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, ); if (spellChecker) { rv = spellChecker->SpellCheckRange(range); - NS_ENSURE_SUCCESS(rv, rv); } } } } - - return NS_OK; } static PRBool --- xulrunner-1.9.0.19.orig/content/html/document/src/nsHTMLFragmentContentSink.cpp +++ xulrunner-1.9.0.19/content/html/document/src/nsHTMLFragmentContentSink.cpp @@ -65,6 +65,16 @@ #include "nsContentSink.h" #include "nsTHashtable.h" #include "nsCycleCollectionParticipant.h" +#include "nsICSSLoader.h" +#include "nsICSSParser.h" +#include "nsCSSProperty.h" +#include "nsCSSDeclaration.h" +#include "nsICSSStyleRule.h" +#include "nsUnicharInputStream.h" +#include "nsCSSStyleSheet.h" +#include "nsCSSDeclaration.h" +#include "nsCSSProperty.h" +#include "nsIDOMCSSRule.h" // // XXX THIS IS TEMPORARY CODE @@ -76,6 +86,9 @@ class nsHTMLFragmentContentSink : public nsIFragmentContentSink, public nsIHTMLContentSink { public: + /** + * @param aAllContent Whether there is context information available for the fragment. + */ nsHTMLFragmentContentSink(PRBool aAllContent = PR_FALSE); virtual ~nsHTMLFragmentContentSink(); @@ -140,8 +153,6 @@ void ProcessBaseTag(nsIContent* aContent); void AddBaseTagInfo(nsIContent* aContent); - nsresult Init(); - PRPackedBool mAllContent; PRPackedBool mProcessing; PRPackedBool mSeenBody; @@ -874,10 +885,11 @@ // Find the whitelist of allowed elements and attributes in // nsContentSink.h We share it with nsHTMLParanoidFragmentSink -class nsHTMLParanoidFragmentSink : public nsHTMLFragmentContentSink +class nsHTMLParanoidFragmentSink : public nsHTMLFragmentContentSink, + public nsIParanoidFragmentContentSink { public: - nsHTMLParanoidFragmentSink(); + nsHTMLParanoidFragmentSink(PRBool aAllContent = PR_FALSE); static nsresult Init(); static void Cleanup(); @@ -893,14 +905,24 @@ nsresult AddAttributes(const nsIParserNode& aNode, nsIContent* aContent); + + // nsIParanoidFragmentContentSink + virtual void AllowStyles(); + virtual void AllowComments(); + protected: nsresult NameFromType(const nsHTMLTag aTag, nsIAtom **aResult); nsresult NameFromNode(const nsIParserNode& aNode, nsIAtom **aResult); + + void SanitizeStyleRule(nsICSSStyleRule *aRule, nsAutoString &aRuleText); - PRBool mSkip; // used when we descend into