Please set "javascript.options.jit.content" to false in greprefs\all.js case you get crashes at startup! (Then it would also be helpful to know your system configuration; please post it in the mozilla.dev.ports.os2 newsgroup.) This build of SeaMonkey for OS/2 was made from code in comm-central and mozilla-1.9.1 dated 2009-04-22 13:58:58 PDT (changesets b069cfe51fff and 71fb8ce8014f, resp.). But the build could only be completed (with GCC 3.3.5) by adding the patches for bug 482384, bug 488468, bug 487567, bug 451278 and bug 453705. See all patches against mozilla-1.9.1 below. 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 @@ -470,6 +470,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 elif type.name == 'nsIAtom': 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 @@ -439,19 +439,24 @@ class nsTFixedString_CharT : public nsTS * fixed-size buffer to be used by the string (the contents of * this buffer may be modified by the string) * @param storageSize * the size of the fixed buffer * @param length (optional) * 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; } self_type& operator=( const char_type* data ) { Assign(data); return *this; } self_type& operator=( const substring_type& str ) { Assign(str); return *this; } self_type& operator=( const substring_tuple_type& tuple ) { Assign(tuple); return *this; } protected: 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 @@ -491,17 +491,21 @@ class nsTSubstring_CharT public: /** * 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. * * NOTE: this constructor is declared public _only_ for convenience * inside the string implementation. */ #ifdef XP_OS2 /* Workaround for GCC 3.3.x bug. */ @@ -517,25 +521,33 @@ class nsTSubstring_CharT // XXX GCC 3.4 needs this :-( friend class nsTPromiseFlatString_CharT; char_type* mData; size_type mLength; 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 NS_COM nsTSubstring_CharT( PRUint32 flags ); // 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 * any of its member variables. in other words, this function acts * like a destructor. */ void NS_FASTCALL Finalize(); diff --git a/dom/src/base/nsDOMClassInfo.cpp b/dom/src/base/nsDOMClassInfo.cpp --- a/dom/src/base/nsDOMClassInfo.cpp +++ b/dom/src/base/nsDOMClassInfo.cpp @@ -6247,7 +6247,8 @@ if (!::JS_DefineUCProperty(cx, windowObj, ::JS_GetStringChars(str), ::JS_GetStringLength(str), JSVAL_VOID, - (JSPropertyOp)funObj, nsnull, + JS_DATA_TO_FUNC_PTR(JSPropertyOp, funObj), + nsnull, JSPROP_ENUMERATE | JSPROP_GETTER | JSPROP_SHARED)) { return NS_ERROR_FAILURE; diff --git a/js/src/xpconnect/src/xpcquickstubs.cpp b/js/src/xpconnect/src/xpcquickstubs.cpp --- a/js/src/xpconnect/src/xpcquickstubs.cpp +++ b/js/src/xpconnect/src/xpcquickstubs.cpp @@ -211,8 +211,8 @@ if(setterobjp) *setterobjp = setterobj; return JS_DefinePropertyById(cx, obj, interned_id, JSVAL_VOID, - (JSPropertyOp)getterobj, - (JSPropertyOp)setterobj, + JS_DATA_TO_FUNC_PTR(JSPropertyOp, getterobj), + JS_DATA_TO_FUNC_PTR(JSPropertyOp, setterobj), attrs); } @@ -256,7 +256,7 @@ if(attrs & JSPROP_GETTER) { JS_SET_RVAL(cx, vp, - OBJECT_TO_JSVAL(reinterpret_cast(getter))); + OBJECT_TO_JSVAL(JS_FUNC_TO_DATA_PTR(JSObject *, getter))); return JS_TRUE; } } @@ -265,7 +265,7 @@ if(attrs & JSPROP_SETTER) { JS_SET_RVAL(cx, vp, - OBJECT_TO_JSVAL(reinterpret_cast(setter))); + OBJECT_TO_JSVAL(JS_FUNC_TO_DATA_PTR(JSObject *, setter))); return JS_TRUE; } } diff --git a/js/src/xpconnect/src/xpcwrappedjsclass.cpp b/js/src/xpconnect/src/xpcwrappedjsclass.cpp --- a/js/src/xpconnect/src/xpcwrappedjsclass.cpp +++ b/js/src/xpconnect/src/xpcwrappedjsclass.cpp @@ -1470,13 +1470,13 @@ { // JSPROP_GETTER means the getter is actually a // function object. - ccx.SetCallee((JSObject*)getter); + ccx.SetCallee(JS_FUNC_TO_DATA_PTR(JSObject*, getter)); } else if(XPT_MD_IS_SETTER(info->flags) && (attrs & JSPROP_SETTER)) { // JSPROP_SETTER means the setter is actually a // function object. - ccx.SetCallee((JSObject*)setter); + ccx.SetCallee(JS_FUNC_TO_DATA_PTR(JSObject*, setter)); } } } diff --git a/js/src/xpconnect/src/xpcwrappednativejsops.cpp b/js/src/xpconnect/src/xpcwrappednativejsops.cpp --- a/js/src/xpconnect/src/xpcwrappednativejsops.cpp +++ b/js/src/xpconnect/src/xpcwrappednativejsops.cpp @@ -378,7 +378,8 @@ if(resolved) *resolved = JS_TRUE; return OBJ_DEFINE_PROPERTY(ccx, obj, id, JSVAL_VOID, - (JSPropertyOp) funobj, nsnull, + JS_DATA_TO_FUNC_PTR(JSPropertyOp, funobj), + nsnull, propFlags, nsnull); } @@ -484,8 +485,8 @@ JSObject* funobj = JSVAL_TO_OBJECT(funval); return JS_ValueToId(ccx, idval, &id) && OBJ_DEFINE_PROPERTY(ccx, obj, id, JSVAL_VOID, - (JSPropertyOp) funobj, - (JSPropertyOp) funobj, + JS_DATA_TO_FUNC_PTR(JSPropertyOp, funobj), + JS_DATA_TO_FUNC_PTR(JSPropertyOp, funobj), propFlags, nsnull); } diff --git a/gfx/qcms/qcmsint.h b/gfx/qcms/qcmsint.h --- a/gfx/qcms/qcmsint.h +++ b/gfx/qcms/qcmsint.h @@ -86,8 +86,10 @@ uint16_t *output_table; }; #if 0 -this is from an intial idea of having the struct correspond to the data in -the file. I decided that it wasn't a good idea. +/* + * this is from an intial idea of having the struct correspond to the data in + * the file. I decided that it wasn't a good idea. + */ struct tag_value { uint32_t type; union { diff --git a/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp b/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp --- a/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp +++ b/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp @@ -393,9 +393,11 @@ return NS_ERROR_UNEXPECTED; } #if 0 - We don't currently support CMYK profiles. The following - code dealt with lcms types. Add something like this - back when we gain support for CMYK. + /* + * We don't currently support CMYK profiles. The following + * code dealt with lcms types. Add something like this + * back when we gain support for CMYK. + */ /* Adobe Photoshop writes YCCK/CMYK files with inverted data */ if (mInfo.out_color_space == JCS_CMYK) type |= FLAVOR_SH(mInfo.saw_Adobe_marker ? 1 : 0); diff --git a/security/nss/lib/freebl/os2_rand.c b/security/nss/lib/freebl/os2_rand.c --- a/security/nss/lib/freebl/os2_rand.c +++ b/security/nss/lib/freebl/os2_rand.c @@ -369,5 +369,5 @@ size_t RNG_SystemRNG(void *dest, size_t maxLen) { - return rng_systemFromNoise(dest,maxlen); + return rng_systemFromNoise(dest,maxLen); }