OS/2 package created from Mercurial tag FIREFOX_3_6b1_RELEASE. Various changes were applied on top of the Mercurial codebase: - The fix for empty content area display (see bug 520894, the fix was checked into mozilla-1.9.2 too late). - Change the build configuration so that a real Hg ID is given in about:buildconfig and to remove nsprpub/configure. - A workaround to be able to compile ctypes/libffi (bug 522118). - A packaging change (see bug 495608). - Three build fixes to be able to compile the sources with GCC 3.3.5 (bug 453705, bug 451278, and a problem in nsContentEventHandler.cpp without a bug number). The content of these patches is appended below. Support for the downloadable font feature (@font-face) has not been implemented yet on OS/2. Peter Weilbacher , 2009-11-01 ================================================================================ # HG changeset patch # User Peter Weilbacher # Date 1219359660 -10800 # Node ID 4121bcd473397896c55f0b1a6add186358637aa6 # Parent 73967cc9e4ee07b66a5a3f9a35958027a51507d5 Bug 448494: remove nsprpub/configure and place it in .hgignore This is because OS/2 needs to generate a different configure file, to be able to pass through the configure state. As this file is automaticaly regenerated from configure.in this doesn't hurt other platforms, either. Because this patch changes the code tree, it garbles the Hg ID from about:buildconfig. Change the relevant Makefiles to use the qparent revision to get a "real" (public) Hg ID into the package. diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -10,6 +10,7 @@ ^\.mozconfig ^mozconfig ^configure$ +^nsprpub/configure$ ^config\.cache$ ^config\.log$ ^ID$ diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -69,7 +69,7 @@ DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID) -SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify 2>/dev/null | cut -f1 -d' ') +SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify -r qparent 2>/dev/null | cut -f1 -d' ') ifdef SOURCE_STAMP DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)" endif diff --git a/nsprpub/configure b/nsprpub/configure deleted file mode 100755 --- a/nsprpub/configure +++ /dev/null diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in --- a/toolkit/content/Makefile.in +++ b/toolkit/content/Makefile.in @@ -58,7 +58,7 @@ -DCPPFLAGS="$(CPPFLAGS)" \ $(NULL) -CHANGESET := $(shell cd $(topsrcdir) && hg identify 2>/dev/null | cut -f1 -d' ') +CHANGESET := $(shell cd $(topsrcdir) && hg identify -r qparent 2>/dev/null | cut -f1 -d' ') ifdef CHANGESET DEFINES += -DSOURCE_CHANGESET="$(CHANGESET)" endif diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in --- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -254,7 +254,7 @@ endif endif -SOURCE_STAMP := $(shell cd $(topsrcdir) && hg identify 2>/dev/null | cut -f1 -d' ') +SOURCE_STAMP := $(shell cd $(topsrcdir) && hg identify -r qparent 2>/dev/null | cut -f1 -d' ') # strip a trailing slash from the repo URL because it's not always present, # and we want to construct a working URL in buildconfig.html # make+shell+sed = awful diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -69,7 +69,7 @@ [browser] ; [Base Browser Files] -#ifdef XP_WIN32 +#ifndef XP_UNIX @BINPATH@/@MOZ_APP_NAME@.exe #else @BINPATH@/@MOZ_APP_NAME@-bin @@ -91,6 +91,8 @@ #ifndef WINCE @BINPATH@/plugins/npnul32.dll #endif +#elifdef XP_OS2 +@BINPATH@/plugins/npnulos2.dll #endif @BINPATH@/@DLL_PREFIX@sqlite3@DLL_SUFFIX@ @BINPATH@/README.txt @@ -316,6 +318,7 @@ @BINPATH@/components/nsSessionStartup.js @BINPATH@/components/nsSessionStore.js @BINPATH@/components/nsURLFormatter.js +#ifndef XP_OS2 @BINPATH@/components/@DLL_PREFIX@browserdirprovider@DLL_SUFFIX@ #ifdef XP_WIN32 ;XXX: lame, kill use_short_libname @@ -323,6 +326,10 @@ #else @BINPATH@/components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@ #endif +#else +@BINPATH@/components/brwsrdir@DLL_SUFFIX@ +@BINPATH@/components/brwsrcmp@DLL_SUFFIX@ +#endif @BINPATH@/components/txEXSLTRegExFunctions.js @BINPATH@/components/nsLivemarkService.js @BINPATH@/components/nsTaggingService.js @@ -381,7 +388,7 @@ ; shell icons -#ifndef XP_WIN32 +#ifdef XP_UNIX @BINPATH@/icons/*.xpm @BINPATH@/icons/*.png #endif @@ -450,6 +457,8 @@ @BINPATH@/res/unixcharset.properties #elifdef XP_WIN32 @BINPATH@/res/wincharset.properties +#elifdef XP_OS2 +@BINPATH@/res/os2charset.properties #endif ; svg diff --git a/js/ctypes/libffi/configure b/js/ctypes/libffi/configure --- a/js/ctypes/libffi/configure +++ b/js/ctypes/libffi/configure @@ -9139,16 +9139,18 @@ if test -z "$aix_libpath"; then aix_libp esac fi else ld_shlibs=no fi ;; os2*) + # Tell ltmain to make .lib files, not .a files. + libext=lib hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) @@ -9868,16 +9870,18 @@ openbsd*) ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) + # Tell ltmain to make .lib files, not .a files. + libext=lib libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; @@ -13869,16 +13873,18 @@ openbsd*) ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) + # Tell ltmain to make .lib files, not .a files. + libext=lib libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; @@ -15823,16 +15829,18 @@ if test -z "$aix_libpath"; then aix_libp esac fi else ld_shlibs_F77=no fi ;; os2*) + # Tell ltmain to make .lib files, not .a files. + libext=lib hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) @@ -16500,16 +16508,18 @@ openbsd*) ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) + # Tell ltmain to make .lib files, not .a files. + libext=lib libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; @@ -18454,16 +18464,18 @@ if test -z "$aix_libpath"; then aix_libp esac fi else ld_shlibs_GCJ=no fi ;; os2*) + # Tell ltmain to make .lib files, not .a files. + libext=lib hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) @@ -19131,16 +19143,18 @@ openbsd*) ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) + # Tell ltmain to make .lib files, not .a files. + libext=lib libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; diff --git a/js/ctypes/libffi/src/x86/sysv.S b/js/ctypes/libffi/src/x86/sysv.S --- a/js/ctypes/libffi/src/x86/sysv.S +++ b/js/ctypes/libffi/src/x86/sysv.S @@ -1,223 +1,313 @@ /* ----------------------------------------------------------------------- - sysv.S - Copyright (c) 1996, 1998, 2001-2003, 2005, 2008 Red Hat, Inc. - - X86 Foreign Function Interface - + win32.S - Copyright (c) 1996, 1998, 2001, 2002 Red Hat, Inc. + Copyright (c) 2001 John Beniton + Copyright (c) 2002 Ranjit Mathew + + + X86 Foreign Function Interface + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR + ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ - -#ifndef __x86_64__ - -#define LIBFFI_ASM + +#define LIBFFI_ASM #include #include - + .text - -.globl ffi_prep_args - - .align 4 -.globl ffi_call_SYSV - .type ffi_call_SYSV,@function - -ffi_call_SYSV: -.LFB1: + +.globl _ffi_prep_args + + # This assumes we are using gas. + .balign 16 +.globl _ffi_call_SYSV + +_ffi_call_SYSV: pushl %ebp -.LCFI0: movl %esp,%ebp -.LCFI1: - /* Make room for all of the new args. */ - movl 16(%ebp),%ecx - subl %ecx,%esp - - movl %esp,%eax - - /* Place all of the ffi_prep_args in position */ - pushl 12(%ebp) - pushl %eax - call *8(%ebp) - - /* Return stack to previous state and call the function */ - addl $8,%esp + + # Make room for all of the new args. + movl 16(%ebp),%ecx + subl %ecx,%esp + + movl %esp,%eax + + # Place all of the ffi_prep_args in position + pushl 12(%ebp) + pushl %eax + call *8(%ebp) + + # Return stack to previous state and call the function + addl $8,%esp + + # FIXME: Align the stack to a 128-bit boundary to avoid + # potential performance hits. call *28(%ebp) - - /* Load %ecx with the return type code */ - movl 20(%ebp),%ecx - - /* Protect %esi. We're going to pop it in the epilogue. */ - pushl %esi - - /* If the return value pointer is NULL, assume no return value. */ - cmpl $0,24(%ebp) - jne 0f - - /* Even if there is no space for the return value, we are - obliged to handle floating-point values. */ - cmpl $FFI_TYPE_FLOAT,%ecx - jne noretval - fstp %st(0) - + + # Remove the space we pushed for the args + movl 16(%ebp),%ecx + addl %ecx,%esp + + # Load %ecx with the return type code + movl 20(%ebp),%ecx + + # If the return value pointer is NULL, assume no return value. + cmpl $0,24(%ebp) + jne retint + + # Even if there is no space for the return value, we are + # obliged to handle floating-point values. + cmpl $FFI_TYPE_FLOAT,%ecx + jne noretval + fstp %st(0) + jmp epilogue - -0: - call 1f - -.Lstore_table: - .long noretval-.Lstore_table /* FFI_TYPE_VOID */ - .long retint-.Lstore_table /* FFI_TYPE_INT */ - .long retfloat-.Lstore_table /* FFI_TYPE_FLOAT */ - .long retdouble-.Lstore_table /* FFI_TYPE_DOUBLE */ - .long retlongdouble-.Lstore_table /* FFI_TYPE_LONGDOUBLE */ - .long retuint8-.Lstore_table /* FFI_TYPE_UINT8 */ - .long retsint8-.Lstore_table /* FFI_TYPE_SINT8 */ - .long retuint16-.Lstore_table /* FFI_TYPE_UINT16 */ - .long retsint16-.Lstore_table /* FFI_TYPE_SINT16 */ - .long retint-.Lstore_table /* FFI_TYPE_UINT32 */ - .long retint-.Lstore_table /* FFI_TYPE_SINT32 */ - .long retint64-.Lstore_table /* FFI_TYPE_UINT64 */ - .long retint64-.Lstore_table /* FFI_TYPE_SINT64 */ - .long retstruct-.Lstore_table /* FFI_TYPE_STRUCT */ - .long retint-.Lstore_table /* FFI_TYPE_POINTER */ - -1: - pop %esi - add (%esi, %ecx, 4), %esi - jmp *%esi - - /* Sign/zero extend as appropriate. */ -retsint8: - movsbl %al, %eax - jmp retint - -retsint16: - movswl %ax, %eax - jmp retint - -retuint8: - movzbl %al, %eax - jmp retint - -retuint16: - movzwl %ax, %eax - jmp retint - + +retint: + cmpl $FFI_TYPE_INT,%ecx + jne retfloat + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + jmp epilogue + retfloat: - /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx - fstps (%ecx) - jmp epilogue - + cmpl $FFI_TYPE_FLOAT,%ecx + jne retdouble + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + fstps (%ecx) + jmp epilogue + retdouble: - /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx - fstpl (%ecx) - jmp epilogue - + cmpl $FFI_TYPE_DOUBLE,%ecx + jne retlongdouble + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + fstpl (%ecx) + jmp epilogue + retlongdouble: - /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx - fstpt (%ecx) - jmp epilogue - -retint64: - /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx - movl %eax,0(%ecx) - movl %edx,4(%ecx) - jmp epilogue - -retint: - /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx - movl %eax,0(%ecx) - + cmpl $FFI_TYPE_LONGDOUBLE,%ecx + jne retint64 + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + fstpt (%ecx) + jmp epilogue + +retint64: + cmpl $FFI_TYPE_SINT64,%ecx + jne retstruct1b + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + movl %edx,4(%ecx) + +retstruct1b: + cmpl $FFI_TYPE_SINT8,%ecx + jne retstruct2b + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movb %al,0(%ecx) + jmp epilogue + +retstruct2b: + cmpl $FFI_TYPE_SINT16,%ecx + jne retstruct + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movw %ax,0(%ecx) + jmp epilogue + retstruct: - /* Nothing to do! */ - + # Nothing to do! + noretval: epilogue: - popl %esi movl %ebp,%esp popl %ebp ret -.LFE1: + .ffi_call_SYSV_end: - .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV - .align 4 -FFI_HIDDEN (ffi_closure_SYSV) -.globl ffi_closure_SYSV - .type ffi_closure_SYSV, @function + # This assumes we are using gas. + .balign 16 +.globl _ffi_call_STDCALL -ffi_closure_SYSV: -.LFB2: +_ffi_call_STDCALL: + pushl %ebp + movl %esp,%ebp + + # Make room for all of the new args. + movl 16(%ebp),%ecx + subl %ecx,%esp + + movl %esp,%eax + + # Place all of the ffi_prep_args in position + pushl 12(%ebp) + pushl %eax + call *8(%ebp) + + # Return stack to previous state and call the function + addl $8,%esp + + # FIXME: Align the stack to a 128-bit boundary to avoid + # potential performance hits. + + call *28(%ebp) + + # stdcall functions pop arguments off the stack themselves + + # Load %ecx with the return type code + movl 20(%ebp),%ecx + + # If the return value pointer is NULL, assume no return value. + cmpl $0,24(%ebp) + jne sc_retint + + # Even if there is no space for the return value, we are + # obliged to handle floating-point values. + cmpl $FFI_TYPE_FLOAT,%ecx + jne sc_noretval + fstp %st(0) + + jmp sc_epilogue + +sc_retint: + cmpl $FFI_TYPE_INT,%ecx + jne sc_retfloat + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + jmp sc_epilogue + +sc_retfloat: + cmpl $FFI_TYPE_FLOAT,%ecx + jne sc_retdouble + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + fstps (%ecx) + jmp sc_epilogue + +sc_retdouble: + cmpl $FFI_TYPE_DOUBLE,%ecx + jne sc_retlongdouble + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + fstpl (%ecx) + jmp sc_epilogue + +sc_retlongdouble: + cmpl $FFI_TYPE_LONGDOUBLE,%ecx + jne sc_retint64 + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + fstpt (%ecx) + jmp sc_epilogue + +sc_retint64: + cmpl $FFI_TYPE_SINT64,%ecx + jne sc_retstruct1b + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + movl %edx,4(%ecx) + +sc_retstruct1b: + cmpl $FFI_TYPE_SINT8,%ecx + jne sc_retstruct2b + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movb %al,0(%ecx) + jmp sc_epilogue + +sc_retstruct2b: + cmpl $FFI_TYPE_SINT16,%ecx + jne sc_retstruct + # Load %ecx with the pointer to storage for the return value + movl 24(%ebp),%ecx + movw %ax,0(%ecx) + jmp sc_epilogue + +sc_retstruct: + # Nothing to do! + +sc_noretval: +sc_epilogue: + movl %ebp,%esp + popl %ebp + ret + +.ffi_call_STDCALL_end: + + .globl _ffi_closure_STDCALL +_ffi_closure_STDCALL: pushl %ebp -.LCFI2: movl %esp, %ebp -.LCFI3: + subl $40, %esp + leal -24(%ebp), %edx + movl %edx, -12(%ebp) /* resp */ + leal 12(%ebp), %edx /* account for stub return address on stack */ + movl %edx, 4(%esp) /* args */ + leal -12(%ebp), %edx + movl %edx, (%esp) /* &resp */ + call _ffi_closure_SYSV_inner + movl -12(%ebp), %ecx + jmp .Lcls_return_result +.ffi_closure_STDCALL_end: + + .globl _ffi_closure_SYSV +_ffi_closure_SYSV: + pushl %ebp + movl %esp, %ebp subl $40, %esp leal -24(%ebp), %edx movl %edx, -12(%ebp) /* resp */ leal 8(%ebp), %edx movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */ leal -12(%ebp), %edx movl %edx, (%esp) /* &resp */ -#if defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE || !defined __PIC__ - call ffi_closure_SYSV_inner -#else - movl %ebx, 8(%esp) -.LCFI7: - call 1f -1: popl %ebx - addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx - call ffi_closure_SYSV_inner@PLT - movl 8(%esp), %ebx -#endif + call _ffi_closure_SYSV_inner movl -12(%ebp), %ecx +.Lcls_return_result: cmpl $FFI_TYPE_INT, %eax je .Lcls_retint - - /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, - FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ - cmpl $FFI_TYPE_UINT64, %eax - jge 0f - cmpl $FFI_TYPE_UINT8, %eax - jge .Lcls_retint - -0: cmpl $FFI_TYPE_FLOAT, %eax + cmpl $FFI_TYPE_FLOAT, %eax je .Lcls_retfloat cmpl $FFI_TYPE_DOUBLE, %eax je .Lcls_retdouble cmpl $FFI_TYPE_LONGDOUBLE, %eax je .Lcls_retldouble cmpl $FFI_TYPE_SINT64, %eax je .Lcls_retllong - cmpl $FFI_TYPE_STRUCT, %eax - je .Lcls_retstruct + cmpl $FFI_TYPE_SINT8, %eax /* 1-byte struct */ + je .Lcls_retstruct1 + cmpl $FFI_TYPE_SINT16, %eax /* 2-bytes struct */ + je .Lcls_retstruct2 .Lcls_epilogue: movl %ebp, %esp popl %ebp ret .Lcls_retint: movl (%ecx), %eax jmp .Lcls_epilogue .Lcls_retfloat: @@ -228,75 +318,50 @@ 0: cmpl $FFI_TYPE_FLOAT, %eax jmp .Lcls_epilogue .Lcls_retldouble: fldt (%ecx) jmp .Lcls_epilogue .Lcls_retllong: movl (%ecx), %eax movl 4(%ecx), %edx jmp .Lcls_epilogue -.Lcls_retstruct: - movl %ebp, %esp - popl %ebp - ret $4 -.LFE2: - .size ffi_closure_SYSV, .-ffi_closure_SYSV +.Lcls_retstruct1: + movsbl (%ecx), %eax + jmp .Lcls_epilogue +.Lcls_retstruct2: + movswl (%ecx), %eax + jmp .Lcls_epilogue +.ffi_closure_SYSV_end: #if !FFI_NO_RAW_API -/* Precalculate for e.g. the Solaris 10/x86 assembler. */ -#if FFI_TRAMPOLINE_SIZE == 10 -#define RAW_CLOSURE_CIF_OFFSET 12 -#define RAW_CLOSURE_FUN_OFFSET 16 -#define RAW_CLOSURE_USER_DATA_OFFSET 20 -#elif FFI_TRAMPOLINE_SIZE == 24 -#define RAW_CLOSURE_CIF_OFFSET 24 -#define RAW_CLOSURE_FUN_OFFSET 28 -#define RAW_CLOSURE_USER_DATA_OFFSET 32 -#else #define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3) #define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4) #define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4) -#endif #define CIF_FLAGS_OFFSET 20 - .align 4 -FFI_HIDDEN (ffi_closure_raw_SYSV) -.globl ffi_closure_raw_SYSV - .type ffi_closure_raw_SYSV, @function - -ffi_closure_raw_SYSV: -.LFB3: + .balign 16 + .globl _ffi_closure_raw_SYSV +_ffi_closure_raw_SYSV: pushl %ebp -.LCFI4: movl %esp, %ebp -.LCFI5: pushl %esi -.LCFI6: subl $36, %esp movl RAW_CLOSURE_CIF_OFFSET(%eax), %esi /* closure->cif */ movl RAW_CLOSURE_USER_DATA_OFFSET(%eax), %edx /* closure->user_data */ movl %edx, 12(%esp) /* user_data */ leal 8(%ebp), %edx /* __builtin_dwarf_cfa () */ movl %edx, 8(%esp) /* raw_args */ leal -24(%ebp), %edx movl %edx, 4(%esp) /* &res */ movl %esi, (%esp) /* cif */ call *RAW_CLOSURE_FUN_OFFSET(%eax) /* closure->fun */ movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ cmpl $FFI_TYPE_INT, %eax je .Lrcls_retint - - /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, - FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ - cmpl $FFI_TYPE_UINT64, %eax - jge 0f - cmpl $FFI_TYPE_UINT8, %eax - jge .Lrcls_retint -0: cmpl $FFI_TYPE_FLOAT, %eax je .Lrcls_retfloat cmpl $FFI_TYPE_DOUBLE, %eax je .Lrcls_retdouble cmpl $FFI_TYPE_LONGDOUBLE, %eax je .Lrcls_retldouble cmpl $FFI_TYPE_SINT64, %eax je .Lrcls_retllong @@ -316,139 +381,11 @@ 0: jmp .Lrcls_epilogue .Lrcls_retldouble: fldt -24(%ebp) jmp .Lrcls_epilogue .Lrcls_retllong: movl -24(%ebp), %eax movl -20(%ebp), %edx jmp .Lrcls_epilogue -.LFE3: - .size ffi_closure_raw_SYSV, .-ffi_closure_raw_SYSV -#endif - - .section .eh_frame,EH_FRAME_FLAGS,@progbits -.Lframe1: - .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */ -.LSCIE1: - .long 0x0 /* CIE Identifier Tag */ - .byte 0x1 /* CIE Version */ -#ifdef __PIC__ - .ascii "zR\0" /* CIE Augmentation */ -#else - .ascii "\0" /* CIE Augmentation */ -#endif - .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */ - .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */ - .byte 0x8 /* CIE RA Column */ -#ifdef __PIC__ - .byte 0x1 /* .uleb128 0x1; Augmentation size */ - .byte 0x1b /* FDE Encoding (pcrel sdata4) */ -#endif - .byte 0xc /* DW_CFA_def_cfa */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x88 /* DW_CFA_offset, column 0x8 */ - .byte 0x1 /* .uleb128 0x1 */ - .align 4 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 /* FDE Length */ -.LASFDE1: - .long .LASFDE1-.Lframe1 /* FDE CIE offset */ -#if defined __PIC__ && defined HAVE_AS_X86_PCREL - .long .LFB1-. /* FDE initial location */ -#elif defined __PIC__ - .long .LFB1@rel -#else - .long .LFB1 -#endif - .long .LFE1-.LFB1 /* FDE address range */ -#ifdef __PIC__ - .byte 0x0 /* .uleb128 0x0; Augmentation size */ -#endif - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI0-.LFB1 - .byte 0xe /* DW_CFA_def_cfa_offset */ - .byte 0x8 /* .uleb128 0x8 */ - .byte 0x85 /* DW_CFA_offset, column 0x5 */ - .byte 0x2 /* .uleb128 0x2 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI1-.LCFI0 - .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x5 /* .uleb128 0x5 */ - .align 4 -.LEFDE1: -.LSFDE2: - .long .LEFDE2-.LASFDE2 /* FDE Length */ -.LASFDE2: - .long .LASFDE2-.Lframe1 /* FDE CIE offset */ -#if defined __PIC__ && defined HAVE_AS_X86_PCREL - .long .LFB2-. /* FDE initial location */ -#elif defined __PIC__ - .long .LFB2@rel -#else - .long .LFB2 -#endif - .long .LFE2-.LFB2 /* FDE address range */ -#ifdef __PIC__ - .byte 0x0 /* .uleb128 0x0; Augmentation size */ -#endif - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI2-.LFB2 - .byte 0xe /* DW_CFA_def_cfa_offset */ - .byte 0x8 /* .uleb128 0x8 */ - .byte 0x85 /* DW_CFA_offset, column 0x5 */ - .byte 0x2 /* .uleb128 0x2 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI3-.LCFI2 - .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x5 /* .uleb128 0x5 */ -#if !defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE && defined __PIC__ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI7-.LCFI3 - .byte 0x83 /* DW_CFA_offset, column 0x3 */ - .byte 0xa /* .uleb128 0xa */ -#endif - .align 4 -.LEFDE2: - -#if !FFI_NO_RAW_API - -.LSFDE3: - .long .LEFDE3-.LASFDE3 /* FDE Length */ -.LASFDE3: - .long .LASFDE3-.Lframe1 /* FDE CIE offset */ -#if defined __PIC__ && defined HAVE_AS_X86_PCREL - .long .LFB3-. /* FDE initial location */ -#elif defined __PIC__ - .long .LFB3@rel -#else - .long .LFB3 -#endif - .long .LFE3-.LFB3 /* FDE address range */ -#ifdef __PIC__ - .byte 0x0 /* .uleb128 0x0; Augmentation size */ -#endif - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI4-.LFB3 - .byte 0xe /* DW_CFA_def_cfa_offset */ - .byte 0x8 /* .uleb128 0x8 */ - .byte 0x85 /* DW_CFA_offset, column 0x5 */ - .byte 0x2 /* .uleb128 0x2 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI5-.LCFI4 - .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x5 /* .uleb128 0x5 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI6-.LCFI5 - .byte 0x86 /* DW_CFA_offset, column 0x6 */ - .byte 0x3 /* .uleb128 0x3 */ - .align 4 -.LEFDE3: +.ffi_closure_raw_SYSV_end: #endif - -#endif /* ifndef __x86_64__ */ - -#if defined __ELF__ && defined __linux__ - .section .note.GNU-stack,"",@progbits -#endif From: Peter Weilbacher [OS/2] Bug 453705: workaround to fix builds break when compiling dom_quickstubs.cpp diff --git a/js/src/xpconnect/src/qsgen.py b/js/src/xpconnect/src/qsgen.py --- a/js/src/xpconnect/src/qsgen.py +++ b/js/src/xpconnect/src/qsgen.py @@ -478,6 +478,12 @@ "XPCVariant::newVariant(ccx, ${argVal})));\n" " if (!${name})\n" " return JS_FALSE;\n") + if os.name == 'os2': # Workaround for GCC 3.3.x bug. + template = ( + " nsCOMPtr ${name}(" + "XPCVariant::newVariant(ccx, ${argVal}));\n" + " if (!${name})\n" + " return JS_FALSE;\n") f.write(substitute(template, params)) return rvdeclared elif type.name == 'nsIAtom': @@ -935,6 +935,11 @@ " nsCOMPtr ${name}(already_AddRefed(" "XPCVariant::newVariant(ccx, ${argVal})));\n" " if (!${name}) {\n") + if os.name == 'os2': # Workaround for GCC 3.3.x bug. + template = ( + " nsCOMPtr ${name}(" + "XPCVariant::newVariant(ccx, ${argVal}));\n" + " if (!${name}) {\n") f.write(substitute(template, params)) writeFailure(f, getTraceInfoDefaultReturn(member.type), 2) return rvdeclared # HG changeset patch # User Peter Weilbacher # Date 1219360007 -10800 # Node ID 78428613d9a3489e95103736e66be817305064e5 # Parent 4ccda17d9db5153ad2fc8d825699fb4759378e80 Bug 451278: work around GCC 3.3 bug that breaks building on OS/2 diff --git a/xpcom/string/public/nsTString.h b/xpcom/string/public/nsTString.h --- a/xpcom/string/public/nsTString.h +++ b/xpcom/string/public/nsTString.h @@ -444,9 +444,14 @@ * the length of the string already contained in the buffer */ +#ifdef XP_OS2 /* Workaround for GCC 3.3.x bug. */ + nsTFixedString_CharT( char_type* data, size_type storageSize ) NS_COM; + nsTFixedString_CharT( char_type* data, size_type storageSize, size_type length ) NS_COM; +#else NS_COM nsTFixedString_CharT( char_type* data, size_type storageSize ); NS_COM nsTFixedString_CharT( char_type* data, size_type storageSize, size_type length ); +#endif // |operator=| does not inherit, so we must define our own self_type& operator=( char_type c ) { Assign(c); return *this; } diff --git a/xpcom/string/public/nsTSubstring.h b/xpcom/string/public/nsTSubstring.h --- a/xpcom/string/public/nsTSubstring.h +++ b/xpcom/string/public/nsTSubstring.h @@ -496,7 +496,11 @@ * this is public to support automatic conversion of tuple to string * base type, which helps avoid converting to nsTAString. */ +#ifdef XP_OS2 /* Workaround for GCC 3.3.x bug. */ + nsTSubstring_CharT(const substring_tuple_type& tuple) NS_COM; +#else NS_COM nsTSubstring_CharT(const substring_tuple_type& tuple); +#endif /** * allows for direct initialization of a nsTSubstring object. @@ -522,7 +526,11 @@ PRUint32 mFlags; // default initialization +#ifdef XP_OS2 /* Workaround for GCC 3.3.x bug. */ + nsTSubstring_CharT() NS_COM; +#else NS_COM nsTSubstring_CharT(); +#endif // version of constructor that leaves mData and mLength uninitialized explicit @@ -530,7 +538,11 @@ // copy-constructor, constructs as dependent on given object // (NOTE: this is for internal use only) +#ifdef XP_OS2 /* Workaround for GCC 3.3.x bug. */ + nsTSubstring_CharT( const self_type& str ) NS_COM; +#else NS_COM nsTSubstring_CharT( const self_type& str ); +#endif /** * this function releases mData and does not change the value of Work around the following build error: /mozilla-1.9.2/content/events/src/nsContentEventHandler.cpp: In member function `nsresult nsContentEventHandler::OnSelectionEvent(nsSelectionEvent*)': /mozilla-1.9.2/content/events/src/nsContentEventHandler.cpp:926: error: no matching function for call to `nsCOMPtr::nsCOMPtr(nsCOMPtr&)' ../../../dist/include/nsCOMPtr.h:616: error: candidates are: nsCOMPtr::nsCOMPtr(const nsCOMPtr_helper&) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:608: error: nsCOMPtr::nsCOMPtr(const nsGetServiceByContractIDWithError&) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:600: error: nsCOMPtr::nsCOMPtr(nsGetServiceByContractID) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:592: error: nsCOMPtr::nsCOMPtr(const nsGetServiceByCIDWithError&) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:584: error: nsCOMPtr::nsCOMPtr(nsGetServiceByCID) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:576: error: nsCOMPtr::nsCOMPtr(const nsQueryInterfaceWithError&) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:568: error: nsCOMPtr::nsCOMPtr(nsQueryInterface) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:560: error: nsCOMPtr::nsCOMPtr(const already_AddRefed&) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:550: error: nsCOMPtr::nsCOMPtr(T*) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:541: error: nsCOMPtr::nsCOMPtr(const nsCOMPtr&) [with T = nsISelection2] ../../../dist/include/nsCOMPtr.h:534: error: nsCOMPtr::nsCOMPtr() [with T = nsISelection2] /mozilla-1.9.2/content/events/src/nsContentEventHandler.cpp:926: error: parse error before `->' token diff --git a/content/events/src/nsContentEventHandler.cpp b/content/events/src/nsContentEventHandler.cpp --- a/content/events/src/nsContentEventHandler.cpp +++ b/content/events/src/nsContentEventHandler.cpp @@ -923,7 +923,7 @@ selPrivate->EndBatchChanges(); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr(do_QueryInterface(sel))->ScrollIntoView( + (nsCOMPtr(do_QueryInterface(sel)))->ScrollIntoView( nsISelectionController::SELECTION_FOCUS_REGION, PR_FALSE, -1, -1); aEvent->mSucceeded = PR_TRUE; return NS_OK; # HG changeset patch # User Rich Walsh # Date 1255337321 -7200 # Node ID b90714b554edc24ced1fddcec8d6383f942638c6 # Parent f789bb32468dbdec4824c010d5978e51c7a48bdf [OS/2] Bug 520894 - browser doesn't show anything in the main window, r=pweilbacher --- a/widget/src/os2/nsWindow.cpp Tue Oct 13 14:06:36 2009 -0700 +++ b/widget/src/os2/nsWindow.cpp Mon Oct 12 10:48:41 2009 +0200 @@ -923,17 +923,20 @@ NS_METHOD nsWindow::Create(nsIWidget *aP nsIToolkit *aToolkit, nsWidgetInitData *aInitData) { - HWND hwndP = (HWND)aNativeParent; - if (!hwndP) { - HWND hwndP = aParent ? (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW) : - HWND_DESKTOP; - } + HWND hwndP; + nsWindow *pParent; - // We need to find the nsWindow that goes with the native window, or controls - // all get the ID of 0, and a zillion toolkits get created. - nsWindow *pParent = (nsWindow*)aParent; - if (!pParent && hwndP && hwndP != HWND_DESKTOP) { - pParent = GetNSWindowPtr(hwndP); + if (aParent) { + hwndP = (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW); + pParent = (nsWindow*)aParent; + } else { + if (aNativeParent && (HWND)aNativeParent != HWND_DESKTOP) { + hwndP = (HWND)aNativeParent; + pParent = GetNSWindowPtr(hwndP); + } else { + hwndP = HWND_DESKTOP; + pParent = 0; + } } DoCreate(hwndP, pParent, aRect, aHandleEventFunction,