diff --git a/mozilla/configure b/mozilla/configure index a92b14b5c4e..131c63da2db 100755 --- a/mozilla/configure +++ b/mozilla/configure @@ -4486,7 +4486,6 @@ EOF EOF TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - DSO_LDOPTS="$DSO_LDOPTS -Wl,-Bsymbolic" LIBS="$LIBS -lc" case "${host_cpu}" in @@ -4946,7 +4945,7 @@ then _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6 -echo "configure:4950: checking for XDrawLines in -lX11" >&5 +echo "configure:4949: 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 @@ -4954,7 +4953,7 @@ else 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:4968: \"$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 @@ -4987,7 +4986,7 @@ MISSING_X="$MISSING_X -lX11" fi echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6 -echo "configure:4991: checking for XextAddDisplay in -lXext" >&5 +echo "configure:4990: 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 @@ -4995,7 +4994,7 @@ else 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:5009: \"$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 @@ -5028,7 +5027,7 @@ MISSING_X="$MISSING_X -lXext" fi echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6 -echo "configure:5032: checking for IceFlush in -lICE" >&5 +echo "configure:5031: 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 @@ -5036,7 +5035,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5050: \"$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 @@ -5068,7 +5067,7 @@ else fi echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6 -echo "configure:5072: checking for SmcCloseConnection in -lSM" >&5 +echo "configure:5071: 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 @@ -5076,7 +5075,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lSM $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5090: \"$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 @@ -5108,7 +5107,7 @@ else fi echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 -echo "configure:5112: checking for XtFree in -lXt" >&5 +echo "configure:5111: 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 @@ -5116,7 +5115,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5130: \"$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 @@ -5149,7 +5148,7 @@ MISSING_X="$MISSING_X -lXt" fi echo $ac_n "checking for XmuLookupString in -lXmu""... $ac_c" 1>&6 -echo "configure:5153: checking for XmuLookupString in -lXmu" >&5 +echo "configure:5152: checking for XmuLookupString in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuLookupString | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5157,7 +5156,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXmu $X_PRE_LIBS $XLIBS $XT_LIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5171: \"$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 @@ -5191,7 +5190,7 @@ fi echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6 -echo "configure:5195: checking for XineramaIsActive in -lXinerama" >&5 +echo "configure:5194: checking for XineramaIsActive in -lXinerama" >&5 ac_lib_var=`echo Xinerama'_'XineramaIsActive | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5199,7 +5198,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXinerama $XLIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5213: \"$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 @@ -5232,17 +5231,17 @@ fi ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6 -echo "configure:5236: checking for X11/extensions/Xinerama.h" >&5 +echo "configure:5235: checking for X11/extensions/Xinerama.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:5246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5245: \"$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* @@ -5265,7 +5264,7 @@ fi echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6 -echo "configure:5269: checking for XieFloGeometry in -lXIE" >&5 +echo "configure:5268: 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 @@ -5273,7 +5272,7 @@ else 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:5287: \"$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 @@ -5306,17 +5305,17 @@ fi 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:5310: checking for X11/extensions/XIElib.h" >&5 +echo "configure:5309: 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:5320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5319: \"$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* @@ -5405,7 +5404,7 @@ fi # 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:5409: checking for $ac_word" >&5 +echo "configure:5408: 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 @@ -5440,7 +5439,7 @@ fi min_nspr_version=4.0.0 echo $ac_n "checking for NSPR - version >= $min_nspr_version (skipping)""... $ac_c" 1>&6 -echo "configure:5444: checking for NSPR - version >= $min_nspr_version (skipping)" >&5 +echo "configure:5443: checking for NSPR - version >= $min_nspr_version (skipping)" >&5 no_nspr="" if test "$NSPR_CONFIG" = "no"; then @@ -5661,7 +5660,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5665: checking for $ac_word" >&5 +echo "configure:5664: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5696,7 +5695,7 @@ fi min_gtk_version=$GTK_VERSION echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:5700: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:5699: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -5719,7 +5718,7 @@ echo "configure:5700: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5797,7 +5796,7 @@ main () } EOF -if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5832,7 +5831,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -5842,7 +5841,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5845: \"$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 GTK or finding the wrong" @@ -5923,7 +5922,7 @@ fi # Extract the first word of "gdk-pixbuf-config", so it can be a program name with args. set dummy gdk-pixbuf-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5927: checking for $ac_word" >&5 +echo "configure:5926: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GDK_PIXBUF_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5958,7 +5957,7 @@ fi min_gdk_pixbuf_version=$GDK_PIXBUF_VERSION echo $ac_n "checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version""... $ac_c" 1>&6 -echo "configure:5962: checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version" >&5 +echo "configure:5961: checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version" >&5 no_gdk_pixbuf="" if test "$GDK_PIXBUF_CONFIG" = "no" ; then no_gdk_pixbuf=yes @@ -5982,7 +5981,7 @@ echo "configure:5962: checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_versi echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6040,7 +6039,7 @@ int main () EOF -if { (eval echo configure:6044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6074,7 +6073,7 @@ fi CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" LIBS="$LIBS $GDK_PIXBUF_LIBS" cat > conftest.$ac_ext < @@ -6084,7 +6083,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6087: \"$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 GDK_PIXBUF or finding the wrong" @@ -6230,12 +6229,12 @@ MISSING_XPRINT= if test "$MOZ_ENABLE_XPRINT" then echo $ac_n "checking for xprint insanity""... $ac_c" 1>&6 -echo "configure:6234: checking for xprint insanity" >&5 +echo "configure:6233: checking for xprint insanity" >&5 _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 -echo "configure:6239: checking for XpGetPrinterList in -lXp" >&5 +echo "configure:6238: checking for XpGetPrinterList in -lXp" >&5 ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6243,7 +6242,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6257: \"$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 @@ -6304,7 +6303,7 @@ fi if test "$MOZ_ENABLE_MOTIF" then echo $ac_n "checking for motif insanity""... $ac_c" 1>&6 -echo "configure:6308: checking for motif insanity" >&5 +echo "configure:6307: checking for motif insanity" >&5 if test "$x_includes" then @@ -6330,7 +6329,7 @@ echo "configure:6308: checking for motif insanity" >&5 if test "$MOTIF_REQUIRES_XPM" = "True" then echo $ac_n "checking for XpmWriteFileFromImage in -lXpm""... $ac_c" 1>&6 -echo "configure:6334: checking for XpmWriteFileFromImage in -lXpm" >&5 +echo "configure:6333: checking for XpmWriteFileFromImage in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmWriteFileFromImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6338,7 +6337,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXpm $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6352: \"$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 @@ -6375,7 +6374,7 @@ fi if test "$MOTIF_VERSION" = "2.1" then echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 -echo "configure:6379: checking for XpGetPrinterList in -lXp" >&5 +echo "configure:6378: checking for XpGetPrinterList in -lXp" >&5 ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6383,7 +6382,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6397: \"$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 @@ -6462,7 +6461,7 @@ fi _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$MOTIF_DYNAMIC_PATHS $XLDFLAGS $LDFLAGS" echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6 -echo "configure:6466: checking for XmStringCreate in -lXm" >&5 +echo "configure:6465: checking for XmStringCreate in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6470,7 +6469,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXm $MOTIF_DYNAMIC_PATHS $MOZ_MOTIF_LDFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6484: \"$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 @@ -6505,7 +6504,7 @@ fi LDFLAGS="$_SAVE_LDFLAGS" else echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6 -echo "configure:6509: checking for XmStringCreate in -lXm" >&5 +echo "configure:6508: checking for XmStringCreate in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6513,7 +6512,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXm $MOZ_MOTIF_LDFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6527: \"$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 @@ -6571,7 +6570,7 @@ fi if test "$MOZ_ENABLE_XLIB" then echo $ac_n "checking for xlib insanity""... $ac_c" 1>&6 -echo "configure:6575: checking for xlib insanity" >&5 +echo "configure:6574: checking for xlib insanity" >&5 echo "$ac_t""yes" 1>&6 MOZ_XLIB_CFLAGS="$X_CFLAGS" @@ -6652,9 +6651,9 @@ cross_compiling=$ac_cv_prog_cxx_cross LIBS="$LIBS $QT_LIBS" echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6 -echo "configure:6656: checking Qt - version >= $QT_VERSION" >&5 +echo "configure:6655: checking Qt - version >= $QT_VERSION" >&5 cat > conftest.$ac_ext < int main() { @@ -6665,7 +6664,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result="yes" else @@ -6791,7 +6790,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6795: checking for $ac_word" >&5 +echo "configure:6794: 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 @@ -6833,7 +6832,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6837: checking for $ac_word" >&5 +echo "configure:6836: 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 @@ -6975,7 +6974,7 @@ fi # 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:6979: checking for $ac_word" >&5 +echo "configure:6978: 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 @@ -7010,7 +7009,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:7014: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:7013: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -7033,7 +7032,7 @@ echo "configure:7014: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -7109,7 +7108,7 @@ main () } EOF -if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7143,7 +7142,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -7153,7 +7152,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7156: \"$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" @@ -7197,7 +7196,7 @@ rm -f conftest* # 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:7201: checking for $ac_word" >&5 +echo "configure:7200: 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 @@ -7232,7 +7231,7 @@ fi min_libIDL_version=$LIBIDL_VERSION echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6 -echo "configure:7236: checking for libIDL - version >= $min_libIDL_version" >&5 +echo "configure:7235: checking for libIDL - version >= $min_libIDL_version" >&5 no_libIDL="" if test "$LIBIDL_CONFIG" = "no" ; then no_libIDL=yes @@ -7259,7 +7258,7 @@ echo "configure:7236: checking for libIDL - version >= $min_libIDL_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -7345,7 +7344,7 @@ main () } EOF -if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7379,7 +7378,7 @@ fi CFLAGS="$CFLAGS $LIBIDL_CFLAGS" LIBS="$LIBS $LIBIDL_LIBS" cat > conftest.$ac_ext < @@ -7390,7 +7389,7 @@ int main() { return IDL_get_libver_string ? 1 : 0; ; return 0; } EOF -if { (eval echo configure:7394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7393: \"$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" @@ -7500,7 +7499,7 @@ fi # 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:7504: checking for $ac_word" >&5 +echo "configure:7503: 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 @@ -7535,7 +7534,7 @@ fi min_glib_version=${GLIB_VERSION} echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:7539: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:7538: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -7558,7 +7557,7 @@ echo "configure:7539: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -7634,7 +7633,7 @@ main () } EOF -if { (eval echo configure:7638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7668,7 +7667,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -7678,7 +7677,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7681: \"$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" @@ -7724,12 +7723,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:7728: checking for working const" >&5 +echo "configure:7727: 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:7781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -7799,12 +7798,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7803: checking for ANSI C header files" >&5 +echo "configure:7802: 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 @@ -7812,7 +7811,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7815: \"$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* @@ -7829,7 +7828,7 @@ rm -f conftest* 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 @@ -7847,7 +7846,7 @@ fi 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 @@ -7868,7 +7867,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -7879,7 +7878,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:7883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7903,12 +7902,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:7907: checking for mode_t" >&5 +echo "configure:7906: 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 @@ -7936,12 +7935,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:7940: checking for off_t" >&5 +echo "configure:7939: 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 @@ -7969,12 +7968,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:7973: checking for pid_t" >&5 +echo "configure:7972: 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 @@ -8002,12 +8001,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:8006: checking for size_t" >&5 +echo "configure:8005: 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 @@ -8035,12 +8034,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:8039: checking for uid_t in sys/types.h" >&5 +echo "configure:8038: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -8069,12 +8068,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:8073: checking for st_blksize in struct stat" >&5 +echo "configure:8072: 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 @@ -8082,7 +8081,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -8117,12 +8116,12 @@ EOF esac echo $ac_n "checking for int16_t""... $ac_c" 1>&6 -echo "configure:8121: checking for int16_t" >&5 +echo "configure:8120: 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 @@ -8130,7 +8129,7 @@ int main() { int16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int16_t=true else @@ -8152,12 +8151,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int32_t""... $ac_c" 1>&6 -echo "configure:8156: checking for int32_t" >&5 +echo "configure:8155: 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 @@ -8165,7 +8164,7 @@ int main() { int32_t foo = 0; ; return 0; } EOF -if { (eval echo configure:8169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int32_t=true else @@ -8187,12 +8186,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64_t""... $ac_c" 1>&6 -echo "configure:8191: checking for int64_t" >&5 +echo "configure:8190: 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 @@ -8200,7 +8199,7 @@ int main() { int64_t foo = 0; ; return 0; } EOF -if { (eval echo configure:8204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64_t=true else @@ -8222,12 +8221,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64""... $ac_c" 1>&6 -echo "configure:8226: checking for int64" >&5 +echo "configure:8225: 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 @@ -8235,7 +8234,7 @@ int main() { int64 foo = 0; ; return 0; } EOF -if { (eval echo configure:8239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64=true else @@ -8257,12 +8256,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint""... $ac_c" 1>&6 -echo "configure:8261: checking for uint" >&5 +echo "configure:8260: 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 @@ -8270,7 +8269,7 @@ int main() { uint foo = 0; ; return 0; } EOF -if { (eval echo configure:8274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint=true else @@ -8292,12 +8291,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint_t""... $ac_c" 1>&6 -echo "configure:8296: checking for uint_t" >&5 +echo "configure:8295: 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 @@ -8305,7 +8304,7 @@ int main() { uint foo = 0; ; return 0; } EOF -if { (eval echo configure:8309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint_t=true else @@ -8327,12 +8326,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 -echo "configure:8331: checking for uint16_t" >&5 +echo "configure:8330: 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 @@ -8340,7 +8339,7 @@ int main() { uint16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:8344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint16_t=true else @@ -8371,12 +8370,12 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6 -echo "configure:8375: checking for uname.domainname" >&5 +echo "configure:8374: 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() { @@ -8384,7 +8383,7 @@ int main() { (void)uname(res); if (res != 0) { domain = res->domainname; } ; return 0; } EOF -if { (eval echo configure:8388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_domainname_field=true else @@ -8408,12 +8407,12 @@ else fi echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6 -echo "configure:8412: checking for uname.__domainname" >&5 +echo "configure:8411: 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() { @@ -8421,7 +8420,7 @@ int main() { (void)uname(res); if (res != 0) { domain = res->__domainname; } ; return 0; } EOF -if { (eval echo configure:8425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_us_domainname_field=true else @@ -8453,17 +8452,17 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6 -echo "configure:8457: checking for 64-bit OS" >&5 +echo "configure:8456: checking for 64-bit OS" >&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:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -8485,7 +8484,7 @@ fi echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6 -echo "configure:8489: checking for usable wchar_t (2 bytes, unsigned)" >&5 +echo "configure:8488: checking for usable wchar_t (2 bytes, unsigned)" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8493,14 +8492,14 @@ else ac_cv_have_usable_wchar="maybe" else cat > conftest.$ac_ext < int main () { return (sizeof(wchar_t) != 2) || (wchar_t)-1 < (wchar_t) 0 ; } EOF -if { (eval echo configure:8504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_have_usable_wchar="yes" else @@ -8529,7 +8528,7 @@ else CFLAGS="$CFLAGS -fshort-wchar" echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6 -echo "configure:8533: checking for compiler -fshort-wchar option" >&5 +echo "configure:8532: checking for compiler -fshort-wchar option" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8537,14 +8536,14 @@ else ac_cv_have_usable_wchar_option="maybe" else cat > conftest.$ac_ext < int main () { return (sizeof(wchar_t) != 2) || (wchar_t)-1 < (wchar_t) 0 ; } EOF -if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_have_usable_wchar_option="yes" else @@ -8578,12 +8577,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h 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:8582: checking for $ac_hdr that defines DIR" >&5 +echo "configure:8581: 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> @@ -8591,7 +8590,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:8595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -8616,7 +8615,7 @@ done # 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:8620: checking for opendir in -ldir" >&5 +echo "configure:8619: 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 @@ -8624,7 +8623,7 @@ else 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:8638: \"$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 @@ -8657,7 +8656,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8661: checking for opendir in -lx" >&5 +echo "configure:8660: 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 @@ -8665,7 +8664,7 @@ else 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:8679: \"$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 @@ -8707,17 +8706,17 @@ for ac_hdr in sys/byteorder.h compat.h getopt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8711: checking for $ac_hdr" >&5 +echo "configure:8710: 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:8721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8720: \"$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* @@ -8747,17 +8746,17 @@ for ac_hdr in sys/bittypes.h memory.h unistd.h sys/filio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8751: checking for $ac_hdr" >&5 +echo "configure:8750: 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:8761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8760: \"$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* @@ -8787,17 +8786,17 @@ for ac_hdr in gnu/libc-version.h nl_types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8791: checking for $ac_hdr" >&5 +echo "configure:8790: 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:8801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8800: \"$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* @@ -8828,17 +8827,17 @@ for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8832: checking for $ac_hdr" >&5 +echo "configure:8831: 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:8842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8841: \"$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* @@ -8873,17 +8872,17 @@ case $target in do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8877: checking for $ac_hdr" >&5 +echo "configure:8876: 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:8887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8886: \"$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* @@ -8917,7 +8916,7 @@ case $target in ;; *) echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 -echo "configure:8921: checking for gethostbyname_r in -lc_r" >&5 +echo "configure:8920: 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 @@ -8925,7 +8924,7 @@ else 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:8939: \"$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 @@ -8966,7 +8965,7 @@ fi ;; esac echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6 -echo "configure:8970: checking for atan in -lm" >&5 +echo "configure:8969: 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 @@ -8974,7 +8973,7 @@ else 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:8988: \"$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 @@ -9013,7 +9012,7 @@ else fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:9017: checking for dlopen in -ldl" >&5 +echo "configure:9016: 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 @@ -9021,7 +9020,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9035: \"$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 @@ -9067,7 +9066,7 @@ if test ! "$GNU_CXX"; then ;; *-aix*) echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6 -echo "configure:9071: checking for demangle in -lC_r" >&5 +echo "configure:9070: 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 @@ -9075,7 +9074,7 @@ else 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:9089: \"$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 @@ -9116,7 +9115,7 @@ fi ;; *) echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 -echo "configure:9120: checking for demangle in -lC" >&5 +echo "configure:9119: 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 @@ -9124,7 +9123,7 @@ else 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:9138: \"$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 @@ -9166,7 +9165,7 @@ fi esac fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:9170: checking for socket in -lsocket" >&5 +echo "configure:9169: 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 @@ -9174,7 +9173,7 @@ else 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:9188: \"$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 @@ -9213,7 +9212,7 @@ else fi echo $ac_n "checking for shm_open in -lposix4""... $ac_c" 1>&6 -echo "configure:9217: checking for shm_open in -lposix4" >&5 +echo "configure:9216: checking for shm_open in -lposix4" >&5 ac_lib_var=`echo posix4'_'shm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9221,7 +9220,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9235: \"$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 @@ -9264,7 +9263,7 @@ fi echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:9268: checking for pthread_create in -lpthreads" >&5 +echo "configure:9267: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9286,7 +9285,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:9290: checking for pthread_create in -lpthread" >&5 +echo "configure:9289: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9308,7 +9307,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:9312: checking for pthread_create in -lc_r" >&5 +echo "configure:9311: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9330,7 +9329,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:9334: checking for pthread_create in -lc" >&5 +echo "configure:9333: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9385,7 +9384,7 @@ then rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:9389: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:9388: 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 @@ -9401,7 +9400,7 @@ echo "configure:9389: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:9405: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:9404: 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 @@ -9502,7 +9501,7 @@ EOF echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6 -echo "configure:9506: checking whether mmap() sees write()s" >&5 +echo "configure:9505: checking whether mmap() sees write()s" >&5 mmap_test_prog=' @@ -9541,11 +9540,11 @@ if test "$cross_compiling" = yes; then 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:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -9570,13 +9569,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:9574: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:9573: 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 @@ -9594,7 +9593,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -9616,7 +9615,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:9620: checking for 8-bit clean memcmp" >&5 +echo "configure:9619: 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 @@ -9624,7 +9623,7 @@ else 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:9637: \"$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 @@ -9654,12 +9653,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in random qsort strerror lchown fchmod snprintf localtime_r statvfs memmove usleep rint do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9658: checking for $ac_func" >&5 +echo "configure:9657: 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:9685: \"$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 @@ -9709,12 +9708,12 @@ done for ac_func in nl_langinfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9713: checking for $ac_func" >&5 +echo "configure:9712: 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:9740: \"$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 @@ -9770,12 +9769,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6 -echo "configure:9774: checking for gnu_get_libc_version()" >&5 +echo "configure:9773: 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:9789: \"$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 @@ -9817,12 +9816,12 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6 -echo "configure:9821: checking how to call gettimeofday" >&5 +echo "configure:9820: checking how to call gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9831,7 +9830,7 @@ struct timeval tv; struct timezone tzp; gettimeofday(&tv, &tzp); ; return 0; } EOF -if { (eval echo configure:9835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_gettimeofday_args=2 else @@ -9839,7 +9838,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < #include @@ -9847,7 +9846,7 @@ int main() { struct timeval tv; gettimeofday(&tv); ; return 0; } EOF -if { (eval echo configure:9851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_gettimeofday_args=1 else @@ -9883,7 +9882,7 @@ fi echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6 -echo "configure:9887: checking for /dev/zero" >&5 +echo "configure:9886: checking for /dev/zero" >&5 if test "$HAVE_DEV_ZERO"; then cat >> confdefs.h <<\EOF #define HAVE_DEV_ZERO 1 @@ -9900,19 +9899,19 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for valloc""... $ac_c" 1>&6 -echo "configure:9904: checking for valloc" >&5 +echo "configure:9903: checking for valloc" >&5 if eval "test \"`echo '$''{'ac_cv_valloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { void *ptr = valloc(1); ; return 0; } EOF -if { (eval echo configure:9916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_valloc=true else @@ -9938,7 +9937,7 @@ fi fi echo $ac_n "checking whether va_list assignments need array notation""... $ac_c" 1>&6 -echo "configure:9942: checking whether va_list assignments need array notation" >&5 +echo "configure:9941: checking whether va_list assignments need array notation" >&5 if eval "test \"`echo '$''{'ac_cv_valistisarray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9946,7 +9945,7 @@ else ac_cv_valistisarray=false else cat > conftest.$ac_ext < #include @@ -9959,7 +9958,7 @@ else } int main() { foo(0, 123); return(0); } EOF -if { (eval echo configure:9963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_valistisarray=false else @@ -10035,12 +10034,12 @@ EOF esac echo $ac_n "checking for sys_errlist/sys_nerr""... $ac_c" 1>&6 -echo "configure:10039: checking for sys_errlist/sys_nerr" >&5 +echo "configure:10038: checking for sys_errlist/sys_nerr" >&5 if eval "test \"`echo '$''{'ac_cv_syserrlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10048,7 +10047,7 @@ int main() { char *foo = sys_errlist[sys_nerr-1]; ; return 0; } EOF -if { (eval echo configure:10052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_syserrlist=true else @@ -10075,7 +10074,7 @@ if test "$GNU_CXX"; then _MOZ_RTTI_FLAGS=${_COMPILER_PREFIX}-fno-rtti echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6 -echo "configure:10079: checking for C++ exceptions flag" >&5 +echo "configure:10078: 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 @@ -10107,12 +10106,12 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for ios::binary""... $ac_c" 1>&6 -echo "configure:10111: checking for ios::binary" >&5 +echo "configure:10110: checking for ios::binary" >&5 if eval "test \"`echo '$''{'ac_cv_ios_binary'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10121,7 +10120,7 @@ char *buffer = "config.log"; fstream *mFileStream=new fstream(buffer, ios::binary); ; return 0; } EOF -if { (eval echo configure:10125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_ios_binary=true else @@ -10145,12 +10144,12 @@ fi echo $ac_n "checking for ios::bin""... $ac_c" 1>&6 -echo "configure:10149: checking for ios::bin" >&5 +echo "configure:10148: checking for ios::bin" >&5 if eval "test \"`echo '$''{'ac_cv_ios_bin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10159,7 +10158,7 @@ char *buffer = "config.log"; fstream *mFileStream=new fstream(buffer, ios::bin); ; return 0; } EOF -if { (eval echo configure:10163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_ios_bin=true else @@ -10182,19 +10181,19 @@ else fi echo $ac_n "checking for ostreams""... $ac_c" 1>&6 -echo "configure:10186: checking for ostreams" >&5 +echo "configure:10185: checking for ostreams" >&5 if eval "test \"`echo '$''{'ac_cv_ostream'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { streambuf *xxx; ostream *foo=new ostream(xxx); ; return 0; } EOF -if { (eval echo configure:10198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_ostream=true else @@ -10220,19 +10219,19 @@ else LIBS='-lemxio -lsocket -lstdcpp' fi echo $ac_n "checking for ostreams in -lstdc++""... $ac_c" 1>&6 -echo "configure:10224: checking for ostreams in -lstdc++" >&5 +echo "configure:10223: checking for ostreams in -lstdc++" >&5 if eval "test \"`echo '$''{'ac_cv_lib_stdcpp_ostream'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { ostream *foo=new ostream(); ; return 0; } EOF -if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_stdcpp_ostream=true else @@ -10257,19 +10256,19 @@ EOF fi echo $ac_n "checking for C++ \"bool\" keyword""... $ac_c" 1>&6 -echo "configure:10261: checking for C++ \"bool\" keyword" >&5 +echo "configure:10260: checking for C++ \"bool\" keyword" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_bool'+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:10272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_bool=yes else @@ -10291,12 +10290,12 @@ fi echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6 -echo "configure:10295: checking for C++ \"explicit\" keyword" >&5 +echo "configure:10294: 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:10309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_explicit=yes else @@ -10327,12 +10326,12 @@ EOF fi echo $ac_n "checking for C++ template specialization support""... $ac_c" 1>&6 -echo "configure:10331: checking for C++ template specialization support" >&5 +echo "configure:10330: checking for C++ template specialization support" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_template_specialization'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct X { int a; }; class Y {}; @@ -10342,7 +10341,7 @@ X int_x; X y_x; ; return 0; } EOF -if { (eval echo configure:10346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_template_specialization=yes else @@ -10372,12 +10371,12 @@ EOF fi echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6 -echo "configure:10376: checking for modern C++ template specialization syntax support" >&5 +echo "configure:10375: 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 {}; @@ -10387,7 +10386,7 @@ X int_x; X y_x; ; return 0; } EOF -if { (eval echo configure:10391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_modern_specialize_template_syntax=yes else @@ -10409,12 +10408,12 @@ fi echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6 -echo "configure:10413: checking whether partial template specialization works" >&5 +echo "configure:10412: 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 {}; @@ -10422,7 +10421,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:10426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_partial_specialization=yes else @@ -10444,12 +10443,12 @@ fi echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6 -echo "configure:10448: checking whether operators must be re-defined for templates derived from templates" >&5 +echo "configure:10447: 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 @@ -10461,7 +10460,7 @@ Derived a, b; return 0; ; return 0; } EOF -if { (eval echo configure:10465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_derived_template_operators=no else @@ -10483,12 +10482,12 @@ fi echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6 -echo "configure:10487: checking whether we need to cast a derived template to pass as its base class" >&5 +echo "configure:10486: 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 { }; @@ -10497,7 +10496,7 @@ int main() { Derived bar; return foo(bar); ; return 0; } EOF -if { (eval echo configure:10501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_cpp_template_cast_to_base=no else @@ -10518,12 +10517,12 @@ EOF fi echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6 -echo "configure:10522: checking whether the compiler can resolve const ambiguities for templates" >&5 +echo "configure:10521: 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 { @@ -10544,7 +10543,7 @@ int main() { a(&i); ; return 0; } EOF -if { (eval echo configure:10548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_can_resolve_const_ambiguity=yes else @@ -10566,12 +10565,12 @@ fi echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6 -echo "configure:10570: checking whether the C++ \"using\" keyword can change access" >&5 +echo "configure:10569: checking whether the C++ \"using\" keyword can change access" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_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:10585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_access_changing_using=yes else @@ -10603,12 +10602,12 @@ EOF fi echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 -echo "configure:10607: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 +echo "configure:10606: 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:10627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_ambiguity_resolving_using=yes else @@ -10645,19 +10644,19 @@ EOF fi echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6 -echo "configure:10649: checking for \"std::\" namespace" >&5 +echo "configure:10648: 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:10661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_namespace_std=yes else @@ -10678,12 +10677,12 @@ EOF fi echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6 -echo "configure:10682: checking whether standard template operator!=() is ambiguous" >&5 +echo "configure:10681: 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 {}; @@ -10693,7 +10692,7 @@ int main() { T1 a,b; return a != b; ; return 0; } EOF -if { (eval echo configure:10697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_unambiguous_std_notequal=unambiguous else @@ -10715,12 +10714,12 @@ fi echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6 -echo "configure:10719: checking for C++ reinterpret_cast" >&5 +echo "configure:10718: 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:10732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_reinterpret_cast=yes else @@ -10749,7 +10748,7 @@ EOF fi echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 -echo "configure:10753: checking for C++ dynamic_cast to void*" >&5 +echo "configure:10752: 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 @@ -10757,7 +10756,7 @@ else ac_cv_cpp_dynamic_cast_void_ptr=no else cat > conftest.$ac_ext <(suby)))); } EOF -if { (eval echo configure:10780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10779: \"$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 @@ -10800,19 +10799,19 @@ fi echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6 -echo "configure:10804: checking whether C++ requires implementation of unused virtual methods" >&5 +echo "configure:10803: 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:10815: \"$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 @@ -10835,12 +10834,12 @@ fi echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6 -echo "configure:10839: checking for trouble comparing to zero near std::operator!=()" >&5 +echo "configure:10838: 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 {}; @@ -10851,7 +10850,7 @@ int main() { Foo f; return (0 != f); ; return 0; } EOF -if { (eval echo configure:10855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_trouble_comparing_to_zero=no else @@ -10883,19 +10882,19 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:10887: checking for LC_MESSAGES" >&5 +echo "configure:10886: 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:10899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_i18n_lc_messages=yes else @@ -11255,6 +11254,21 @@ then *-*-os2_vacpp) MOZ_DEBUG_FLAGS="/Ti+" ;; + *-irix*) + if test "$GNU_CC"; then + GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'` + case "$GCC_VERSION" in + 2.95.*) + MOZ_DEBUG_FLAGS="" + ;; + *) + MOZ_DEBUG_FLAGS="-g" + ;; + esac + else + MOZ_DEBUG_FLAGS="-g" + fi + ;; *) MOZ_DEBUG_FLAGS="-g" ;; @@ -11549,12 +11563,12 @@ cross_compiling=$ac_cv_prog_cxx_cross _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:11553: checking whether C++ compiler has -pedantic long long bug" >&5 +echo "configure:11567: checking whether C++ compiler has -pedantic long long bug" >&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:11581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="no" else @@ -11611,12 +11625,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:11615: checking for correct overload resolution with const and templates" >&5 +echo "configure:11629: 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 < @@ -11646,7 +11660,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_nscap_nonconst_opeq_bug="no" else @@ -11692,16 +11706,16 @@ if test "$_IGNORE_LONG_LONG_WARNINGS"; then _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:11696: checking whether compiler supports -Wno-long-long" >&5 +echo "configure:11710: checking whether compiler supports -Wno-long-long" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11719: \"$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" @@ -11949,7 +11963,7 @@ fi echo $ac_n "checking webshell leaks option""... $ac_c" 1>&6 -echo "configure:11953: checking webshell leaks option" >&5 +echo "configure:11967: checking webshell leaks option" >&5 # Check whether --enable-detect-webshell-leaks or --disable-detect-webshell-leaks was given. if test "${enable_detect_webshell_leaks+set}" = set; then enableval="$enable_detect_webshell_leaks" @@ -12023,7 +12037,7 @@ if test "${enable_efence+set}" = set; then enableval="$enable_efence" if test "$enableval" = "yes"; then echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6 -echo "configure:12027: checking for malloc in -lefence" >&5 +echo "configure:12041: 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 @@ -12031,7 +12045,7 @@ else 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:12060: \"$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 @@ -12078,7 +12092,7 @@ fi echo $ac_n "checking for cplus_demangle in -liberty""... $ac_c" 1>&6 -echo "configure:12082: checking for cplus_demangle in -liberty" >&5 +echo "configure:12096: checking for cplus_demangle in -liberty" >&5 ac_lib_var=`echo iberty'_'cplus_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 @@ -12086,7 +12100,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liberty "-liberty" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12115: \"$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 @@ -12432,7 +12446,7 @@ case "$target" in # Extract the first word of "makeC++SharedLib_r", so it can be a program name with args. set dummy makeC++SharedLib_r; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12436: checking for $ac_word" >&5 +echo "configure:12450: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AIX_SHLIB_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12578,7 +12592,7 @@ if test "$JPEG_DIR" = no; then SYSTEM_JPEG= else echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 -echo "configure:12582: checking for jpeg_destroy_compress in -ljpeg" >&5 +echo "configure:12596: 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 @@ -12586,7 +12600,7 @@ else 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:12615: \"$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 @@ -12626,7 +12640,7 @@ if test "$SYSTEM_JPEG" = 1; then SYSTEM_JPEG= else cat > conftest.$ac_ext < #include @@ -12640,7 +12654,7 @@ else } EOF -if { (eval echo configure:12644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_JPEG=1 else @@ -12678,16 +12692,16 @@ if test "$ZLIB_DIR" = no; then SYSTEM_ZLIB= else echo $ac_n "checking "for zlib.h"""... $ac_c" 1>&6 -echo "configure:12682: checking "for zlib.h"" >&5 +echo "configure:12696: checking "for zlib.h"" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result="yes" SYSTEM_ZLIB=1 else @@ -12701,7 +12715,7 @@ rm -f conftest* fi if test "$SYSTEM_ZLIB" = 1; then echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 -echo "configure:12705: checking for gzread in -lz" >&5 +echo "configure:12719: 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 @@ -12709,7 +12723,7 @@ else 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:12738: \"$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 @@ -12766,7 +12780,7 @@ if test "$PNG_DIR" = no; then SYSTEM_PNG= else echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 -echo "configure:12770: checking for png_get_valid in -lpng" >&5 +echo "configure:12784: 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 @@ -12774,7 +12788,7 @@ else 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:12803: \"$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 @@ -12813,7 +12827,7 @@ if test "$SYSTEM_PNG" = 1; then SYSTEM_PNG= else cat > conftest.$ac_ext < #include @@ -12827,7 +12841,7 @@ else } EOF -if { (eval echo configure:12831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_PNG=1 else @@ -12866,7 +12880,7 @@ if test "$MNG_DIR" = no; then SYSTEM_MNG= else echo $ac_n "checking for mng_initialize in -lmng""... $ac_c" 1>&6 -echo "configure:12870: checking for mng_initialize in -lmng" >&5 +echo "configure:12884: checking for mng_initialize in -lmng" >&5 ac_lib_var=`echo mng'_'mng_initialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12874,7 +12888,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmng $MNG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12903: \"$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 @@ -12913,7 +12927,7 @@ if test "$SYSTEM_MNG" = 1; then SYSTEM_MNG= else cat > conftest.$ac_ext < #include @@ -12927,7 +12941,7 @@ else } EOF -if { (eval echo configure:12931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_MNG=1 else @@ -12993,9 +13007,9 @@ CFLAGS="$CFLAGS -I${FULLCIRCLE_DIR}" LDFLAGS="$LDFLAGS -L${FULLCIRCLE_DIR}" LIBS="-lfullsoft $LIBS" echo $ac_n "checking "for FCInitialize in -lfullsoft"""... $ac_c" 1>&6 -echo "configure:12997: checking "for FCInitialize in -lfullsoft"" >&5; +echo "configure:13011: checking "for FCInitialize in -lfullsoft"" >&5; cat > conftest.$ac_ext < #include "fullsoft.h" @@ -13003,7 +13017,7 @@ int main() { FCInitialize(); exit(0); ; return 0; } EOF -if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* FULLCIRCLE_LIBS="-I${FULLCIRCLE_DIR} -L${FULLCIRCLE_DIR} -lfullsoft" result="yes" else diff --git a/mozilla/configure.in b/mozilla/configure.in index 6b992d988e8..9e191b300e4 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -729,7 +729,6 @@ case "$target" in AC_DEFINE(_POSIX_SOURCE) AC_DEFINE(_SVID_SOURCE) TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - DSO_LDOPTS="$DSO_LDOPTS -Wl,-Bsymbolic" LIBS="$LIBS -lc" case "${host_cpu}" in @@ -3256,6 +3255,21 @@ then *-*-os2_vacpp) MOZ_DEBUG_FLAGS="/Ti+" ;; + *-irix*) + if test "$GNU_CC"; then + GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'` + case "$GCC_VERSION" in + 2.95.*) + MOZ_DEBUG_FLAGS="" + ;; + *) + MOZ_DEBUG_FLAGS="-g" + ;; + esac + else + MOZ_DEBUG_FLAGS="-g" + fi + ;; *) MOZ_DEBUG_FLAGS="-g" ;; diff --git a/mozilla/content/base/public/nsIScriptLoader.idl b/mozilla/content/base/public/nsIScriptLoader.idl index bb48a08dfb4..3779847dd44 100644 --- a/mozilla/content/base/public/nsIScriptLoader.idl +++ b/mozilla/content/base/public/nsIScriptLoader.idl @@ -73,4 +73,20 @@ interface nsIScriptLoader : nsISupports { */ void processScriptElement(in nsIDOMHTMLScriptElement aElement, in nsIScriptLoaderObserver aObserver); + + /** + * Suspend processing of new script elements. Any call to + * processScriptElement() will fail with a return code of + * NS_ERROR_NOT_AVAILABLE. Note that this DOES NOT suspend + * currently loading or executing scripts. All calls to + * suspend() must be matched with an equal number of calls + * to resume() before processing of new script elements + * continues. + */ + void suspend(); + + /** + * Resume processing of new script elements. + */ + void resume(); }; diff --git a/mozilla/content/base/src/nsDocumentViewer.cpp b/mozilla/content/base/src/nsDocumentViewer.cpp index c3e4a9c0927..ce48912f033 100644 --- a/mozilla/content/base/src/nsDocumentViewer.cpp +++ b/mozilla/content/base/src/nsDocumentViewer.cpp @@ -365,9 +365,9 @@ public: NS_IMETHOD Init(nsIWidget* aParentWidget, nsIDeviceContext* aDeviceContext, const nsRect& aBounds); - NS_IMETHOD BindToDocument(nsISupports* aDoc, const char* aCommand); NS_IMETHOD SetContainer(nsISupports* aContainer); NS_IMETHOD GetContainer(nsISupports** aContainerResult); + NS_IMETHOD LoadStart(nsISupports* aDoc); NS_IMETHOD LoadComplete(nsresult aStatus); NS_IMETHOD Destroy(void); NS_IMETHOD Stop(void); @@ -506,6 +506,8 @@ private: PRUint32 aDelay); void StopPagePrintTimer(); + void PrepareToStartLoad(void); + protected: // IMPORTANT: The ownership implicit in the following member // variables has been explicitly checked and set using nsCOMPtr @@ -801,12 +803,15 @@ NS_NewDocumentViewer(nsIDocumentViewer** aResult) DocumentViewerImpl::DocumentViewerImpl() { NS_INIT_ISUPPORTS(); + PrepareToStartLoad(); +} + +void DocumentViewerImpl::PrepareToStartLoad() { mEnableRendering = PR_TRUE; mStopped = PR_FALSE; mLoaded = PR_FALSE; mPrt = nsnull; mIsPrinting = PR_FALSE; - } DocumentViewerImpl::DocumentViewerImpl(nsIPresContext* aPresContext) @@ -815,9 +820,7 @@ DocumentViewerImpl::DocumentViewerImpl(nsIPresContext* aPresContext) NS_INIT_ISUPPORTS(); mHintCharsetSource = kCharsetUninitialized; mAllowPlugins = PR_TRUE; - mEnableRendering = PR_TRUE; - mPrt = nsnull; - mIsPrinting = PR_FALSE; + PrepareToStartLoad(); } NS_IMPL_ISUPPORTS5(DocumentViewerImpl, @@ -864,18 +867,27 @@ DocumentViewerImpl::~DocumentViewerImpl() * This method is called by the Document Loader once a document has * been created for a particular data stream... The content viewer * must cache this document for later use when Init(...) is called. + * + * This method is also called when an out of band document.write() happens. + * In that case, the document passed in is the same as the previous document. */ NS_IMETHODIMP -DocumentViewerImpl::BindToDocument(nsISupports *aDoc, const char *aCommand) +DocumentViewerImpl::LoadStart(nsISupports *aDoc) { - NS_PRECONDITION(!mDocument, "Viewer is already bound to a document!"); - #ifdef NOISY_VIEWER - printf("DocumentViewerImpl::BindToDocument\n"); + printf("DocumentViewerImpl::LoadStart\n"); #endif nsresult rv; - mDocument = do_QueryInterface(aDoc,&rv); + if (!mDocument) { + mDocument = do_QueryInterface(aDoc,&rv); + } + else if (mDocument == aDoc) { + // Reset the document viewer's state back to what it was + // when the document load started. + PrepareToStartLoad(); + } + return rv; } @@ -979,6 +991,13 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget, mViewManager->DisableRefresh(); mViewManager->SetWindowDimensions(width, height); + /* Setup default view manager background color */ + /* This may be overridden by the docshell with the background color for the + last document loaded into the docshell */ + nscolor bgcolor = NS_RGB(0, 0, 0); + mPresContext->GetDefaultBackgroundColor(&bgcolor); + mViewManager->SetDefaultBackgroundColor(bgcolor); + if (!makeCX) { // Make shell an observer for next time // XXX - we observe the docuement always, see above after preshell is created @@ -3839,8 +3858,8 @@ DocumentViewerImpl::CreateDocumentViewerUsing(nsIPresContext* aPresContext, viewer->SetUAStyleSheet(mUAStyleSheet); // Bind the new viewer to the old document - nsresult rv = viewer->BindToDocument(mDocument, "create");/* XXX verb? */ - + nsresult rv = viewer->LoadStart(mDocument); + aResult = viewer; return rv; diff --git a/mozilla/content/base/src/nsHTMLContentSerializer.cpp b/mozilla/content/base/src/nsHTMLContentSerializer.cpp index c9e79eccb4a..3ac4b269e8f 100644 --- a/mozilla/content/base/src/nsHTMLContentSerializer.cpp +++ b/mozilla/content/base/src/nsHTMLContentSerializer.cpp @@ -190,8 +190,8 @@ nsHTMLContentSerializer::EscapeURI(const nsAReadableString& aURI, nsAWritableStr nsXPIDLCString escapedURI; aEscapedURI.Truncate(0); - // Loop and escape parts by avoiding escaping reserved characters (and '%'). - while ((end = uri.FindCharInSet("%;/?:@&=+$,", start)) != -1) { + // Loop and escape parts by avoiding escaping reserved characters (and '%', '#' ). + while ((end = uri.FindCharInSet("%#;/?:@&=+$,", start)) != -1) { aURI.Mid(part, start, (end-start)); if (textToSubURI && !part.IsASCII()) { rv = textToSubURI->ConvertAndEscape(documentCharset, part.GetUnicode(), getter_Copies(escapedURI)); diff --git a/mozilla/content/base/src/nsScriptLoader.cpp b/mozilla/content/base/src/nsScriptLoader.cpp index 89fe9b2ce3f..12fd2de5b9e 100644 --- a/mozilla/content/base/src/nsScriptLoader.cpp +++ b/mozilla/content/base/src/nsScriptLoader.cpp @@ -118,7 +118,7 @@ nsScriptLoadRequest::FireScriptEvaluated(nsresult aResult) ////////////////////////////////////////////////////////////// nsScriptLoader::nsScriptLoader() - : mDocument(nsnull) + : mDocument(nsnull), mSuspendCount(0) { NS_INIT_ISUPPORTS(); } @@ -261,7 +261,7 @@ nsScriptLoader::ProcessScriptElement(nsIDOMHTMLScriptElement *aElement, // Check to see that the element is not in a container that // suppresses script evaluation within it. - if (InNonScriptingContainer(aElement)) { + if (mSuspendCount || InNonScriptingContainer(aElement)) { return FireErrorNotification(NS_ERROR_NOT_AVAILABLE, aElement, aObserver); } @@ -757,3 +757,20 @@ nsScriptLoader::OnStreamComplete(nsIStreamLoader* aLoader, return NS_OK; } + +NS_IMETHODIMP +nsScriptLoader::Suspend() +{ + mSuspendCount++; + + return NS_OK; +} + +NS_IMETHODIMP +nsScriptLoader::Resume() +{ + NS_ASSERTION((mSuspendCount > 0), "nsScriptLoader call to resume() unbalanced"); + mSuspendCount--; + + return NS_OK; +} diff --git a/mozilla/content/base/src/nsScriptLoader.h b/mozilla/content/base/src/nsScriptLoader.h index 11ce865dad2..80e967162e7 100644 --- a/mozilla/content/base/src/nsScriptLoader.h +++ b/mozilla/content/base/src/nsScriptLoader.h @@ -68,6 +68,7 @@ protected: nsIDocument* mDocument; // [WEAK] nsSupportsArray mObservers; nsSupportsArray mPendingRequests; + PRInt32 mSuspendCount; }; #endif //__nsScriptLoader_h__ diff --git a/mozilla/content/base/src/nsTreeWalker.cpp b/mozilla/content/base/src/nsTreeWalker.cpp new file mode 100644 index 00000000000..0cdb19c95e6 --- /dev/null +++ b/mozilla/content/base/src/nsTreeWalker.cpp @@ -0,0 +1,550 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * 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 this file as it was released on + * May 1 2001. + * + * The Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001 + * Jonas Sicking. All Rights Reserved. + * + * Contributor(s): + * Jonas Sicking (Original Author) + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + * + */ + +/* + * nsTreeWalker.cpp: Implementation of the nsIDOMTreeWalker object. + */ + +#include "nsTreeWalker.h" + +#include "nsIDOMNode.h" +#include "nsIDOMNodeList.h" +#include "nsDOMError.h" + +#include "nsContentUtils.h" +#include "nsMemory.h" + +/* + * Factories, constructors and destructors + */ + +nsresult +NS_NewTreeWalker(nsIDOMNode *root, + PRUint32 whatToShow, + nsIDOMNodeFilter *filter, + PRBool expandEntityReferences, + nsIDOMTreeWalker **aInstancePtrResult) { + NS_ENSURE_ARG_POINTER(aInstancePtrResult); + + NS_ENSURE_TRUE(root, NS_ERROR_DOM_NOT_SUPPORTED_ERR); + + nsTreeWalker* walker = new nsTreeWalker(root, + whatToShow, + filter, + expandEntityReferences); + NS_ENSURE_TRUE(walker, NS_ERROR_OUT_OF_MEMORY); + + return walker->QueryInterface(NS_GET_IID(nsIDOMTreeWalker), + (void**) aInstancePtrResult); +} + +nsTreeWalker::nsTreeWalker(nsIDOMNode *root, + PRUint32 whatToShow, + nsIDOMNodeFilter *filter, + PRBool expandEntityReferences) : + mRoot(root), + mWhatToShow(whatToShow), + mFilter(filter), + mExpandEntityReferences(expandEntityReferences), + mCurrentNode(root) +{ + NS_INIT_ISUPPORTS(); + /* member initializers and constructor code */ + + NS_ASSERTION(root, "invalid root in call to treeWalker constructor"); +} + +nsTreeWalker::~nsTreeWalker() +{ + /* destructor code */ +} + +/* + * nsISupports stuff + */ + +// XPConnect interface list for nsDOMDocumentType +NS_CLASSINFO_MAP_BEGIN(TreeWalker) + NS_CLASSINFO_MAP_ENTRY(nsIDOMTreeWalker) +NS_CLASSINFO_MAP_END + +// QueryInterface implementation for nsDOMDocumentType +NS_INTERFACE_MAP_BEGIN(nsTreeWalker) + NS_INTERFACE_MAP_ENTRY(nsIDOMTreeWalker) + NS_INTERFACE_MAP_ENTRY(nsISupports) + NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(TreeWalker) +NS_INTERFACE_MAP_END + +NS_IMPL_ADDREF(nsTreeWalker) +NS_IMPL_RELEASE(nsTreeWalker) + +/* + * nsIDOMTreeWalker Getters/Setters + */ + +/* readonly attribute nsIDOMNode root; */ +NS_IMETHODIMP nsTreeWalker::GetRoot(nsIDOMNode * *aRoot) +{ + NS_ENSURE_ARG_POINTER(aRoot); + *aRoot = mRoot; + NS_IF_ADDREF(*aRoot); + return NS_OK; +} + +/* readonly attribute unsigned long whatToShow; */ +NS_IMETHODIMP nsTreeWalker::GetWhatToShow(PRUint32 *aWhatToShow) +{ + *aWhatToShow = mWhatToShow; + return NS_OK; +} + +/* readonly attribute nsIDOMNodeFilter filter; */ +NS_IMETHODIMP nsTreeWalker::GetFilter(nsIDOMNodeFilter * *aFilter) +{ + NS_ENSURE_ARG_POINTER(aFilter); + *aFilter = mFilter; + NS_IF_ADDREF(*aFilter); + return NS_OK; +} + +/* readonly attribute boolean expandEntityReferences; */ +NS_IMETHODIMP nsTreeWalker::GetExpandEntityReferences(PRBool *aExpandEntityReferences) +{ + *aExpandEntityReferences = mExpandEntityReferences; + return NS_OK; +} + +/* attribute nsIDOMNode currentNode; */ +NS_IMETHODIMP nsTreeWalker::GetCurrentNode(nsIDOMNode * *aCurrentNode) +{ + NS_ENSURE_ARG_POINTER(aCurrentNode); + *aCurrentNode = mCurrentNode; + NS_IF_ADDREF(*aCurrentNode); + return NS_OK; +} +NS_IMETHODIMP nsTreeWalker::SetCurrentNode(nsIDOMNode * aCurrentNode) +{ + if (!aCurrentNode) + return NS_ERROR_DOM_NOT_SUPPORTED_ERR; + mCurrentNode = aCurrentNode; + return NS_OK; +} + +/* + * nsIDOMTreeWalker functions + */ + +/* nsIDOMNode parentNode (); */ +NS_IMETHODIMP nsTreeWalker::ParentNode(nsIDOMNode **_retval) +{ + NS_ENSURE_ARG_POINTER(_retval); + + nsCOMPtr node(mCurrentNode); + nsresult rv; + + while (node && node != mRoot) { + nsCOMPtr tmp(node); + rv = tmp->GetParentNode(getter_AddRefs(node)); + NS_ENSURE_SUCCESS(rv, rv); + + if (node) { + PRInt16 filtered; + rv = TestNode(node, &filtered); + NS_ENSURE_SUCCESS(rv, rv); + if (filtered == nsIDOMNodeFilter::FILTER_ACCEPT) { + mCurrentNode = node; + *_retval = node; + NS_ADDREF(*_retval); + + return NS_OK; + } + } + } + + *_retval = nsnull; + return NS_OK; +} + +/* nsIDOMNode firstChild (); */ +NS_IMETHODIMP nsTreeWalker::FirstChild(nsIDOMNode **_retval) +{ + NS_ENSURE_ARG_POINTER(_retval); + return FirstChildOf(mCurrentNode, PR_FALSE, _retval); +} + +/* nsIDOMNode lastChild (); */ +NS_IMETHODIMP nsTreeWalker::LastChild(nsIDOMNode **_retval) +{ + NS_ENSURE_ARG_POINTER(_retval); + return FirstChildOf(mCurrentNode, PR_TRUE, _retval); +} + +/* nsIDOMNode previousSibling (); */ +NS_IMETHODIMP nsTreeWalker::PreviousSibling(nsIDOMNode **_retval) +{ + NS_ENSURE_ARG_POINTER(_retval); + return NextSiblingOf(mCurrentNode, PR_TRUE, _retval); +} + +/* nsIDOMNode nextSibling (); */ +NS_IMETHODIMP nsTreeWalker::NextSibling(nsIDOMNode **_retval) +{ + NS_ENSURE_ARG_POINTER(_retval); + return NextSiblingOf(mCurrentNode, PR_FALSE, _retval); +} + +/* nsIDOMNode previousNode (); */ +NS_IMETHODIMP nsTreeWalker::PreviousNode(nsIDOMNode **_retval) +{ + NS_ENSURE_ARG_POINTER(_retval); + return NextInDocumentOrderOf(mCurrentNode, PR_TRUE, _retval); +} + +/* nsIDOMNode nextNode (); */ +NS_IMETHODIMP nsTreeWalker::NextNode(nsIDOMNode **_retval) +{ + NS_ENSURE_ARG_POINTER(_retval); + return NextInDocumentOrderOf(mCurrentNode, PR_FALSE, _retval); +} + +/* + * nsTreeWalker helper functions + */ + +/* + * Tests if and how a node should be filtered. Uses mWhatToShow and + * mFilter to test the node. + * @param aNode Node to test + * @param _filtered Returned filtervalue. See nsIDOMNodeFilter.idl + */ +nsresult nsTreeWalker::TestNode(nsIDOMNode* aNode, PRInt16* _filtered) +{ + nsresult rv; + PRUint16 nodeType; + PRUint32 mask = 1; + + rv = aNode->GetNodeType(&nodeType); + NS_ENSURE_SUCCESS(rv, rv); + + if (nodeType <= 12 && !((mask << (nodeType-1)) & mWhatToShow)) { + *_filtered = nsIDOMNodeFilter::FILTER_SKIP; + + return NS_OK; + } + + if (mFilter) + return mFilter->AcceptNode(aNode, _filtered); + + *_filtered = nsIDOMNodeFilter::FILTER_ACCEPT; + return NS_OK; +} + +/* + * Finds the first child of aNode and returns it. If a child is + * found, mCurrentNode is set to that child. + * @param aNode Node to search for children. + * @param aReversed Reverses search to find the last child instead + * of first. + * @param _retval Returned node. Null if no child is found + * @returns Errorcode + */ +nsresult +nsTreeWalker::FirstChildOf(nsIDOMNode* aNode, + PRBool aReversed, + nsIDOMNode** _retval) +{ + nsCOMPtr children; + PRUint32 len; + PRInt16 filtered; + nsresult rv; + + // Don't step into entity references if expandEntityReferences = false + if (!mExpandEntityReferences) { + PRUint16 nodeType; + rv = aNode->GetNodeType(&nodeType); + NS_ENSURE_SUCCESS(rv, rv); + + if (nodeType == nsIDOMNode::ENTITY_REFERENCE_NODE) { + *_retval = nsnull; + + return NS_OK; + } + } + + // Get childlist to step through + rv = aNode->GetChildNodes(getter_AddRefs(children)); + NS_ENSURE_SUCCESS(rv, rv); + NS_ASSERTION(children, "GetChildNodes returned nonexisting nodelist"); + + rv = children->GetLength(&len); + NS_ENSURE_SUCCESS(rv, rv); + + PRInt32 dir, start, end; + if (!aReversed) { + dir = 1; + start = 0; + end = len; + } + else { + dir = -1; + start = len-1; + end = -1; + } + + // Step through all children + PRInt32 i; + for (i = start; i != end; i += dir) { + nsCOMPtr child; + rv = children->Item((PRUint32)i, getter_AddRefs(child)); + NS_ENSURE_SUCCESS(rv, rv); + + rv = TestNode(child, &filtered); + NS_ENSURE_SUCCESS(rv, rv); + + switch (filtered) { + case nsIDOMNodeFilter::FILTER_ACCEPT: + // Child found + mCurrentNode = child; + *_retval = child; + NS_ADDREF(*_retval); + + return NS_OK; + + case nsIDOMNodeFilter::FILTER_SKIP: + // Search children + rv = FirstChildOf(child, aReversed, _retval); + NS_ENSURE_SUCCESS(rv, rv); + + if (*_retval) + return NS_OK; + break; + + case nsIDOMNodeFilter::FILTER_REJECT: + // Keep searching + break; + + default: + return NS_ERROR_UNEXPECTED; + } + } + + *_retval = nsnull; + return NS_OK; +} + +/* + * Finds the following sibling of aNode and returns it. If a sibling + * is found, mCurrentNode is set to that node. + * @param aNode Node to start search at. + * @param aReversed Reverses search to find the previous sibling + * instead of next. + * @param _retval Returned node. Null if no sibling is found + * @returns Errorcode + */ +nsresult +nsTreeWalker::NextSiblingOf(nsIDOMNode* aNode, + PRBool aReversed, + nsIDOMNode** _retval) +{ + nsresult rv; + nsCOMPtr node(aNode); + PRInt16 filtered; + + while (1) { + nsCOMPtr current(node); + + // Loop siblings + if (!aReversed) + rv = current->GetNextSibling(getter_AddRefs(node)); + else + rv = current->GetPreviousSibling(getter_AddRefs(node)); + NS_ENSURE_SUCCESS(rv, rv); + + while (node) { + rv = TestNode(node, &filtered); + NS_ENSURE_SUCCESS(rv, rv); + + switch (filtered) { + case nsIDOMNodeFilter::FILTER_ACCEPT: + // Sibling found + mCurrentNode = node; + *_retval = node; + NS_ADDREF(*_retval); + + return NS_OK; + + case nsIDOMNodeFilter::FILTER_SKIP: + // Search children + rv = FirstChildOf(node, aReversed, _retval); + NS_ENSURE_SUCCESS(rv, rv); + + if (*_retval) + return NS_OK; + break; + + case nsIDOMNodeFilter::FILTER_REJECT: + // Keep searching + break; + + default: + return NS_ERROR_UNEXPECTED; + } + + current = node; + if (!aReversed) + rv = current->GetNextSibling(getter_AddRefs(node)); + else + rv = current->GetPreviousSibling(getter_AddRefs(node)); + NS_ENSURE_SUCCESS(rv, rv); + } + + // Try to get parent + rv = current->GetParentNode(getter_AddRefs(node)); + NS_ENSURE_SUCCESS(rv, rv); + if (!node || node == mRoot) + break; + + // Is parent transparent in filtered view? + rv = TestNode(node, &filtered); + NS_ENSURE_SUCCESS(rv, rv); + if (filtered == nsIDOMNodeFilter::FILTER_ACCEPT) + break; + } + + *_retval = nsnull; + return NS_OK; +} + +/* + * Finds the next node in document order of aNode and returns it. + * If a node is found, mCurrentNode is set to that node. + * @param aNode Node to start search at. + * @param aReversed Reverses search to find the preceding node + * instead of next. + * @param _retval Returned node. Null if no node is found + * @returns Errorcode + */ +nsresult +nsTreeWalker::NextInDocumentOrderOf(nsIDOMNode* aNode, + PRBool aReversed, + nsIDOMNode** _retval) +{ + nsresult rv; + nsCOMPtr node(aNode); + PRInt16 filtered; + + while (1) { + nsCOMPtr current(node); + + // Loop siblings + if (!aReversed) + rv = current->GetNextSibling(getter_AddRefs(node)); + else + rv = current->GetPreviousSibling(getter_AddRefs(node)); + NS_ENSURE_SUCCESS(rv, rv); + + while (node) { + rv = TestNode(node, &filtered); + NS_ENSURE_SUCCESS(rv, rv); + + switch (filtered) { + case nsIDOMNodeFilter::FILTER_ACCEPT: + // Sibling found. + if (aReversed) { + // If reversed search we first + // check if it has a child... + rv = FirstChildOf(node, PR_TRUE, _retval); + NS_ENSURE_SUCCESS(rv, rv); + + if (*_retval) + return NS_OK; + } + + // ...else we return the sibling + mCurrentNode = node; + *_retval = node; + NS_ADDREF(*_retval); + + return NS_OK; + + case nsIDOMNodeFilter::FILTER_SKIP: + // Search children + rv = FirstChildOf(node, aReversed, _retval); + NS_ENSURE_SUCCESS(rv, rv); + + if (*_retval) + return NS_OK; + break; + + case nsIDOMNodeFilter::FILTER_REJECT: + // Keep searching + break; + + default: + return NS_ERROR_UNEXPECTED; + } + + current = node; + if (!aReversed) + rv = current->GetNextSibling(getter_AddRefs(node)); + else + rv = current->GetPreviousSibling(getter_AddRefs(node)); + NS_ENSURE_SUCCESS(rv, rv); + } + + // Try to get parent + rv = current->GetParentNode(getter_AddRefs(node)); + NS_ENSURE_SUCCESS(rv, rv); + if (!node || node == mRoot) + break; + + if (aReversed) { + // Is parent transparent in filtered view? + rv = TestNode(node, &filtered); + NS_ENSURE_SUCCESS(rv, rv); + if (filtered == nsIDOMNodeFilter::FILTER_ACCEPT) { + mCurrentNode = node; + *_retval = node; + NS_ADDREF(*_retval); + + return NS_OK; + } + } + } + + *_retval = nsnull; + return NS_OK; +} diff --git a/mozilla/content/base/src/nsTreeWalker.h b/mozilla/content/base/src/nsTreeWalker.h new file mode 100644 index 00000000000..69e2ff9c3fc --- /dev/null +++ b/mozilla/content/base/src/nsTreeWalker.h @@ -0,0 +1,122 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * 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 this file as it was released on + * May 1 2001. + * + * The Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001 + * Jonas Sicking. All Rights Reserved. + * + * Contributor(s): + * Jonas Sicking (Original Author) + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + * + */ + +#ifndef nsTreeWalker_h___ +#define nsTreeWalker_h___ + +/* + * nsTreeWalker.h: interface of the nsTreeWalker object. + */ + +#include "nsIDOMNode.h" +#include "nsIDOMTreeWalker.h" +#include "nsIDOMNodeFilter.h" +#include "nsCOMPtr.h" + +class nsTreeWalker : public nsIDOMTreeWalker +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMTREEWALKER + + nsTreeWalker(nsIDOMNode *root, + PRUint32 whatToShow, + nsIDOMNodeFilter *filter, + PRBool expandEntityReferences); + virtual ~nsTreeWalker(); + /* additional members */ +private: + nsCOMPtr mRoot; + PRUint32 mWhatToShow; + nsCOMPtr mFilter; + PRBool mExpandEntityReferences; + nsCOMPtr mCurrentNode; + + /* + * Tests if and how a node should be filtered. Uses mWhatToShow and + * mFilter to test the node. + * @param aNode Node to test + * @param _filtered Returned filtervalue. See nsIDOMNodeFilter.idl + */ + nsresult TestNode(nsIDOMNode* aNode, PRInt16* _filtered); + + /* + * Finds the first child of aNode and returns it. If a child is + * found, mCurrentNode is set to that child. + * @param aNode Node to search for children. + * @param aReversed Reverses search to find the last child instead + * of first. + * @param _retval Returned node. Null if no child is found + * @returns Errorcode + */ + nsresult FirstChildOf(nsIDOMNode* aNode, + PRBool aReversed, + nsIDOMNode** _retval); + + /* + * Finds the following sibling of aNode and returns it. If a sibling + * is found, mCurrentNode is set to that node. + * @param aNode Node to start search at. + * @param aReversed Reverses search to find the previous sibling + * instead of next. + * @param _retval Returned node. Null if no sibling is found + * @returns Errorcode + */ + nsresult NextSiblingOf(nsIDOMNode* aNode, + PRBool aReversed, + nsIDOMNode** _retval); + /* + * Finds the next node in document order of aNode and returns it. + * If a node is found, mCurrentNode is set to that node. + * @param aNode Node to start search at. + * @param aReversed Reverses search to find the preceding node + * instead of next. + * @param _retval Returned node. Null if no node is found + * @returns Errorcode + */ + nsresult NextInDocumentOrderOf(nsIDOMNode* aNode, + PRBool aReversed, + nsIDOMNode** _retval); +}; + +// Make a new nsIDOMTreeWalker object +nsresult NS_NewTreeWalker(nsIDOMNode *root, + PRUint32 whatToShow, + nsIDOMNodeFilter *filter, + PRBool entityReferenceExpansion, + nsIDOMTreeWalker **aInstancePtrResult); + +#endif \ No newline at end of file diff --git a/mozilla/content/build/Makefile.in b/mozilla/content/build/Makefile.in index 9d81c0a77bc..afd96bc21b2 100644 --- a/mozilla/content/build/Makefile.in +++ b/mozilla/content/build/Makefile.in @@ -84,6 +84,12 @@ endif include $(topsrcdir)/config/rules.mk +ifeq ($(OS_ARCH),IRIX) +ifeq ($(GNU_CXX),1) +LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=50 +endif +endif + DEFINES += -D_IMPL_NS_HTML INCLUDES += -I$(srcdir)/../base/src \ diff --git a/mozilla/content/build/nsContentDLF.cpp b/mozilla/content/build/nsContentDLF.cpp index 586d823e248..6a9448dd2c3 100644 --- a/mozilla/content/build/nsContentDLF.cpp +++ b/mozilla/content/build/nsContentDLF.cpp @@ -323,7 +323,7 @@ nsContentDLF::CreateInstanceForDocument(nsISupports* aContainer, docv->SetUAStyleSheet(nsContentDLF::GetUAStyleSheet()); // Bind the document to the Content Viewer - rv = docv->BindToDocument(aDocument, aCommand); + rv = docv->LoadStart(aDocument); *aDocViewerResult = docv; NS_IF_ADDREF(*aDocViewerResult); } while (PR_FALSE); @@ -379,7 +379,7 @@ nsContentDLF::CreateDocument(const char* aCommand, break; // Bind the document to the Content Viewer - rv = docv->BindToDocument(doc, aCommand); + rv = docv->LoadStart(doc); *aDocViewer = docv; NS_IF_ADDREF(*aDocViewer); } while (PR_FALSE); @@ -470,7 +470,7 @@ nsContentDLF::CreateRDFDocument(const char* aCommand, /* * Bind the document to the Content Viewer... */ - rv = docv->BindToDocument(doc, aCommand); + rv = docv->LoadStart(doc); *aDocViewer = docv; NS_IF_ADDREF(*aDocViewer); } @@ -495,7 +495,7 @@ nsContentDLF::CreateXULDocumentFromStream(nsIInputStream& aXULStream, if ( NS_FAILED(status = CreateRDFDocument(aExtraInfo, address_of(doc), address_of(docv))) ) break; - if ( NS_FAILED(status = docv->BindToDocument(doc, aCommand)) ) + if ( NS_FAILED(status = docv->LoadStart(doc)) ) break; *aDocViewer = docv; diff --git a/mozilla/content/html/content/src/nsHTMLImageElement.cpp b/mozilla/content/html/content/src/nsHTMLImageElement.cpp index 0c2a71aa342..1384b6ff320 100644 --- a/mozilla/content/html/content/src/nsHTMLImageElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLImageElement.cpp @@ -638,9 +638,12 @@ nsHTMLImageElement::GetCallerSourceURL(nsIURI** sourceURL) if (NS_FAILED(result)) return NS_ERROR_FAILURE; - JSContext *cx; + JSContext *cx = nsnull; - if (NS_FAILED(stack->Peek(&cx))) + // it's possible that there is not a JSContext on the stack. + // specifically this can happen when the DOM is being manipulated + // from native (non-JS) code. + if (NS_FAILED(stack->Peek(&cx)) || !cx) return NS_ERROR_FAILURE; nsCOMPtr global; @@ -1054,7 +1057,7 @@ nsHTMLImageElement::SetSrc(const nsAReadableString& aSrc) nsCOMPtr baseURL; nsresult result = NS_OK; - GetCallerSourceURL(getter_AddRefs(baseURL)); + (void) GetCallerSourceURL(getter_AddRefs(baseURL)); if (mDocument && !baseURL) { result = mDocument->GetBaseURL(*getter_AddRefs(baseURL)); diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 2409c71ddcb..58746db78b1 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -1582,6 +1582,16 @@ SinkContext::DemoteContainer(const nsIParserNode& aNode) } } + // Suspend script processing while we move children around. + // We don't want to re-evaluate scripts as a result of the move. + nsCOMPtr loader; + if (mSink && mSink->mDocument) { + mSink->mDocument->GetScriptLoader(getter_AddRefs(loader)); + if (loader) { + loader->Suspend(); + } + } + if (NS_SUCCEEDED(result)) { // Move all of the demoted containers children to its parent PRInt32 i, count; @@ -1639,6 +1649,10 @@ SinkContext::DemoteContainer(const nsIParserNode& aNode) mStackPos--; } + if (loader) { + loader->Resume(); + } + // Restore frames state after adding it to new parent if (frameManager && presContext && tempFrameState && frame) { presShell->GetPrimaryFrameFor(parent, &frame); @@ -4592,67 +4606,76 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode) nsresult rv = NS_OK; nsIHTMLContent* parent = nsnull; - if(mCurrentContext!=nsnull) { - parent=mCurrentContext->mStack[mCurrentContext->mStackPos-1].mContent; + if (mCurrentContext) { + parent = mCurrentContext->mStack[mCurrentContext->mStackPos - 1].mContent; } - if(parent!=nsnull) { + if (parent) { // Create content object - nsIHTMLContent* element = nsnull; + nsCOMPtr element; + nsCOMPtr ssle; nsCOMPtr nodeInfo; mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::style, nsnull, kNameSpaceID_None, *getter_AddRefs(nodeInfo)); - rv = NS_CreateHTMLElement(&element, nodeInfo, PR_FALSE); + rv = NS_CreateHTMLElement(getter_AddRefs(element), nodeInfo, PR_FALSE); if (NS_SUCCEEDED(rv)) { PRInt32 id; mDocument->GetAndIncrementContentID(&id); element->SetContentID(id); + ssle = do_QueryInterface(element); + + if (ssle) { + // XXX need prefs. check here. + if (!mInsideNoXXXTag) { + ssle->InitStyleLinkElement(mParser, PR_FALSE); + } + else { + ssle->InitStyleLinkElement(mParser, PR_TRUE); + } + ssle->SetEnableUpdates(PR_FALSE); + } + // Add in the attributes and add the style content object to the // head container. element->SetDocument(mDocument, PR_FALSE, PR_TRUE); rv = AddAttributes(aNode, element); if (NS_FAILED(rv)) { - NS_RELEASE(element); return rv; } parent->AppendChildTo(element, PR_FALSE, PR_FALSE); + + if (ssle) { + ssle->SetEnableUpdates(PR_TRUE); + rv = ssle->UpdateStyleSheet(PR_TRUE, mDocument, mStyleSheetCount); + if (NS_SUCCEEDED(rv) || (rv == NS_ERROR_HTMLPARSER_BLOCK)) + mStyleSheetCount++; + } } - if(!mInsideNoXXXTag && NS_SUCCEEDED(rv)) { + nsAutoString src; + element->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::src, src); + src.StripWhitespace(); + if (!mInsideNoXXXTag && NS_SUCCEEDED(rv) && src.IsEmpty()) { PRInt32 i, count = aNode.GetAttributeCount(); - nsAutoString src; nsAutoString title; nsAutoString type; nsAutoString media; - for (i = 0; i < count; i++) { - nsAutoString key(aNode.GetKeyAt(i)); - if (key.EqualsIgnoreCase("src")) { - GetAttributeValueAt(aNode, i, src); - src.StripWhitespace(); - } - else if (key.EqualsIgnoreCase("title")) { - GetAttributeValueAt(aNode, i, title); - title.CompressWhitespace(); - } - else if (key.EqualsIgnoreCase("type")) { - GetAttributeValueAt(aNode, i, type); - type.StripWhitespace(); - } - else if (key.EqualsIgnoreCase("media")) { - GetAttributeValueAt(aNode, i, media); - media.ToLowerCase(); // HTML4.0 spec is inconsistent, make it case INSENSITIVE - } - } + element->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::title, title); + title.CompressWhitespace(); + element->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::type, type); - nsAutoString mimeType; - nsAutoString params; + element->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::media, media); + media.ToLowerCase(); // HTML4.0 spec is inconsistent, make it case INSENSITIVE + + nsAutoString mimeType; + nsAutoString params; nsStyleLinkElement::SplitMimeType(type, mimeType, params); PRBool blockParser = kBlockByDefault; @@ -4670,64 +4693,39 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode) const nsString& content = aNode.GetSkippedContent(); PRBool doneLoading = PR_FALSE; - nsIUnicharInputStream* uin = nsnull; - if (src.IsEmpty()) { + nsCOMPtr uin; - // Create a text node holding the content - nsIContent* text; - rv = NS_NewTextNode(&text); + // Create a text node holding the content + nsCOMPtr text; + rv = NS_NewTextNode(getter_AddRefs(text)); + if (NS_OK == rv) { + nsCOMPtr tc = do_QueryInterface(text, &rv); if (NS_OK == rv) { - nsIDOMText* tc; - rv = text->QueryInterface(NS_GET_IID(nsIDOMText), (void**)&tc); - if (NS_OK == rv) { - tc->SetData(content); - NS_RELEASE(tc); - } - element->AppendChildTo(text, PR_FALSE, PR_FALSE); - text->SetDocument(mDocument, PR_FALSE, PR_TRUE); - NS_RELEASE(text); + tc->SetData(content); } - - // Create a string to hold the data and wrap it up in a unicode - // input stream. - rv = NS_NewStringUnicharInputStream(&uin, new nsString(content)); - if (NS_OK != rv) { - return rv; - } - - // Now that we have a url and a unicode input stream, parse the - // style sheet. - rv = mCSSLoader->LoadInlineStyle(element, uin, title, media, kNameSpaceID_Unknown, - mStyleSheetCount++, - ((blockParser) ? mParser : nsnull), - doneLoading, this); - NS_RELEASE(uin); - } - else { - // src with immediate style data doesn't add up - // XXX what does nav do? - // Use the SRC attribute value to load the URL - nsIURI* url = nsnull; - { - rv = NS_NewURI(&url, src, mDocumentBaseURL); - } - if (NS_OK != rv) { - return rv; - } - - rv = mCSSLoader->LoadStyleLink(element, url, title, media, kNameSpaceID_Unknown, - mStyleSheetCount++, - ((blockParser) ? mParser : nsnull), - doneLoading, this); - NS_RELEASE(url); + element->AppendChildTo(text, PR_FALSE, PR_FALSE); + text->SetDocument(mDocument, PR_FALSE, PR_TRUE); } - if (NS_SUCCEEDED(rv) && blockParser && (! doneLoading)) { + + // Create a string to hold the data and wrap it up in a unicode + // input stream. + rv = NS_NewStringUnicharInputStream(getter_AddRefs(uin), new nsString(content)); + if (NS_OK != rv) { + return rv; + } + + // Now that we have a url and a unicode input stream, parse the + // style sheet. + rv = mCSSLoader->LoadInlineStyle(element, uin, title, media, kNameSpaceID_Unknown, + mStyleSheetCount++, + ((blockParser) ? mParser : nsnull), + doneLoading, this); + if (NS_SUCCEEDED(rv) && blockParser && (!doneLoading)) { rv = NS_ERROR_HTMLPARSER_BLOCK; } }//if (mimeType.IsEmpty() || mimeType.Equals(NS_LITERAL_STRING("text/css"))) - }//if(!mInsideNoXXXTag && NS_SUCCEEDED(rv)) - NS_RELEASE(element); - }//if(parent!=nsnull) + }//if (!mInsideNoXXXTag && NS_SUCCEEDED(rv) && src.IsEmpty()) + }//if (parent) return rv; } diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 3fa04186389..e75331d0143 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -111,6 +111,7 @@ #include "nsHTMLParts.h" //for createelementNS #include "nsIJSContextStack.h" #include "nsContentUtils.h" +#include "nsIDocumentViewer.h" #include "nsContentCID.h" #include "nsIPrompt.h" @@ -211,6 +212,7 @@ nsHTMLDocument::nsHTMLDocument() mParser = nsnull; mDTDMode = eDTDMode_quirks; mCSSLoader = nsnull; + mDocWriteDummyRequest = nsnull; mBodyContent = nsnull; mForms = nsnull; @@ -238,8 +240,6 @@ nsHTMLDocument::nsHTMLDocument() nsHTMLDocument::~nsHTMLDocument() { - PRInt32 i; - NS_IF_RELEASE(mImages); NS_IF_RELEASE(mApplets); NS_IF_RELEASE(mEmbeds); @@ -268,10 +268,7 @@ nsHTMLDocument::~nsHTMLDocument() mReferrer = nsnull; } NS_IF_RELEASE(mParser); - for (i = 0; i < mImageMaps.Count(); i++) { - nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i); - NS_RELEASE(map); - } + mImageMaps.Clear(); NS_IF_RELEASE(mForms); if (mCSSLoader) { mCSSLoader->DropDocumentReference(); // release weak ref @@ -327,8 +324,6 @@ nsHTMLDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) return result; } - PRInt32 i; - InvalidateHashTables(); PrePopulateHashTables(); @@ -339,10 +334,7 @@ nsHTMLDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) NS_IF_RELEASE(mAnchors); NS_IF_RELEASE(mLayers); - for (i = 0; i < mImageMaps.Count(); i++) { - nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i); - NS_RELEASE(map); - } + mImageMaps.Clear(); NS_IF_RELEASE(mForms); if (aURL) { @@ -376,6 +368,9 @@ nsHTMLDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) } } + NS_ASSERTION(mDocWriteDummyRequest == nsnull, "nsHTMLDocument::Reset() - dummy doc write request still exists!"); + mDocWriteDummyRequest = nsnull; + return result; } @@ -922,7 +917,6 @@ nsHTMLDocument::AddImageMap(nsIDOMHTMLMapElement* aMap) return NS_ERROR_NULL_POINTER; } if (mImageMaps.AppendElement(aMap)) { - NS_ADDREF(aMap); return NS_OK; } return NS_ERROR_OUT_OF_MEMORY; @@ -935,9 +929,7 @@ nsHTMLDocument::RemoveImageMap(nsIDOMHTMLMapElement* aMap) if (nsnull == aMap) { return NS_ERROR_NULL_POINTER; } - if (mImageMaps.RemoveElement((void*)aMap)) { - NS_RELEASE(aMap); - } + mImageMaps.RemoveElement(aMap, 0); return NS_OK; } @@ -951,13 +943,15 @@ nsHTMLDocument::GetImageMap(const nsString& aMapName, } nsAutoString name; - PRInt32 i, n = mImageMaps.Count(); + PRUint32 i, n; + mImageMaps.Count(&n); for (i = 0; i < n; i++) { - nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i); - if (NS_OK == map->GetName(name)) { + nsCOMPtr map; + mImageMaps.QueryElementAt(i, NS_GET_IID(nsIDOMHTMLMapElement), getter_AddRefs(map)); + if (map && NS_SUCCEEDED(map->GetName(name))) { if (name.EqualsIgnoreCase(aMapName)) { *aResult = map; - NS_ADDREF(map); + NS_ADDREF(*aResult); return NS_OK; } } @@ -2054,13 +2048,14 @@ nsHTMLDocument::GetSourceDocumentURL(JSContext* cx, nsresult nsHTMLDocument::OpenCommon(nsIURI* aSourceURL) { + nsCOMPtr docshell; + // If we already have a parser we ignore the document.open call. if (mParser) return NS_OK; // Stop current loads targetted at the window this document is in. if (mScriptGlobalObject) { - nsCOMPtr docshell; mScriptGlobalObject->GetDocShell(getter_AddRefs(docshell)); if (docshell) { @@ -2076,6 +2071,7 @@ nsHTMLDocument::OpenCommon(nsIURI* aSourceURL) nsCOMPtr group = do_QueryReferent(mDocumentLoadGroup); result = NS_OpenURI(getter_AddRefs(channel), aSourceURL, nsnull, group); + if (NS_FAILED(result)) return result; //Before we reset the doc notify the globalwindow of the change. @@ -2189,6 +2185,21 @@ nsHTMLDocument::OpenCommon(nsIURI* aSourceURL) } } + // Prepare the docshell and the document viewer for the impending out of band document.write() + if (docshell) { + docshell->PrepareForNewContentModel(); + nsCOMPtr cv; + docshell->GetContentViewer(getter_AddRefs(cv)); + nsCOMPtr docViewer = do_QueryInterface(cv); + if (docViewer) { + docViewer->LoadStart(NS_STATIC_CAST(nsIHTMLDocument *, this)); + } + } + + // Add a doc write dummy request into the document load group + NS_ASSERTION(mDocWriteDummyRequest == nsnull, "nsHTMLDocument::OpenCommon(): doc write dummy request exists!"); + AddDocWriteDummyRequest(); + return result; } @@ -2260,6 +2271,27 @@ nsHTMLDocument::Close() mWriteLevel--; mIsWriting = 0; NS_IF_RELEASE(mParser); + + // XXX Make sure that all the document.written content is reflowed. + // We should remove this call once we change nsHTMLDocument::OpenCommon() so that it + // completely destroys the earlier document's content and frame hierarchy. Right now, + // it re-uses the earlier document's root content object and corresponding frame objects. + // These re-used frame objects think that they have already been reflowed, so they drop + // initial reflows. For certain cases of document.written content, like a frameset document, + // the dropping of the initial reflow means that we end up in document.close() without + // appended any reflow commands to the reflow queue and, consequently, without adding the + // dummy layout request to the load group. Since the dummy layout request is not added to + // the load group, the onload handler of the frameset fires before the frames get reflowed + // and loaded. That is the long explanation for why we need this one line of code here! + FlushPendingNotifications(); + + // Remove the doc write dummy request from the document load group + // that we added in OpenCommon(). If all other requests between + // document.open() and document.close() have completed, then this + // method should cause the firing of an onload event. + NS_ASSERTION(mDocWriteDummyRequest, "nsHTMLDocument::Close(): Trying to remove non-existent doc write dummy request!"); + RemoveDocWriteDummyRequest(); + NS_ASSERTION(mDocWriteDummyRequest == nsnull, "nsHTMLDocument::Close(): Doc write dummy request could not be removed!"); } return NS_OK; @@ -3507,3 +3539,159 @@ nsHTMLDocument::GetForms(nsIDOMHTMLCollection** aForms) return NS_OK; } +//---------------------------------------------------------------------- +// +// DocWriteDummyRequest +// +// This is a dummy request implementation that is used to make sure that +// the onload event fires for document.writes that occur after the document +// has finished loading. Since such document.writes() blow away the old document +// we need some way to generate document load notifications for the content that +// is document.written. The addition and removal of the dummy request generates +// the appropriate load notifications which bubble up through a chain of observers +// till the document viewer's LoadComplete() method which fires the onLoad event. +// + +class DocWriteDummyRequest : public nsIChannel +{ +protected: + DocWriteDummyRequest(); + virtual ~DocWriteDummyRequest(); + + static PRInt32 gRefCnt; + + nsCOMPtr mURI; + nsLoadFlags mLoadFlags; + nsCOMPtr mLoadGroup; + +public: + static nsresult + Create(nsIRequest** aResult); + + NS_DECL_ISUPPORTS + + // nsIRequest + NS_IMETHOD GetName(PRUnichar* *result) { + *result = ToNewUnicode(NS_LITERAL_STRING("about:dummy-doc-write-request")); + return NS_OK; + } + NS_IMETHOD IsPending(PRBool *_retval) { *_retval = PR_TRUE; return NS_OK; } + NS_IMETHOD GetStatus(nsresult *status) { *status = NS_OK; return NS_OK; } + NS_IMETHOD Cancel(nsresult status); + NS_IMETHOD Suspend(void) { return NS_OK; } + NS_IMETHOD Resume(void) { return NS_OK; } + + // nsIChannel + NS_IMETHOD GetOriginalURI(nsIURI* *aOriginalURI) { *aOriginalURI = mURI; NS_ADDREF(*aOriginalURI); return NS_OK; } + NS_IMETHOD SetOriginalURI(nsIURI* aOriginalURI) { mURI = aOriginalURI; return NS_OK; } + NS_IMETHOD GetURI(nsIURI* *aURI) { *aURI = mURI; NS_ADDREF(*aURI); return NS_OK; } + NS_IMETHOD Open(nsIInputStream **_retval) { *_retval = nsnull; return NS_OK; } + NS_IMETHOD AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt) { return NS_OK; } + NS_IMETHOD GetLoadFlags(nsLoadFlags *aLoadFlags) { *aLoadFlags = mLoadFlags; return NS_OK; } + NS_IMETHOD SetLoadFlags(nsLoadFlags aLoadFlags) { mLoadFlags = aLoadFlags; return NS_OK; } + NS_IMETHOD GetOwner(nsISupports * *aOwner) { *aOwner = nsnull; return NS_OK; } + NS_IMETHOD SetOwner(nsISupports * aOwner) { return NS_OK; } + NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup) { *aLoadGroup = mLoadGroup; NS_IF_ADDREF(*aLoadGroup); return NS_OK; } + NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup) { mLoadGroup = aLoadGroup; return NS_OK; } + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { *aNotificationCallbacks = nsnull; return NS_OK; } + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return NS_OK; } + NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) { *aSecurityInfo = nsnull; return NS_OK; } + NS_IMETHOD GetContentType(char * *aContentType) { *aContentType = nsnull; return NS_OK; } + NS_IMETHOD SetContentType(const char * aContentType) { return NS_OK; } + NS_IMETHOD GetContentLength(PRInt32 *aContentLength) { return NS_OK; } + NS_IMETHOD SetContentLength(PRInt32 aContentLength) { return NS_OK; } + +}; + +PRInt32 DocWriteDummyRequest::gRefCnt; + +NS_IMPL_ADDREF(DocWriteDummyRequest); +NS_IMPL_RELEASE(DocWriteDummyRequest); +NS_IMPL_QUERY_INTERFACE2(DocWriteDummyRequest, nsIRequest, nsIChannel); + +nsresult +DocWriteDummyRequest::Create(nsIRequest** aResult) +{ + DocWriteDummyRequest* request = new DocWriteDummyRequest(); + if (!request) + return NS_ERROR_OUT_OF_MEMORY; + + return request->QueryInterface(NS_GET_IID(nsIRequest), (void**) aResult); +} + + +DocWriteDummyRequest::DocWriteDummyRequest() +{ + NS_INIT_REFCNT(); + + gRefCnt++; + mLoadGroup = nsnull; + mLoadFlags = 0; + mURI = nsnull; +} + + +DocWriteDummyRequest::~DocWriteDummyRequest() +{ + gRefCnt--; +} + +NS_IMETHODIMP +DocWriteDummyRequest::Cancel(nsresult status) +{ + // XXX To be implemented? + return NS_OK; +} + +// ---------------------------------------------------------------------------- + +nsresult +nsHTMLDocument::AddDocWriteDummyRequest(void) +{ + nsresult rv = NS_OK; + + rv = DocWriteDummyRequest::Create(getter_AddRefs(mDocWriteDummyRequest)); + if (NS_FAILED(rv)) return rv; + + nsCOMPtr loadGroup; + + rv = GetDocumentLoadGroup(getter_AddRefs(loadGroup)); + if (NS_FAILED(rv)) return rv; + + if (loadGroup) { + nsCOMPtr channel(do_QueryInterface(mDocWriteDummyRequest)); + rv = channel->SetLoadGroup(loadGroup); + if (NS_FAILED(rv)) return rv; + + nsLoadFlags loadFlags = 0; + channel->GetLoadFlags(&loadFlags); + loadFlags |= nsIChannel::LOAD_DOCUMENT_URI; + channel->SetLoadFlags(loadFlags); + + channel->SetOriginalURI(mDocumentURL); + + rv = loadGroup->AddRequest(mDocWriteDummyRequest, nsnull); + if (NS_FAILED(rv)) return rv; + } + + return rv; +} + +nsresult +nsHTMLDocument::RemoveDocWriteDummyRequest(void) +{ + nsresult rv = NS_OK; + + nsCOMPtr loadGroup; + rv = GetDocumentLoadGroup(getter_AddRefs(loadGroup)); + if (NS_FAILED(rv)) return rv; + + if (loadGroup && mDocWriteDummyRequest) { + rv = loadGroup->RemoveRequest(mDocWriteDummyRequest, nsnull, NS_OK); + if (NS_FAILED(rv)) return rv; + + mDocWriteDummyRequest = nsnull; + } + + return rv; +} diff --git a/mozilla/content/html/document/src/nsHTMLDocument.h b/mozilla/content/html/document/src/nsHTMLDocument.h index 4e15845d9f7..4c8ff767363 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.h +++ b/mozilla/content/html/document/src/nsHTMLDocument.h @@ -36,6 +36,12 @@ #include "nsRDFCID.h" #include "nsIRDFService.h" +// Doc write dummy request +#include "nsIChannel.h" +#include "nsILoadGroup.h" +#include "nsNetUtil.h" + + class nsBaseContentList; class nsContentList; class nsIHTMLStyleSheet; @@ -187,6 +193,9 @@ protected: nsresult ScriptWriteCommon(PRBool aNewlineTerminate); nsresult OpenCommon(nsIURI* aUrl); + nsresult AddDocWriteDummyRequest(void); + nsresult RemoveDocWriteDummyRequest(void); + nsIHTMLStyleSheet* mAttrStyleSheet; nsIHTMLCSSStyleSheet* mStyleAttrStyleSheet; nsIURI* mBaseURL; @@ -194,7 +203,7 @@ protected: nsString* mLastModified; nsString* mReferrer; nsDTDMode mDTDMode; - nsVoidArray mImageMaps; + nsSupportsArray mImageMaps; nsContentList *mImages; nsContentList *mApplets; @@ -226,6 +235,7 @@ protected: nsHashtable mNameHashTable; nsHashtable mIdHashTable; + nsCOMPtr mDocWriteDummyRequest; }; #endif /* nsHTMLDocument_h___ */ diff --git a/mozilla/content/html/document/src/nsImageDocument.cpp b/mozilla/content/html/document/src/nsImageDocument.cpp index 83c8157d3c0..6545e4315f0 100644 --- a/mozilla/content/html/document/src/nsImageDocument.cpp +++ b/mozilla/content/html/document/src/nsImageDocument.cpp @@ -498,15 +498,13 @@ nsresult nsImageDocument::UpdateTitle( void ) rv = bundle->FormatStringFromName(key.GetUnicode(), formatStrings, 2, getter_Copies(valUni)); } } - if (!valUni[0]) { + if (!valUni || !valUni[0]) { key.AssignWithConversion("ImageTitleWithoutDimensions"); rv = bundle->GetStringFromName(key.GetUnicode(), getter_Copies(valUni)); } if (NS_SUCCEEDED(rv) && valUni) { - nsString titleStr; - titleStr.Assign(valUni); // set it on the document - SetTitle(titleStr); + SetTitle(nsDependentString(valUni)); } } return NS_OK; diff --git a/mozilla/content/xul/document/src/nsXULPrototypeDocument.cpp b/mozilla/content/xul/document/src/nsXULPrototypeDocument.cpp index 007becaa3ec..bb1bdceb58d 100644 --- a/mozilla/content/xul/document/src/nsXULPrototypeDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULPrototypeDocument.cpp @@ -166,12 +166,6 @@ nsXULPDGlobalObject_finalize(JSContext *cx, JSObject *obj) JSBool PR_CALLBACK nsXULPDGlobalObject_resolve(JSContext *cx, JSObject *obj, jsval id) { - if (JSVAL_IS_STRING(id)) { - JSString *str = JSVAL_TO_STRING(id); - - jschar *s = ::JS_GetStringChars(str); - } - JSBool did_resolve = JS_FALSE; return JS_ResolveStandardClass(cx, obj, id, &did_resolve); @@ -180,7 +174,7 @@ nsXULPDGlobalObject_resolve(JSContext *cx, JSObject *obj, jsval id) JSClass nsXULPDGlobalObject::gSharedGlobalClass = { "nsXULPrototypeScript compilation scope", - JSCLASS_HAS_PRIVATE, + JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_EnumerateStub, nsXULPDGlobalObject_resolve, JS_ConvertStub, nsXULPDGlobalObject_finalize diff --git a/mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c b/mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c index 88e59bf246e..677b7208fe3 100644 --- a/mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c +++ b/mozilla/directory/c-sdk/ldap/libraries/libldap/abandon.c @@ -80,8 +80,8 @@ ldap_abandon_ext( LDAP *ld, int msgid, LDAPControl **serverctrls, return( LDAP_PARAM_ERROR ); } - LDAP_MUTEX_LOCK( ld, LDAP_REQ_LOCK ); LDAP_MUTEX_LOCK( ld, LDAP_CONN_LOCK ); + LDAP_MUTEX_LOCK( ld, LDAP_REQ_LOCK ); rc = do_abandon( ld, msgid, msgid, serverctrls, clientctrls ); /* @@ -89,8 +89,8 @@ ldap_abandon_ext( LDAP *ld, int msgid, LDAPControl **serverctrls, */ ldap_memcache_abandon( ld, msgid ); - LDAP_MUTEX_UNLOCK( ld, LDAP_CONN_LOCK ); LDAP_MUTEX_UNLOCK( ld, LDAP_REQ_LOCK ); + LDAP_MUTEX_UNLOCK( ld, LDAP_CONN_LOCK ); return( rc ); } diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 13dee6861db..6891ff5b0a8 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -178,7 +178,6 @@ nsDocShell::nsDocShell(): mItemType(typeContent), mCurrentScrollbarPref(-1, -1), mDefaultScrollbarPref(-1, -1), - mInitialPageLoad(PR_TRUE), mAllowPlugins(PR_TRUE), mAllowJavascript(PR_TRUE), mAllowMetaRedirects(PR_TRUE), @@ -259,7 +258,7 @@ NS_INTERFACE_MAP_END_THREADSAFE //***************************************************************************** NS_IMETHODIMP nsDocShell::GetInterface(const nsIID & aIID, void **aSink) { - NS_ENSURE_ARG_POINTER(aSink); + NS_ENSURE_ARG_POINTER(aSink); if (aIID.Equals(NS_GET_IID(nsIURIContentListener)) && NS_SUCCEEDED(EnsureContentListener())) { @@ -685,6 +684,17 @@ nsDocShell::StopLoad() } +/* + * Reset state to a new content model within the current document and the document + * viewer. Called by the document before initiating an out of band document.write(). + */ +NS_IMETHODIMP +nsDocShell::PrepareForNewContentModel() +{ + mEODForCurrentDocument = PR_FALSE; + return NS_OK; +} + // // Bug 13871: Prevent frameset spoofing // Check if origin document uri is the equivalent to target's principal. @@ -2359,6 +2369,7 @@ nsDocShell::Destroy() if (mScriptGlobal) { mScriptGlobal->SetDocShell(nsnull); + mScriptGlobal->SetGlobalObjectOwner(nsnull); mScriptGlobal = nsnull; } if (mScriptContext) { @@ -2618,99 +2629,93 @@ NS_IMETHODIMP nsDocShell::SetFocus() { #ifdef DEBUG_DOCSHELL_FOCUS - printf("nsDocShell::SetFocus %p\n", (nsIDocShell*)this); + printf("nsDocShell::SetFocus %p\n", (nsIDocShell*)this); #endif - nsCOMPtr presShell; - nsCOMPtr document; - GetPresShell(getter_AddRefs(presShell)); - if (!presShell) - return NS_ERROR_FAILURE; - - nsCOMPtr presContext; - GetPresContext(getter_AddRefs(presContext)); - if (!presContext) - return NS_ERROR_FAILURE; - - /* Check to make sure the root frame for this document - is not collapsed. */ - nsIFrame* rootFrame; - presShell->GetRootFrame(&rootFrame); - if (!rootFrame) - return NS_ERROR_FAILURE; + nsCOMPtr presShell; + GetPresShell(getter_AddRefs(presShell)); + if (!presShell) + return NS_ERROR_FAILURE; + /* Check to make sure the root frame for this document + is not collapsed. */ + nsIFrame* rootFrame; + presShell->GetRootFrame(&rootFrame); + if (rootFrame) { nsRect frameRect; rootFrame->GetRect(frameRect); if (frameRect.IsEmpty()) { #ifdef DEBUG_bryner - printf("SetFocus: empty frame rect, not accepting focus\n"); + printf("SetFocus: empty frame rect, not accepting focus\n"); #endif - return NS_ERROR_FAILURE; + return NS_ERROR_FAILURE; } + } - nsCOMPtr esm; + nsCOMPtr document; + presShell->GetDocument(getter_AddRefs(document)); + + // Figure out what type of document this is + // if parent doc is content then set focus to document itself + // and set the "special" flag so it knows we are at the beginning + // of the document + PRBool doFocusDoc = PR_FALSE; + nsIDocShellTreeItem* treeItem = NS_STATIC_CAST(nsIDocShellTreeItem *, this); + nsCOMPtr parentItem; + treeItem->GetParent(getter_AddRefs(parentItem)); + if (parentItem) { + PRInt32 type; + parentItem->GetItemType(&type); + doFocusDoc = type == nsIDocShellTreeItem::typeContent; + } + + // Tell itself (and the DocShellFocusController) who has focus + // this way focus gets removed from the currently focused DocShell + SetHasFocus(PR_TRUE); + + nsCOMPtr focusContent; + + nsCOMPtr esm; + + nsCOMPtr presContext; + GetPresContext(getter_AddRefs(presContext)); + if (presContext) { presContext->GetEventStateManager(getter_AddRefs(esm)); - if (!esm) - return NS_ERROR_FAILURE; - - presShell->GetDocument(getter_AddRefs(document)); - nsCOMPtr - rootContent(getter_AddRefs(document->GetRootContent())); - if (!rootContent) - return NS_ERROR_FAILURE; - - nsCOMPtr focusContent; - - // Figure out what type of document this is - // if parent doc is content then set focus to document itself - // and set the "special" flag so it knows we are at the beginning - // of the document - PRBool doFocusDoc = PR_FALSE; - nsIDocShellTreeItem* treeItem = NS_STATIC_CAST(nsIDocShellTreeItem *, this); - nsCOMPtr parentItem; - treeItem->GetParent(getter_AddRefs(parentItem)); - if (parentItem) { - PRInt32 type; - parentItem->GetItemType(&type); - doFocusDoc = type == nsIDocShellTreeItem::typeContent; - } - - // Tell itself (and the DocShellFocusController) who has focus - // this way focus gets removed from the currently focused DocShell - SetHasFocus(PR_TRUE); - - // Either focus the document or the "first" piece of content - if (doFocusDoc) { - esm->SetContentState(nsnull, NS_EVENT_STATE_FOCUS); - esm->SetSpecialTopOfDoc(PR_TRUE); - } else { - nsCOMPtr content; - esm->GetNextTabbableIndexContent(rootContent, PR_TRUE, PR_TRUE, getter_AddRefs(content)); - if (!content) { - esm->GetNextTabbableContent(rootContent, nsnull, PR_TRUE, - getter_AddRefs(focusContent)); + nsCOMPtr rootContent(getter_AddRefs(document->GetRootContent())); + if (esm && rootContent) { + // Either focus the document or the "first" piece of content + if (doFocusDoc) { + esm->SetContentState(nsnull, NS_EVENT_STATE_FOCUS); + esm->SetSpecialTopOfDoc(PR_TRUE); } else { - focusContent = content; + nsCOMPtr content; + esm->GetNextTabbableIndexContent(rootContent, PR_TRUE, PR_TRUE, getter_AddRefs(content)); + if (!content) { + esm->GetNextTabbableContent(rootContent, nsnull, PR_TRUE, + getter_AddRefs(focusContent)); + } else { + focusContent = content; + } } } + } - if (focusContent) { - nsIFrame *focusFrame = nsnull; - presShell->GetPrimaryFrameFor(focusContent, &focusFrame); - esm->ChangeFocus(focusContent, focusFrame, PR_TRUE); - SetCanvasHasFocus(PR_FALSE); - } else { - nsCOMPtr sgo; - document->GetScriptGlobalObject(getter_AddRefs(sgo)); - if (sgo) { - nsCOMPtr domwin(do_QueryInterface(sgo)); - if (domwin) { - domwin->Focus(); - } - } + if (focusContent) { + nsIFrame *focusFrame = nsnull; + presShell->GetPrimaryFrameFor(focusContent, &focusFrame); + esm->ChangeFocus(focusContent, focusFrame, PR_TRUE); + SetCanvasHasFocus(PR_FALSE); + } else { + nsCOMPtr sgo; + document->GetScriptGlobalObject(getter_AddRefs(sgo)); + if (sgo) { + nsCOMPtr domwin(do_QueryInterface(sgo)); + if (domwin) + domwin->Focus(); } + } - return NS_OK; + return NS_OK; } //------------------------------------------------- @@ -3732,12 +3737,16 @@ nsDocShell::CreateContentViewer(const char *aContentType, if (currentLoadGroup) currentLoadGroup->RemoveRequest(request, nsnull, NS_OK); + // Update the notification callbacks, so that progress and + // status information are sent to the right docshell... + aOpenedChannel->SetNotificationCallbacks(this); } NS_ENSURE_SUCCESS(Embed(viewer, "", (nsISupports *) nsnull), NS_ERROR_FAILURE); - mEODForCurrentDocument = PR_FALSE; // clear the current flag + mEODForCurrentDocument = PR_FALSE; + return NS_OK; } @@ -3903,6 +3912,8 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer) // Suppress the command dispatcher. focusController->SetSuppressFocus(PR_TRUE, "Win32-Only Link Traversal Issue"); + // Remove focus from the element that has it + focusController->SetFocusedElement(nsnull); } } @@ -3915,6 +3926,28 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer) // Stop any activity that may be happening in the old document before // releasing it... mContentViewer->Stop(); + + // Try to extract the default background color from the old + // view manager, so we can use it for the next document. + nsCOMPtr docviewer = + do_QueryInterface(mContentViewer); + + if (docviewer) { + nsCOMPtr shell; + docviewer->GetPresShell(*getter_AddRefs(shell)); + + if (shell) { + nsCOMPtr vm; + shell->GetViewManager(getter_AddRefs(vm)); + + if (vm) { + vm->GetDefaultBackgroundColor(&bgcolor); + // If the background color is not known, don't propagate it. + bgSet = NS_GET_A(bgcolor) != 0; + } + } + } + mContentViewer->Destroy(); aNewViewer->SetPreviousViewer(mContentViewer); mContentViewer = nsnull; @@ -4849,7 +4882,6 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIChannel * aChannel, // will set it up for us. SetupRefreshURI(aChannel); - mInitialPageLoad = PR_FALSE; return NS_OK; } @@ -5083,12 +5115,44 @@ void nsDocShell::SetCurrentURI(nsIURI * aURI) { mCurrentURI = aURI; //This assignment addrefs + PRBool isRoot = PR_FALSE; // Is this the root docshell + PRBool isSubFrame=PR_FALSE; // Is this a subframe navigation? - nsCOMPtr loader(do_GetInterface(mLoadCookie)); + if (!mLoadCookie) + return; + + nsCOMPtr loader(do_GetInterface(mLoadCookie)); + nsCOMPtr webProgress(do_QueryInterface(mLoadCookie)); + nsCOMPtr root; + + GetSameTypeRootTreeItem(getter_AddRefs(root)); + if (root.get() == NS_STATIC_CAST(nsIDocShellTreeItem *, this)) + { + // This is the root docshell + isRoot = PR_TRUE; + } + if (LSHE) { + nsCOMPtr historyEntry(do_QueryInterface(LSHE)); + + // Check if this is a subframe navigation + if (historyEntry) { + historyEntry->GetIsSubFrame(&isSubFrame); + } + } + + if (!isSubFrame && !isRoot) { + /* + * We don't want to send OnLocationChange notifications when + * a subframe is being loaded for the first time, while + * visiting a frameset page + */ + return; + } + NS_ASSERTION(loader, "No document loader"); if (loader) { - loader->FireOnLocationChange(nsnull, nsnull, aURI); + loader->FireOnLocationChange(webProgress, nsnull, aURI); } } diff --git a/mozilla/docshell/base/nsDocShell.h b/mozilla/docshell/base/nsDocShell.h index 3231aa60ba0..9b0cfe17134 100644 --- a/mozilla/docshell/base/nsDocShell.h +++ b/mozilla/docshell/base/nsDocShell.h @@ -303,7 +303,6 @@ protected: nsPoint mCurrentScrollbarPref; // this document only nsPoint mDefaultScrollbarPref; // persistent across doc loads PRUint32 mLoadType; - PRBool mInitialPageLoad; PRBool mAllowPlugins; PRBool mAllowJavascript; PRBool mAllowMetaRedirects; diff --git a/mozilla/docshell/base/nsIContentViewer.idl b/mozilla/docshell/base/nsIContentViewer.idl index 3fd383b3439..ebb9b878643 100644 --- a/mozilla/docshell/base/nsIContentViewer.idl +++ b/mozilla/docshell/base/nsIContentViewer.idl @@ -22,11 +22,11 @@ interface nsIContentViewer : nsISupports in nsIDeviceContextPtr aDeviceContext, [const] in nsRectRef aBounds); - void bindToDocument(in nsISupports aDoc, in string aCommand); - attribute nsISupports container; + void loadStart(in nsISupports aDoc); void loadComplete(in unsigned long aStatus); + void destroy(); void stop(); diff --git a/mozilla/docshell/base/nsIDocShell.idl b/mozilla/docshell/base/nsIDocShell.idl index 67b7de6ed2b..11f2487335e 100644 --- a/mozilla/docshell/base/nsIDocShell.idl +++ b/mozilla/docshell/base/nsIDocShell.idl @@ -135,6 +135,12 @@ interface nsIDocShell : nsISupports */ void stopLoad(); + /** + * Reset state to a new content model within the current document and the document + * viewer. Called by the document before initiating an out of band document.write(). + */ + void prepareForNewContentModel(); + /** * Presentation context for the currently loaded document. This may be null. */ diff --git a/mozilla/dom/public/idl/traversal/MANIFEST_IDL b/mozilla/dom/public/idl/traversal/MANIFEST_IDL new file mode 100644 index 00000000000..63710fca688 --- /dev/null +++ b/mozilla/dom/public/idl/traversal/MANIFEST_IDL @@ -0,0 +1,4 @@ +nsIDOMDocumentTraversal.idl +nsIDOMNodeFilter.idl +nsIDOMNodeIterator.idl +nsIDOMTreeWalker.idl diff --git a/mozilla/dom/public/idl/traversal/Makefile.in b/mozilla/dom/public/idl/traversal/Makefile.in new file mode 100644 index 00000000000..ebe2921f8f6 --- /dev/null +++ b/mozilla/dom/public/idl/traversal/Makefile.in @@ -0,0 +1,51 @@ +# +# 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 this file as it was released on +# May 1 2001. +# +# The Initial Developer of the Original Code is Jonas Sicking. +# Portions created by Jonas Sicking are Copyright (C) 2001 +# Jonas Sicking. All Rights Reserved. +# +# Contributor(s): +# Jonas Sicking (Original Author) +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = dom +XPIDL_MODULE = dom_traversal + +XPIDLSRCS = \ + nsIDOMDocumentTraversal.idl \ + nsIDOMNodeFilter.idl \ + nsIDOMNodeIterator.idl \ + nsIDOMTreeWalker.idl \ + $(NULL) + +include $(topsrcdir)/config/rules.mk diff --git a/mozilla/dom/public/idl/traversal/makefile.win b/mozilla/dom/public/idl/traversal/makefile.win new file mode 100755 index 00000000000..9eadb6d81d9 --- /dev/null +++ b/mozilla/dom/public/idl/traversal/makefile.win @@ -0,0 +1,47 @@ +#!nmake +# +# 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 this file as it was released on +# May 1 2001. +# +# The Initial Developer of the Original Code is Jonas Sicking. +# Portions created by Jonas Sicking are Copyright (C) 2001 +# Jonas Sicking. All Rights Reserved. +# +# Contributor(s): +# Jonas Sicking (Original Author) +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. + +DEPTH=..\..\..\.. + +MODULE=dom +XPIDL_MODULE=dom_traversal + +XPIDLSRCS = \ + .\nsIDOMDocumentTraversal.idl \ + .\nsIDOMNodeFilter.idl \ + .\nsIDOMNodeIterator.idl \ + .\nsIDOMTreeWalker.idl \ + $(NULL) + +include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/dom/public/idl/traversal/nsIDOMDocumentTraversal.idl b/mozilla/dom/public/idl/traversal/nsIDOMDocumentTraversal.idl new file mode 100644 index 00000000000..8f8e50d1cf2 --- /dev/null +++ b/mozilla/dom/public/idl/traversal/nsIDOMDocumentTraversal.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * 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 this file as it was released on + * May 1 2001. + * + * The Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001 + * Jonas Sicking. All Rights Reserved. + * + * Contributor(s): + * Jonas Sicking (Original Author) + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + * + */ + +#include "domstubs.idl" + +interface nsIDOMNodeIterator; +interface nsIDOMNodeFilter; +interface nsIDOMTreeWalker; + + +[scriptable, uuid(13f236c0-47f8-11d5-b6a3-009027446e84)] +// Introduced in DOM Level 2: +interface nsIDOMDocumentTraversal : nsISupports { + nsIDOMNodeIterator createNodeIterator(in nsIDOMNode root, + in unsigned long whatToShow, + in nsIDOMNodeFilter filter, + in boolean entityReferenceExpansion) + raises(DOMException); + nsIDOMTreeWalker createTreeWalker(in nsIDOMNode root, + in unsigned long whatToShow, + in nsIDOMNodeFilter filter, + in boolean entityReferenceExpansion) + raises(DOMException); +}; diff --git a/mozilla/dom/public/idl/traversal/nsIDOMNodeFilter.idl b/mozilla/dom/public/idl/traversal/nsIDOMNodeFilter.idl new file mode 100644 index 00000000000..aefbe8e4459 --- /dev/null +++ b/mozilla/dom/public/idl/traversal/nsIDOMNodeFilter.idl @@ -0,0 +1,65 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * 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 this file as it was released on + * May 1 2001. + * + * The Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001 + * Jonas Sicking. All Rights Reserved. + * + * Contributor(s): + * Jonas Sicking (Original Author) + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + * + */ + +#include "domstubs.idl" + +[scriptable, uuid(e4723748-1dd1-11b2-8ee6-866a532a6237)] +// Introduced in DOM Level 2: +interface nsIDOMNodeFilter : nsISupports { + + // Constants returned by acceptNode + const short FILTER_ACCEPT = 1; + const short FILTER_REJECT = 2; + const short FILTER_SKIP = 3; + + + // Constants for whatToShow + const unsigned long SHOW_ALL = 0xFFFFFFFF; + const unsigned long SHOW_ELEMENT = 0x00000001; + const unsigned long SHOW_ATTRIBUTE = 0x00000002; + const unsigned long SHOW_TEXT = 0x00000004; + const unsigned long SHOW_CDATA_SECTION = 0x00000008; + const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010; + const unsigned long SHOW_ENTITY = 0x00000020; + const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040; + const unsigned long SHOW_COMMENT = 0x00000080; + const unsigned long SHOW_DOCUMENT = 0x00000100; + const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200; + const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400; + const unsigned long SHOW_NOTATION = 0x00000800; + + short acceptNode(in nsIDOMNode n); +}; diff --git a/mozilla/dom/public/idl/traversal/nsIDOMNodeIterator.idl b/mozilla/dom/public/idl/traversal/nsIDOMNodeIterator.idl new file mode 100644 index 00000000000..47670be6968 --- /dev/null +++ b/mozilla/dom/public/idl/traversal/nsIDOMNodeIterator.idl @@ -0,0 +1,55 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * 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 this file as it was released on + * May 1 2001. + * + * The Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001 + * Jonas Sicking. All Rights Reserved. + * + * Contributor(s): + * Jonas Sicking (Original Author) + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + * + */ + +#include "domstubs.idl" + +interface nsIDOMNodeIterator; +interface nsIDOMNodeFilter; + + +[scriptable, uuid(354b5f02-1dd2-11b2-b053-b8c2997022a0)] +// Introduced in DOM Level 2: +interface nsIDOMNodeIterator : nsISupports { + readonly attribute nsIDOMNode root; + readonly attribute unsigned long whatToShow; + readonly attribute nsIDOMNodeFilter filter; + readonly attribute boolean expandEntityReferences; + nsIDOMNode nextNode() + raises(DOMException); + nsIDOMNode previousNode() + raises(DOMException); + void detach(); +}; diff --git a/mozilla/dom/public/idl/traversal/nsIDOMTreeWalker.idl b/mozilla/dom/public/idl/traversal/nsIDOMTreeWalker.idl new file mode 100644 index 00000000000..b9beba94fb7 --- /dev/null +++ b/mozilla/dom/public/idl/traversal/nsIDOMTreeWalker.idl @@ -0,0 +1,60 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * 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 this file as it was released on + * May 1 2001. + * + * The Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001 + * Jonas Sicking. All Rights Reserved. + * + * Contributor(s): + * Jonas Sicking (Original Author) + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + * + */ + +#include "domstubs.idl" + +interface nsIDOMTreeWalker; +interface nsIDOMNodeFilter; + + +[scriptable, uuid(400af3ca-1dd2-11b2-a50a-887ecca2e63a)] +// Introduced in DOM Level 2: +interface nsIDOMTreeWalker : nsISupports { + readonly attribute nsIDOMNode root; + readonly attribute unsigned long whatToShow; + readonly attribute nsIDOMNodeFilter filter; + readonly attribute boolean expandEntityReferences; + attribute nsIDOMNode currentNode; + // raises(DOMException) on setting + + nsIDOMNode parentNode(); + nsIDOMNode firstChild(); + nsIDOMNode lastChild(); + nsIDOMNode previousSibling(); + nsIDOMNode nextSibling(); + nsIDOMNode previousNode(); + nsIDOMNode nextNode(); +}; diff --git a/mozilla/dom/src/base/nsFocusController.cpp b/mozilla/dom/src/base/nsFocusController.cpp index 08dfaeec307..02890b03b9e 100644 --- a/mozilla/dom/src/base/nsFocusController.cpp +++ b/mozilla/dom/src/base/nsFocusController.cpp @@ -98,10 +98,12 @@ nsFocusController::SetFocusedElement(nsIDOMElement* aElement) { mCurrentElement = aElement; - // Need to update focus commands when focus switches from - // an element to no element, so don't test mCurrentElement - // before updating. - UpdateCommands(NS_LITERAL_STRING("focus")); + if (!mSuppressFocus) { + // Need to update focus commands when focus switches from + // an element to no element, so don't test mCurrentElement + // before updating. + UpdateCommands(NS_LITERAL_STRING("focus")); + } return NS_OK; } diff --git a/mozilla/dom/src/base/nsJSEnvironment.cpp b/mozilla/dom/src/base/nsJSEnvironment.cpp index c5f29cb3951..92b545d86ac 100644 --- a/mozilla/dom/src/base/nsJSEnvironment.cpp +++ b/mozilla/dom/src/base/nsJSEnvironment.cpp @@ -17,7 +17,7 @@ * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): */ #include "nsJSEnvironment.h" @@ -160,7 +160,7 @@ NS_ScriptErrorReporter(JSContext *cx, 0, 0, 0, category); nsMemory::Free((void *)newMessageUni); } - + if (NS_SUCCEEDED(rv)) owner->ReportScriptError(errorObject); } @@ -981,30 +981,41 @@ nsJSContext::GetGlobalObject() { JSObject *global = ::JS_GetGlobalObject(mContext); - if (global) { - nsISupports* sup = (nsISupports *)::JS_GetPrivate(mContext, global); - - if (sup) { - nsCOMPtr wrapped_native = - do_QueryInterface(sup); - - if (wrapped_native) { - nsCOMPtr native; - - wrapped_native->GetNative(getter_AddRefs(native)); - - if (native) { - nsIScriptGlobalObject *script_global = nsnull; - - CallQueryInterface(native, &script_global); - - return script_global; - } - } - } + if (!global) { + return nsnull; } - return nsnull; + JSClass *c = JS_GET_CLASS(mContext, global); + + if (!c || ((~c->flags) & (JSCLASS_HAS_PRIVATE | + JSCLASS_PRIVATE_IS_NSISUPPORTS))) { + return nsnull; + } + + nsCOMPtr native = + (nsISupports *)::JS_GetPrivate(mContext, global); + + nsCOMPtr wrapped_native = + do_QueryInterface(native); + + if (wrapped_native) { + // The global object is a XPConnect wrapped native, the native in + // the wrapper might be the nsIScriptGlobalObject + + wrapped_native->GetNative(getter_AddRefs(native)); + } + + nsIScriptGlobalObject *script_global = nsnull; + + if (native) { + // We have private data (either directly from ::JS_GetPrivate() or + // through wrapped_native->GetNative()), check if it's a + // nsIScriptGlobalObject + + CallQueryInterface(native, &script_global); + } + + return script_global; } NS_IMETHODIMP_(void*) @@ -1085,6 +1096,7 @@ nsresult nsJSContext::InitializeLiveConnectClasses() { nsresult rv = NS_OK; + nsCOMPtr jvmManager = do_GetService(nsIJVMManager::GetCID(), &rv); @@ -1470,7 +1482,7 @@ nsJSEnvironment::nsJSEnvironment() return; // XXX swallow error! need Init()? gDOMThread = PR_GetCurrentThread(); - + NS_ASSERTION(!gOldJSGCCallback, "nsJSEnvironment created more than once"); gOldJSGCCallback = ::JS_SetGCCallbackRT(mRuntime, DOMGCCallback); @@ -1503,7 +1515,7 @@ nsJSEnvironment::~nsJSEnvironment() NS_IMPL_ISUPPORTS1(nsJSEnvironment,nsIObserver); -NS_IMETHODIMP nsJSEnvironment::Observe(nsISupports *aSubject, +NS_IMETHODIMP nsJSEnvironment::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const PRUnichar *someData) { diff --git a/mozilla/editor/base/nsTableEditor.cpp b/mozilla/editor/base/nsTableEditor.cpp index 1229fdbff32..b9a07ad528d 100644 --- a/mozilla/editor/base/nsTableEditor.cpp +++ b/mozilla/editor/base/nsTableEditor.cpp @@ -2054,7 +2054,9 @@ nsHTMLEditor::SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMElemen // Set to the opposite of current type nsAutoString tagName; GetTagString(aSourceCell, tagName); - nsString newCellType( (tagName == NS_LITERAL_STRING("td")) ? NS_LITERAL_STRING("th") : NS_LITERAL_STRING("td") ); + NS_NAMED_LITERAL_STRING(tdType, "td"); + NS_NAMED_LITERAL_STRING(thType, "th"); + nsString newCellType( (tagName == tdType) ? thType : tdType ); // Save current selection to restore when done // This is needed so ReplaceContainer can monitor selection diff --git a/mozilla/editor/libeditor/html/nsTableEditor.cpp b/mozilla/editor/libeditor/html/nsTableEditor.cpp index 1229fdbff32..b9a07ad528d 100644 --- a/mozilla/editor/libeditor/html/nsTableEditor.cpp +++ b/mozilla/editor/libeditor/html/nsTableEditor.cpp @@ -2054,7 +2054,9 @@ nsHTMLEditor::SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMElemen // Set to the opposite of current type nsAutoString tagName; GetTagString(aSourceCell, tagName); - nsString newCellType( (tagName == NS_LITERAL_STRING("td")) ? NS_LITERAL_STRING("th") : NS_LITERAL_STRING("td") ); + NS_NAMED_LITERAL_STRING(tdType, "td"); + NS_NAMED_LITERAL_STRING(thType, "th"); + nsString newCellType( (tagName == tdType) ? thType : tdType ); // Save current selection to restore when done // This is needed so ReplaceContainer can monitor selection diff --git a/mozilla/editor/ui/composer/content/editorOverlay.xul b/mozilla/editor/ui/composer/content/editorOverlay.xul index 2ee01ffd95a..1726707fb32 100644 --- a/mozilla/editor/ui/composer/content/editorOverlay.xul +++ b/mozilla/editor/ui/composer/content/editorOverlay.xul @@ -444,10 +444,12 @@ + diff --git a/mozilla/editor/ui/dialogs/content/EdColorProps.xul b/mozilla/editor/ui/dialogs/content/EdColorProps.xul index 1cf145f3a90..e0bc2713884 100644 --- a/mozilla/editor/ui/dialogs/content/EdColorProps.xul +++ b/mozilla/editor/ui/dialogs/content/EdColorProps.xul @@ -44,6 +44,7 @@ + diff --git a/mozilla/editor/ui/dialogs/content/EdImageProps.xul b/mozilla/editor/ui/dialogs/content/EdImageProps.xul index 587d0347b71..e4af8752a83 100644 --- a/mozilla/editor/ui/dialogs/content/EdImageProps.xul +++ b/mozilla/editor/ui/dialogs/content/EdImageProps.xul @@ -199,7 +199,9 @@