Your Search Results

    VC6 Build Instructions

    VC6 does not build trunk, for twenty-<strike>nine</strike>eight reasons:

    • VC6 incorrectly compiles libpixman which causes it to display complex graphics incorrectly.
    • VC6 cannot compile parental controls because that requires the Vista SDK which does not support VC6. (More information on supported SDKs.) This can be worked around by disabling the Vista SDK requirements using the --disable-vista-sdk-requiements configure option.
    • VC6 doesn't recognise inner classes as friends of outer classes and thus fails to compile nsSVGClipPathFrame, nsSVGMaskFrame, nsTreeBodyFrame, gfxSparseBitSet, NodePool, nsSVGCircleElement, GlyphWidths or nsTObserverArray correctly. For nsSVGClipPathFrame, nsSVGMaskFrame, nsSVGLength2, nsTreeBodyFrame and nsTObserverArray an explicit friend declaration is required while for GlyphWidths the enum needs to be moved into the inner class while for gfxSparseBitSet and NodePool the constant needs to be made public and for nsSVGElement, nsSVGLength2 and nsSVGAngle the related classes need to be made public using these patches:
    Index: nsSVGClipPathFrame.h
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGClipPathFrame.h,v
    retrieving revision 1.12
    diff -u -r1.12 nsSVGClipPathFrame.h
    --- nsSVGClipPathFrame.h	17 Apr 2007 09:01:52 -0000	1.12
    +++ nsSVGClipPathFrame.h	19 Apr 2007 07:17:07 -0000
    @@ -97,6 +97,7 @@
       private:
         nsSVGClipPathFrame *mFrame;
       };
    +  friend class AutoClipPathReferencer;
     
       nsISVGChildFrame *mClipParent;
       nsCOMPtr<nsIDOMSVGMatrix> mClipParentMatrix;
    Index: nsSVGMaskFrame.h
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGMaskFrame.h,v
    retrieving revision 1.9
    diff -u -r1.9 nsSVGMaskFrame.h
    --- nsSVGMaskFrame.h	21 Jun 2007 11:01:41 -0000	1.9
    +++ nsSVGMaskFrame.h	22 Jun 2007 08:04:07 -0000
    @@ -93,6 +93,7 @@
       private:
         nsSVGMaskFrame *mFrame;
       };
    +  friend class AutoMaskReferencer;
     
       nsISVGChildFrame *mMaskParent;
       nsCOMPtr<nsIDOMSVGMatrix> mMaskParentMatrix;
    
    Index: nsTreeBodyFrame.h
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.h,v
    retrieving revision 1.118
    diff -u -r1.118 nsTreeBodyFrame.h
    --- nsTreeBodyFrame.h	14 Jun 2007 08:37:22 -0000	1.118
    +++ nsTreeBodyFrame.h	15 Jun 2007 23:27:08 -0000
    @@ -404,6 +404,7 @@
       private:
         nsTreeBodyFrame* mInner;
       };
    +  friend class ScrollEvent;
     
       void PostScrollEvent();
       void FireScrollEvent();
    
    Index: gfxFontUtils.h
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/thebes/public/gfxFontUtils.h,v
    retrieving revision 1.5
    diff -u -r1.5 gfxFontUtils.h
    --- gfxFontUtils.h	20 Mar 2008 05:35:05 -0000	1.5
    +++ gfxFontUtils.h	21 Mar 2008 13:43:25 -0000
    @@ -58,11 +58,12 @@
     // code from gfxWindowsFonts.h
     
     class gfxSparseBitSet {
    -private:
    +public:
         enum { BLOCK_SIZE = 32 };   // ==> 256 codepoints per block
         enum { BLOCK_SIZE_BITS = BLOCK_SIZE * 8 };
         enum { BLOCK_INDEX_SHIFT = 8 };
     
    +private:
         struct Block {
             Block(const Block& aBlock) { memcpy(mBits, aBlock.mBits, sizeof(mBits)); }
             Block(unsigned char memsetValue = 0) { memset(mBits, memsetValue, BLOCK_SIZE); }
    Index: gfxFont.h
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/thebes/public/gfxFont.h,v
    retrieving revision 1.87
    diff -u -r1.87 gfxFont.h
    --- gfxFont.h	2 Oct 2007 01:47:40 -0000	1.87
    +++ gfxFont.h	3 Oct 2007 07:46:36 -0000
    @@ -294,9 +294,9 @@
         };
     
         typedef unsigned long PtrBits;
    -    enum { BLOCK_SIZE_BITS = 7, BLOCK_SIZE = 1 << BLOCK_SIZE_BITS }; // 128-glyph blocks
     
         class GlyphWidths {
    +      enum { BLOCK_SIZE_BITS = 7, BLOCK_SIZE = 1 << BLOCK_SIZE_BITS }; // 128-glyph blocks
         public:
             void Set(PRUint32 aIndex, PRUint16 aValue);
             PRUint16 Get(PRUint32 aIndex) const {
    
    Index: nsCycleCollector.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/base/nsCycleCollector.cpp,v
    retrieving revision 1.34
    diff -u -r1.34 nsCycleCollector.cpp
    --- nsCycleCollector.cpp	25 Apr 2007 21:12:11 -0000	1.34
    +++ nsCycleCollector.cpp	26 Apr 2007 22:09:05 -0000
    @@ -465,9 +465,10 @@
      */
     class NodePool
     {
    -private:
    +public:
         enum { BlockSize = 32 * 1024 }; // could be int template parameter
     
    +private:
         struct Block {
             Block* mNext;
             PtrInfo mEntries[BlockSize];
    
    Index: nsSVGElement.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGElement.h,v
    retrieving revision 1.74
    diff -u -r1.74 nsSVGElement.h
    --- nsSVGElement.h	26 Sep 2007 09:22:08 -0000	1.74
    +++ nsSVGElement.h	27 Sep 2007 06:26:00 -0000
    @@ -148,6 +148,7 @@
       
       static nsIAtom* GetEventNameForAttr(nsIAtom* aAttr);
     
    +public:
       struct LengthInfo {
         nsIAtom** mName;
         float     mDefaultValue;
    Index: nsSVGLength2.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGLength2.h,v
    retrieving revision 1.5
    diff -u -r1.5 nsSVGLength2.h
    --- nsSVGLength2.h	3 Oct 2007 09:02:19 -0000	1.5
    +++ nsSVGLength2.h	4 Oct 2007 16:31:54 -0000
    @@ -198,6 +198,10 @@
         NS_IMETHOD GetAnimVal(nsIDOMSVGLength **aAnimVal)
           { return mVal->ToDOMAnimVal(aAnimVal, mSVGElement); }
       };
    +
    +  friend struct DOMBaseVal;
    +  friend struct DOMAnimVal;
    +  friend struct DOMAnimatedLength;
     };
     
     #endif
    Index: nsSVGAngle.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGAngle.h,v
    retrieving revision 1.6
    diff -u -r1.6 nsSVGAngle.h
    --- nsSVGAngle.h	10 Oct 2007 10:07:59 -0000	1.6
    +++ nsSVGAngle.h	11 Oct 2007 23:41:20 -0000
    @@ -182,6 +182,9 @@
         NS_IMETHOD GetAnimVal(nsIDOMSVGAngle **aAnimVal)
           { return mVal->ToDOMAnimVal(aAnimVal, mSVGElement); }
       };
    +  friend struct DOMBaseVal;
    +  friend struct DOMAnimVal;
    +  friend struct DOMAnimatedAngle;
     };
     
     nsresult
    Index: nsTObserverArray.h
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/glue/nsTObserverArray.h,v
    retrieving revision 1.9
    diff -u -r1.9 nsTObserverArray.h
    --- nsTObserverArray.h	20 Dec 2007 07:30:04 -0000	1.9
    +++ nsTObserverArray.h	21 Dec 2007 14:04:43 -0000
    @@ -243,7 +243,7 @@
         //
     
         // Base class for iterators. Do not use this directly.
    -    class Iterator : public Iterator_base {
    +    class Iterator : public ::nsTObserverArray_base::Iterator_base {
           protected:
             friend class nsAutoTObserverArray;
             typedef nsAutoTObserverArray<T, N> array_type;
    @@ -265,6 +265,7 @@
             // The array we're iterating
             array_type& mArray;
         };
    +    friend class Iterator;
     
         // Iterates the array forward from beginning to end. mPosition points
         // to the element that will be returned on next call to GetNext.
    
    • VC6 only allows a simple type name in a scope override. Furthermore it confuses inner classes that have the same simple name. This can be alleviated using these patches:
    Index: nsAgg.h
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/base/nsAgg.h,v
    retrieving revision 1.25
    diff -u -r1.25 nsAgg.h
    --- nsAgg.h	29 Oct 2007 13:45:09 -0000	1.25
    +++ nsAgg.h	31 Oct 2007 15:38:57 -0000
    @@ -99,7 +99,7 @@
     public:                                                                     \
     
     #define NS_DECL_AGGREGATED_CYCLE_COLLECTION_CLASS(_class)                   \
    -class NS_CYCLE_COLLECTION_INNERCLASS                                        \
    +class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                \
      : public nsXPCOMCycleCollectionParticipant                                 \
     {                                                                           \
     public:                                                                     \
    @@ -119,7 +119,8 @@
         return p->InnerObject();                                                \
       }                                                                         \
     };                                                                          \
    -NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                        \
    +NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
     
     // Put this in your class's constructor:
     #define NS_INIT_AGGREGATED(outer)                                           \
    
    Index: nsCycleCollectionParticipant.h
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/glue/nsCycleCollectionParticipant.h,v
    retrieving revision 3.13
    diff -u -r3.13 nsCycleCollectionParticipant.h
    --- nsCycleCollectionParticipant.h	30 Jan 2008 02:05:45 -0000	3.13
    +++ nsCycleCollectionParticipant.h	13 Feb 2008 12:28:38 -0000
    @@ -168,11 +168,11 @@
     // Helpers for implementing a QI to nsXPCOMCycleCollectionParticipant
     ///////////////////////////////////////////////////////////////////////////////
     
    -#define NS_CYCLE_COLLECTION_INNERCLASS                                         \
    -        cycleCollection
    +#define NS_CYCLE_COLLECTION_INNERCLASS(_class)                                 \
    +        cycleCollection_ ## _class
     
     #define NS_CYCLE_COLLECTION_CLASSNAME(_class)                                  \
    -        _class::NS_CYCLE_COLLECTION_INNERCLASS
    +        _class::NS_CYCLE_COLLECTION_INNERCLASS(_class)
     
     #define NS_CYCLE_COLLECTION_INNERNAME                                          \
             _cycleCollectorGlobal
    @@ -274,7 +274,7 @@
         NS_ASSERTION(CheckForRightISupports(s),                                    \
                      "not the nsISupports pointer we expect");                     \
         _class *tmp = static_cast<_class*>(Downcast(s));                           \
    -    NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::Unlink(s);
    +    NS_CYCLE_COLLECTION_INNERCLASS(_base_class)::Unlink(s);
     
     #define NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_NATIVE(_class)                   \
       NS_IMETHODIMP                                                                \
    @@ -346,7 +346,7 @@
         NS_ASSERTION(CheckForRightISupports(s),                                    \
                      "not the nsISupports pointer we expect");                     \
         _class *tmp = static_cast<_class*>(Downcast(s));                           \
    -    NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::Traverse(s, cb);
    +    NS_CYCLE_COLLECTION_INNERCLASS(_base_class)::Traverse(s, cb);
     
     #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_BEGIN(_class)                 \
       NS_IMETHODIMP                                                                \
    @@ -442,8 +442,8 @@
     // Helpers for implementing a concrete nsCycleCollectionParticipant 
     ///////////////////////////////////////////////////////////////////////////////
     
    -#define NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE                               \
    -  static NS_CYCLE_COLLECTION_INNERCLASS NS_CYCLE_COLLECTION_INNERNAME;
    +#define NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)                       \
    +  static NS_CYCLE_COLLECTION_INNERCLASS(_class) NS_CYCLE_COLLECTION_INNERNAME;
     
     #define NS_DECL_CYCLE_COLLECTION_CLASS_BODY_NO_UNLINK(_class, _base)           \
     public:                                                                        \
    @@ -467,12 +467,13 @@
       NS_IMETHOD Unlink(void *p);
     
     #define NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(_class, _base)                \
    -class NS_CYCLE_COLLECTION_INNERCLASS                                           \
    +class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                   \
      : public nsXPCOMCycleCollectionParticipant                                    \
     {                                                                              \
       NS_DECL_CYCLE_COLLECTION_CLASS_BODY(_class, _base)                           \
     };                                                                             \
    -NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                           \
    +NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
     
     #define NS_DECL_CYCLE_COLLECTION_CLASS(_class)                                 \
       NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(_class, _class)
    @@ -481,7 +482,7 @@
     // Note: if this is used a lot it might make sense to have a base class that
     //       doesn't do anything in RootAndUnlinkJSObjects/Unlink/Unroot.
     #define NS_DECL_CYCLE_COLLECTION_CLASS_NO_UNLINK(_class)                       \
    -class NS_CYCLE_COLLECTION_INNERCLASS                                           \
    +class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                   \
      : public nsXPCOMCycleCollectionParticipant                                    \
     {                                                                              \
       NS_DECL_CYCLE_COLLECTION_CLASS_BODY_NO_UNLINK(_class, _class)                \
    @@ -498,24 +499,28 @@
         return NS_OK;                                                              \
       }                                                                            \
     };                                                                             \
    -NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                           \
    +NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
     
     #define NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(_class, _base)  \
    -class NS_CYCLE_COLLECTION_INNERCLASS                                           \
    +class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                   \
      : public nsXPCOMCycleCollectionParticipant                                    \
     {                                                                              \
       NS_IMETHOD RootAndUnlinkJSObjects(void *p);                                  \
       NS_DECL_CYCLE_COLLECTION_CLASS_BODY(_class, _base)                           \
       NS_IMETHOD_(void) Trace(void *p, TraceCallback cb, void *closure);           \
     };                                                                             \
    -NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                           \
    +NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
     
     #define NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(_class)  \
       NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(_class, _class)
     
     #define NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(_class, _base_class)          \
    -class NS_CYCLE_COLLECTION_INNERCLASS                                           \
    - : public NS_CYCLE_COLLECTION_CLASSNAME(_base_class)                           \
    +typedef NS_CYCLE_COLLECTION_CLASSNAME(_base_class)                             \
    +        NS_CYCLE_COLLECTION_INNERCLASS(_base_class);                           \
    +class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                   \
    + : public NS_CYCLE_COLLECTION_INNERCLASS(_base_class)                          \
     {                                                                              \
     public:                                                                        \
       NS_IMETHOD Unlink(void *p);                                                  \
    @@ -527,12 +532,15 @@
           NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::Downcast(s)));               \
       }                                                                            \
     };                                                                             \
    -NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                           \
    +NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
     
     #define NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(_class,             \
                                                                _base_class)        \
    -class NS_CYCLE_COLLECTION_INNERCLASS                                           \
    - : public NS_CYCLE_COLLECTION_CLASSNAME(_base_class)                           \
    +typedef NS_CYCLE_COLLECTION_CLASSNAME(_base_class)                             \
    +        NS_CYCLE_COLLECTION_INNERCLASS(_base_class);                           \
    +class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                   \
    + : public NS_CYCLE_COLLECTION_INNERCLASS(_base_class)                          \
     {                                                                              \
     public:                                                                        \
       NS_IMETHOD Traverse(void *p,                                                 \
    @@ -543,7 +551,12 @@
           NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::Downcast(s)));               \
       }                                                                            \
     };                                                                             \
    -NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                           \
    +NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
    +
    +#define NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_USING(_class, _base_class)    \
    +typedef NS_CYCLE_COLLECTION_CLASSNAME(_base_class)                             \
    +        NS_CYCLE_COLLECTION_CLASSNAME(_class);
     
     /**
      * This implements a stub UnmarkPurple function for classes that want to be
    @@ -568,21 +581,23 @@
                           nsCycleCollectionTraversalCallback &cb);
     
     #define NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(_class)                          \
    -  class NS_CYCLE_COLLECTION_INNERCLASS                                         \
    +  class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                 \
        : public nsCycleCollectionParticipant                                       \
       {                                                                            \
          NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS_BODY                                \
       };                                                                           \
    -  NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +  friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                         \
    +  NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
     
     #define NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(_class)            \
    -  class NS_CYCLE_COLLECTION_INNERCLASS                                         \
    +  class NS_CYCLE_COLLECTION_INNERCLASS(_class)                                 \
        : public nsScriptObjectTracer                                               \
       {                                                                            \
         NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS_BODY                                 \
         NS_IMETHOD_(void) Trace(void *p, TraceCallback cb, void *closure);         \
       };                                                                           \
    -  NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +  friend class NS_CYCLE_COLLECTION_INNERCLASS(_class);                         \
    +  NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(_class)
     
     #define NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(_class, _root_function)           \
       NS_IMETHODIMP                                                                \
    
    Index: nsGenericHTMLElement.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/html/content/src/nsGenericHTMLElement.h,v
    retrieving revision 1.295
    diff -u -r1.295 nsGenericHTMLElement.h
    --- nsGenericHTMLElement.h	2 Feb 2008 23:41:25 -0000	1.295
    +++ nsGenericHTMLElement.h	13 Feb 2008 12:12:48 -0000
    @@ -79,6 +79,9 @@
       {
       }
     
    +  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_USING(nsGenericHTMLElement,
    +                                                 nsGenericElement)
    +
       /** Typesafe, non-refcounting cast from nsIContent.  Cheaper than QI. **/
       static nsGenericHTMLElement* FromContent(nsIContent *aContent)
       {
    @@ -815,6 +818,9 @@
     
       NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
     
    +  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_USING(nsGenericHTMLFormElement,
    +                                                 nsGenericHTMLElement)
    +
       virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
       virtual void DestroyContent();
     
    
    Index: nsSVGUseElement.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGUseElement.cpp,v
    retrieving revision 1.35
    diff -u -r1.35 nsSVGUseElement.cpp
    --- nsSVGUseElement.cpp	3 Dec 2007 17:50:02 -0000	1.35
    +++ nsSVGUseElement.cpp	4 Dec 2007 09:33:39 -0000
    @@ -64,13 +64,13 @@
     
     NS_IMPL_CYCLE_COLLECTION_CLASS(nsSVGUseElement)
     NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsSVGUseElement,
    -                                                nsSVGUseElementBase)
    +                                                nsGenericElement)
       NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mOriginal)
       tmp->DestroyAnonymousContent();
       tmp->RemoveListener();
     NS_IMPL_CYCLE_COLLECTION_UNLINK_END
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsSVGUseElement,
    -                                                  nsSVGUseElementBase)
    +                                                  nsGenericElement)
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mOriginal)
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mClone)
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mSourceContent)
    Index: nsSVGUseElement.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGUseElement.h,v
    retrieving revision 1.4
    diff -u -r1.4 nsSVGUseElement.h
    --- nsSVGUseElement.h	30 Nov 2007 18:41:10 -0000	1.4
    +++ nsSVGUseElement.h	1 Dec 2007 15:22:07 -0000
    @@ -76,7 +76,7 @@
       // interfaces:
       
       NS_DECL_ISUPPORTS_INHERITED
    -  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsSVGUseElement, nsSVGUseElementBase)
    +  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsSVGUseElement, nsGenericElement)
       NS_DECL_NSIDOMSVGUSEELEMENT
       NS_DECL_NSIDOMSVGURIREFERENCE
     
    
    Index: nsXTFElementWrapper.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/xtf/src/nsXTFElementWrapper.cpp,v
    retrieving revision 1.60
    diff -u -r1.60 nsXTFElementWrapper.cpp
    --- nsXTFElementWrapper.cpp	30 Nov 2007 17:57:04 -0000	1.60
    +++ nsXTFElementWrapper.cpp	1 Dec 2007 15:22:08 -0000
    @@ -109,7 +109,7 @@
     
     NS_IMPL_CYCLE_COLLECTION_CLASS(nsXTFElementWrapper)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXTFElementWrapper,
    -                                                  nsXTFElementWrapperBase)
    +                                                  nsGenericElement)
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mXTFElement)
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mAttributeHandler)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
    Index: nsXTFElementWrapper.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/xtf/src/nsXTFElementWrapper.h,v
    retrieving revision 1.42
    diff -u -r1.42 nsXTFElementWrapper.h
    --- nsXTFElementWrapper.h	30 Nov 2007 17:57:04 -0000	1.42
    +++ nsXTFElementWrapper.h	1 Dec 2007 15:22:08 -0000
    @@ -66,7 +66,7 @@
       // nsISupports interface
       NS_DECL_ISUPPORTS_INHERITED
       NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsXTFElementWrapper,
    -                                                     nsXTFElementWrapperBase)
    +                                                     nsGenericElement)
     
       // nsIXTFElementWrapper
       NS_DECL_NSIXTFELEMENTWRAPPER
    
    Index: xpcprivate.h
    ===================================================================
    RCS file: /cvsroot/mozilla/js/src/xpconnect/src/xpcprivate.h,v
    retrieving revision 1.280
    diff -u -r1.280 xpcprivate.h
    --- xpcprivate.h	29 Feb 2008 02:09:10 -0000	1.280
    +++ xpcprivate.h	1 Mar 2008 10:55:07 -0000
    @@ -2079,7 +2079,7 @@
         // Root/Unroot methods, to avoid root/unrooting the JS objects from
         // addrefing/releasing the XPCWrappedNative during unlinking, which would
         // make the JS objects uncollectable to the JS GC.
    -    class NS_CYCLE_COLLECTION_INNERCLASS
    +    class NS_CYCLE_COLLECTION_INNERCLASS(XPCWrappedNative)
          : public nsXPCOMCycleCollectionParticipant
         {
           NS_DECL_CYCLE_COLLECTION_CLASS_BODY_NO_UNLINK(XPCWrappedNative,
    @@ -2088,7 +2088,8 @@
           NS_IMETHOD Unlink(void *p) { return NS_OK; }
           NS_IMETHOD Unroot(void *p) { return NS_OK; }
         };
    -    NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +    friend class NS_CYCLE_COLLECTION_INNERCLASS(XPCWrappedNative);
    +    NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(XPCWrappedNative)
         NS_DECL_CYCLE_COLLECTION_UNMARK_PURPLE_STUB(XPCWrappedNative)
     
     #ifndef XPCONNECT_STANDALONE
    @@ -2519,13 +2520,14 @@
         NS_DECL_NSISUPPORTSWEAKREFERENCE
         NS_DECL_NSIPROPERTYBAG
     
    -    class NS_CYCLE_COLLECTION_INNERCLASS
    +    class NS_CYCLE_COLLECTION_INNERCLASS(nsXPCWrappedJS)
          : public nsXPCOMCycleCollectionParticipant
         {
           NS_IMETHOD RootAndUnlinkJSObjects(void *p);
           NS_DECL_CYCLE_COLLECTION_CLASS_BODY(nsXPCWrappedJS, nsIXPConnectWrappedJS)
         };
    -    NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE
    +    friend class NS_CYCLE_COLLECTION_INNERCLASS(nsXPCWrappedJS);
    +    NS_CYCLE_COLLECTION_PARTICIPANT_INSTANCE(nsXPCWrappedJS)
         NS_DECL_CYCLE_COLLECTION_UNMARK_PURPLE_STUB(nsXPCWrappedJS)
     
         NS_IMETHOD CallMethod(PRUint16 methodIndex,
    
    Index: nsXMLDocument.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/xml/document/src/nsXMLDocument.h,v
    retrieving revision 1.91
    diff -u -r1.91 nsXMLDocument.h
    --- nsXMLDocument.h	25 Jan 2008 21:49:11 -0000	1.91
    +++ nsXMLDocument.h	13 Feb 2008 12:12:57 -0000
    @@ -62,6 +62,8 @@
     
       NS_DECL_ISUPPORTS_INHERITED
     
    +  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_USING(nsXMLDocument, nsDocument)
    +
       virtual void Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
       virtual void ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
                               nsIPrincipal* aPrincipal);
    
    Index: ssltunnel.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/testing/mochitest/ssltunnel/ssltunnel.cpp,v
    retrieving revision 1.1
    diff -u -r1.1 ssltunnel.cpp
    --- ssltunnel.cpp	9 Apr 2008 15:30:55 -0000	1.1
    +++ ssltunnel.cpp	10 Apr 2008 12:24:04 -0000
    @@ -61,6 +61,8 @@
       string cert_nickname;
     } server_info_t;
     
    +typedef vector<server_info_t> server_info_v;
    +
     typedef struct {
       PRFileDesc* client_sock;
       PRNetAddr client_addr;
    @@ -303,7 +305,7 @@
       remote_addr.inet.port = PR_htons(port);
     
       // get our list of cert:port from the remaining args
    -  vector<server_info_t> servers;
    +  server_info_v servers;
       for (int i=4; i<argc; i++) {
         server_info_t server;
         memcpy(&server.remote_addr, &remote_addr, sizeof(PRNetAddr));
    @@ -378,7 +378,7 @@
         return 1;
       }
     
    -  for (vector<server_info_t>::iterator it = servers.begin();
    +  for (server_info_v::iterator it = servers.begin();
            it != servers.end(); it++) {
         // Not actually using this PRJob*...
         // PRJob* server_job =
    
    • VC6 gets confused by non-global references to protected inner classes of base classes. This can be alleviated by making them global using this patch:
    Index: txExpandedNameMap.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/xslt/src/base/txExpandedNameMap.h,v
    retrieving revision 1.9
    diff -u -r1.9 txExpandedNameMap.h
    --- txExpandedNameMap.h	12 Dec 2006 01:59:29 -0000	1.9
    +++ txExpandedNameMap.h	13 Dec 2006 09:11:09 -0000
    @@ -165,7 +165,7 @@
             clearItems();
         }
     
    -    class iterator : public iterator_base
    +    class iterator : public ::txExpandedNameMap_base::iterator_base
         {
         public:
             iterator(txExpandedNameMap& aMap)
    @@ -219,7 +219,7 @@
             clearItems();
         }
     
    -    class iterator : public iterator_base
    +    class iterator : public ::txExpandedNameMap_base::iterator_base
         {
         public:
             iterator(txOwningExpandedNameMap& aMap)
    
    • VC6 incorrectly thinks that references to static members of multiply derived classes are ambiguous. Not only is VC6 also getting confused again by more non-global references to inner classes, but it's also only instantiating the template for nsISupports. However these can be alleviated using these patches:
    Index: nsAccessibleEventData.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/accessible/src/base/nsAccessibleEventData.cpp,v
    retrieving revision 1.27
    diff -u -r1.27 nsAccessibleEventData.cpp
    --- nsAccessibleEventData.cpp	18 Jan 2008 02:56:39 -0000	1.27
    +++ nsAccessibleEventData.cpp	19 Jan 2008 18:27:25 -0000
    @@ -336,7 +336,7 @@
     nsAccTextChangeEvent::
       nsAccTextChangeEvent(nsIAccessible *aAccessible,
                            PRInt32 aStart, PRUint32 aLength, PRBool aIsInserted, PRBool aIsAsynch):
    -  nsAccEvent(aIsInserted ? nsIAccessibleEvent::EVENT_TEXT_INSERTED : nsIAccessibleEvent::EVENT_TEXT_REMOVED,
    +  nsAccEvent(aIsInserted ? ::nsIAccessibleEvent::EVENT_TEXT_INSERTED : ::nsIAccessibleEvent::EVENT_TEXT_REMOVED,
                  aAccessible, aIsAsynch),
       mStart(aStart), mLength(aLength), mIsInserted(aIsInserted)
     {
    
    Index: nsID.h
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/glue/nsID.h,v
    retrieving revision 1.23
    diff -u -r1.23 nsID.h
    --- nsID.h	14 Nov 2006 21:21:37 -0000	1.23
    +++ nsID.h	2 Jan 2007 21:49:28 -0000
    @@ -137,7 +137,7 @@
      * A macro to build the static const IID accessor method. The Dummy
      * template parameter only exists so that the kIID symbol will be linked
      * properly (weak symbol on linux, gnu_linkonce on mac, multiple-definitions
    - * merged on windows). Dummy should always be instantiated as "int".
    + * merged on windows). Dummy should always be instantiated as the interface.
      */
     
     #define NS_DECLARE_STATIC_IID_ACCESSOR(the_iid)                         \
    @@ -146,7 +146,7 @@
       {                                                                     \
         static const nsIID kIID NS_HIDDEN;                                  \
       };                                                                    \
    -  static const nsIID& GetIID() {return COMTypeInfo<int>::kIID;}
    +  static const nsIID& GetIID() {static const nsID iid = the_iid; return iid;}
     
     #define NS_DEFINE_STATIC_IID_ACCESSOR(the_interface, the_iid)           \
       template <class Dummy>                                                \
    @@ -159,7 +159,7 @@
     #define NS_DEFINE_STATIC_CID_ACCESSOR(the_cid) \
       static const nsID& GetCID() {static const nsID cid = the_cid; return cid;}
     
    -#define NS_GET_IID(T) (::T::COMTypeInfo<int>::kIID)
    -#define NS_GET_TEMPLATE_IID(T) (T::template COMTypeInfo<int>::kIID)
    +#define NS_GET_IID(T) (::T::COMTypeInfo<T>::kIID)
    +#define NS_GET_TEMPLATE_IID(T) (T::COMTypeInfo<T>::kIID)
     
     #endif
    Index: nsISupportsImpl.h
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/glue/nsISupportsImpl.h,v
    retrieving revision 3.53
    diff -u -r3.53 nsISupportsImpl.h
    --- nsISupportsImpl.h	6 Mar 2008 23:03:50 -0000	3.53
    +++ nsISupportsImpl.h	8 Mar 2008 16:11:06 -0000
    @@ -432,19 +432,19 @@
       static const QITableEntry table[] = {
     
     #define NS_INTERFACE_TABLE_ENTRY(_class, _interface)                          \
    -  { &_interface::COMTypeInfo<int>::kIID,                                      \
    +  { &NS_GET_IID(_interface),                                                  \
         PROffset32(reinterpret_cast<char*>(                                       \
    -                        static_cast<_interface*>((_class*) 0x1000)) -         \
    -               reinterpret_cast<char*>((_class*) 0x1000))                     \
    +                        static_cast<_interface*>((::_class*) 0x1000)) -       \
    +    reinterpret_cast<char*>((::_class*) 0x1000))                              \
       },
     
     #define NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, _interface, _implClass)    \
    -  { &_interface::COMTypeInfo<int>::kIID,                                      \
    +  { &NS_GET_IID(_interface),                                                  \
         PROffset32(reinterpret_cast<char*>(                                       \
                             static_cast<_interface*>(                             \
                                            static_cast<_implClass*>(              \
    -                                                      (_class*) 0x1000))) -   \
    -               reinterpret_cast<char*>((_class*) 0x1000))                     \
    +                                                      (::_class*) 0x1000))) - \
    +    reinterpret_cast<char*>((::_class*) 0x1000))                              \
       },
     
     #define NS_INTERFACE_TABLE_END_WITH_PTR(_ptr)                                 \
    
    • VC6 only allows array-style initializers for POD types, so it fails to compile the initializers for EudoraDefaultLabels, nsARIAMap or CharacterPosition, and as it doesn't allow const members of a POD type, it also fails to compile the initializers for txFunctionFactoryMapping. However this can be alleviated using these patches:
    Index: nsEudoraImport.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/mailnews/import/eudora/src/nsEudoraImport.cpp,v
    retrieving revision 1.48
    diff -u -r1.48 nsEudoraImport.cpp
    --- nsEudoraImport.cpp	20 Sep 2007 23:00:17 -0000	1.48
    +++ nsEudoraImport.cpp	21 Sep 2007 09:41:02 -0000
    @@ -375,7 +375,7 @@
         struct EudoraDefaultLabels
         {
           char *    key;
    -      nsString  tag;
    +      char *    tag;
           char *    color;
         };
     
    @@ -386,20 +386,20 @@
         // Use one dummy entry for now as a placeholder to keep the Mac code valid,
         // until we enter actual reasonable defaults for Mac builds.
         EudoraDefaultLabels    defaultEudoraLabels[1] =
    -                    { "eudoralabel1", NS_LITERAL_STRING("Label 1"), "#FF6600" };
    +                    { "eudoralabel1", "Label 1", "#FF6600" };
     #else
         // These aren't the actual default Windows Eudora colors. Rather they're the closest
         // equivalents that I could find that Thunderbird supports. When importing actual
         // label settings, we'll need to map Eudora colors to ones that are supported.
         #define    kNumEudoraLabels    7
         EudoraDefaultLabels    defaultEudoraLabels[kNumEudoraLabels] =
    -                    { "eudoralabel1", NS_LITERAL_STRING("Label 1"), "#FF6600",
    -                      "eudoralabel2", NS_LITERAL_STRING("Label 2"), "#FF0000",
    -                      "eudoralabel3", NS_LITERAL_STRING("Label 3"), "#CC66CC",
    -                      "eudoralabel4", NS_LITERAL_STRING("Label 4"), "#3366FF",
    -                      "eudoralabel5", NS_LITERAL_STRING("Label 5"), "#000099",
    -                      "eudoralabel6", NS_LITERAL_STRING("Label 6"), "#009900",
    -                      "eudoralabel7", NS_LITERAL_STRING("Label 7"), "#663333" };
    +                    { "eudoralabel1", "Label 1", "#FF6600",
    +                      "eudoralabel2", "Label 2", "#FF0000",
    +                      "eudoralabel3", "Label 3", "#CC66CC",
    +                      "eudoralabel4", "Label 4", "#3366FF",
    +                      "eudoralabel5", "Label 5", "#000099",
    +                      "eudoralabel6", "Label 6", "#009900",
    +                      "eudoralabel7", "Label 7", "#663333" };
     #endif
     
         nsCString      eudoraKey;
    @@ -411,7 +411,7 @@
           rv = pTagService->GetTagForKey(eudoraKey, eudoraTag);
           if ( NS_FAILED(rv) || eudoraTag.IsEmpty() ) {
             eudoraColor = defaultEudoraLabels[i].color;
    -        rv = pTagService->AddTagForKey( eudoraKey, defaultEudoraLabels[i].tag, eudoraColor, EmptyCString() );
    +        rv = pTagService->AddTagForKey( eudoraKey, NS_ConvertASCIItoUTF16(defaultEudoraLabels[i].tag), eudoraColor, EmptyCString() );
           }
         }
       }
    
    Index: nsARIAMap.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/accessible/src/base/nsARIAMap.cpp,v
    retrieving revision 1.19
    diff -u -r1.19 nsARIAMap.cpp
    --- nsARIAMap.cpp	12 Dec 2007 02:10:27 -0000	1.19
    +++ nsARIAMap.cpp	13 Dec 2007 13:48:20 -0000
    @@ -56,7 +56,7 @@
      *    banner, contentinfo, main, navigation, note, search, secondary, seealso, breadcrumbs
      */ 
     
    -static const nsStateMapEntry kEndEntry = {nsnull, 0, 0};  // To fill in array of state mappings
    +#define kEndEntry {nsnull, 0, 0}  // To fill in array of state mappings
     
     nsRoleMapEntry nsARIAMap::gWAIRoleMap[] = 
     {
    
    Index: txStylesheetCompiler.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/xslt/src/xslt/txStylesheetCompiler.cpp,v
    retrieving revision 1.29
    diff -u -r1.29 txStylesheetCompiler.cpp
    --- txStylesheetCompiler.cpp	16 Nov 2006 21:42:25 -0000	1.29
    +++ txStylesheetCompiler.cpp	18 Nov 2006 17:28:05 -0000
    @@ -1024,7 +1024,7 @@
                                           FunctionCall** aResult);
     struct txFunctionFactoryMapping
     {
    -    const char* const mNamespaceURI;
    +    const char* mNamespaceURI;
         PRInt32 mNamespaceID;
         txFunctionFactory mFactory;
     };
    
    Index: nsSVGGlyphFrame.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGGlyphFrame.cpp,v
    retrieving revision 1.124
    diff -u -r1.124 nsSVGGlyphFrame.cpp
    --- nsSVGGlyphFrame.cpp	18 Mar 2008 19:50:29 -0000	1.124
    +++ nsSVGGlyphFrame.cpp	19 Mar 2008 12:41:51 -0000
    @@ -1388,7 +1388,9 @@
         return mPositions[mCurrentChar];
     
       gfxFloat advance = mCurrentAdvance/nsSVGGlyphFrame::GetTextRunUnitsFactor();
    -  CharacterPosition cp =
    -    { mSource->mPosition + gfxPoint(advance, 0), 0, PR_TRUE };
    +  CharacterPosition cp;
    +  cp.pos = mSource->mPosition + gfxPoint(advance, 0);
    +  cp.angle = 0;
    +  cp.draw = PR_TRUE;
       return cp;
     }
    
    • VC6 is unable to convert a C* to an A* if C derives from B which derives privately from A, even by B or its friends. In this case, A is txStylesheetCompilerState, B is txStylesheetCompiler and C is nsDerivedSafe<txStylesheetCompiler>. However this can be alleviated using this patch:
    Index: txStylesheetCompiler.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/xslt/src/xslt/txStylesheetCompiler.cpp,v
    retrieving revision 1.30
    diff -u -r1.30 txStylesheetCompiler.cpp
    --- txStylesheetCompiler.cpp	2 Dec 2006 00:01:45 -0000	1.30
    +++ txStylesheetCompiler.cpp	2 Dec 2006 13:26:39 -0000
    @@ -1041,7 +1041,7 @@
     
         nsAutoPtr<FunctionCall> fnCall;
     
    -    return NS_SUCCEEDED(findFunction(aName, aNameSpaceID, compiler,
    +    return NS_SUCCEEDED(findFunction(aName, aNameSpaceID, compiler.get(),
                                          getter_Transfers(fnCall)));
     }
     
    
    • VC6 uses old-style scoping rules for variables declared in for loops, which makes it unable to compile several functions. nsMsgCopyService is a particularly interesting example as VC6 thinks the code is using goto to bypass the variable initialization. However this may be alleviated using these patches:
    Index: BasicTableLayoutStrategy.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/tables/BasicTableLayoutStrategy.cpp,v
    retrieving revision 3&5
    diff -u -r3&5 BasicTableLayoutStrategy.cpp
    --- BasicTableLayoutStrategy.cpp	18 Jan 2008 04:18:22 -0000	3&5
    +++ BasicTableLayoutStrategy.cpp	19 Jan 2008 18:27:25 -0000
    @@ -623,7 +623,8 @@
         // aWidth initially includes border-spacing for the boundaries in between
         // each of the columns. We start at aFirstCol + 1 because the first
         // in-between boundary would be at the left edge of column aFirstCol + 1
    -    for (PRInt32 col = aFirstCol + 1; col < aFirstCol + aColCount; ++col) {
    +    PRInt32 col;
    +    for (col = aFirstCol + 1; col < aFirstCol + aColCount; ++col) {
             if (mTableFrame->GetNumCellsOriginatingInCol(col)) {
                 subtract += spacing;
             }
    @@ -693,7 +694,6 @@
         float total_pct = 0.0f; // 0.0f to 1.0f
         PRInt32 numInfiniteWidthCols = 0;
     
    -    PRInt32 col;
         for (col = aFirstCol; col < aFirstCol + aColCount; ++col) {
             nsTableColFrame *colFrame = mTableFrame->GetColFrame(col);
             if (!colFrame) {
    
    Index: nsGlobalWindow.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/dom/src/base/nsGlobalWindow.cpp,v
    retrieving revision 1.899
    diff -u -r1.899 nsGlobalWindow.cpp
    --- nsGlobalWindow.cpp	4 Jan 2007 22:31:25 -0000	1.899
    +++ nsGlobalWindow.cpp	11 Jan 2007 21:42:44 -0000
    @@ -687,13 +687,14 @@
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mArguments)
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mArgumentsLast)
     
    -  for (PRUint32 i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
    +  PRUint32 i;
    +  for (i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
         NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mScriptContexts[i])
       }
     
       NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(gGlobalStorageList)
     
    -  for (PRUint32 i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
    +  for (i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
         NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mInnerWindowHolders[i])
       }
     
    @@ -739,13 +740,14 @@
       NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mArguments)
       NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mArgumentsLast)
     
    -  for (PRUint32 i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
    +  PRUint32 i;
    +  for (i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
         NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mScriptContexts[i])
       }
     
       NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(gGlobalStorageList)
     
    -  for (PRUint32 i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
    +  for (i = 0; i < NS_STID_ARRAY_UBOUND; ++i) {      
         NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mInnerWindowHolders[i])
       }
     
    
    Index: nsIdleService.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/widget/src/xpwidgets/nsIdleService.cpp,v
    retrieving revision 1.1
    diff -u -r1.1 nsIdleService.cpp
    --- nsIdleService.cpp	8 Jan 2007 18:13:16 -0000	1.1
    +++ nsIdleService.cpp	11 Jan 2007 21:55:18 -0000
    @@ -164,15 +164,15 @@
         }
     
         // Notify listeners gone idle:
    -    for (PRInt32 i = 0; i < idleListeners.Count(); i++)
    +    for (PRInt32 j = 0; j < idleListeners.Count(); j++)
         {
    -        idleListeners[i]->Observe(this, OBSERVER_TOPIC_IDLE, timeStr.get());
    +        idleListeners[j]->Observe(this, OBSERVER_TOPIC_IDLE, timeStr.get());
         }
     
         // Notify listeners that came back:
    -    for (PRInt32 i = 0; i < hereListeners.Count(); i++)
    +    for (PRInt32 k = 0; k < hereListeners.Count(); k++)
         {
    -        hereListeners[i]->Observe(this, OBSERVER_TOPIC_BACK, timeStr.get());
    +        hereListeners[k]->Observe(this, OBSERVER_TOPIC_BACK, timeStr.get());
         }
     }
    
    Index: nsCSSRendering.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/base/nsCSSRendering.cpp,v
    retrieving revision 3.318
    diff -u -r3.318 nsCSSRendering.cpp
    --- nsCSSRendering.cpp	30 May 2007 08:37:30 -0000	3.318
    +++ nsCSSRendering.cpp	31 May 2007 16:07:52 -0000
    @@ -1955,7 +1955,8 @@
         // all borders are rendered as "solid", but we might need an arbitrary number
         // of them.
         PRUint32 maxBorderWidth = 0;
    -    for (int i = 0; i < 4; i++)
    +    unsigned int i;
    +    for (i = 0; i < 4; i++)
           maxBorderWidth = PR_MAX(maxBorderWidth, PRUint32(borderWidths[i]));
         
         borderColorStyle = new BorderColorStyle[maxBorderWidth];
    @@ -1967,7 +1968,7 @@
           tmp = tmp->mNext;
         } while (tmp);
     
    -    for (unsigned int i = 0; i < borderColorStyleCount; i++) {
    +    for (i = 0; i < borderColorStyleCount; i++) {
           borderColorStyle[i] = BorderColorStyleSolid;
         }
       }
    @@ -2130,7 +2131,8 @@
         gfxRect soRect = oRect;
         gfxRect siRect;
         gfxFloat maxBorderWidth = 0;
    -    for (int i = 0; i < 4; i++)
    +    PRUint32 i;
    +    for (i = 0; i < 4; i++)
           maxBorderWidth = PR_MAX(maxBorderWidth, borderWidths[i]);
     
         // distribute the border sizes evenly as we draw lines; we end up
    @@ -2138,10 +2140,10 @@
         // if some of the sides are bigger than the others, but we have
         // consistent colors all the way around.
         gfxFloat fakeBorderSizes[4];
    -    for (int i = 0; i < 4; i++)
    +    for (i = 0; i < 4; i++)
           fakeBorderSizes[i] = borderWidths[i] / maxBorderWidth;
     
    -    for (PRUint32 i = 0; i < PRUint32(maxBorderWidth); i++) {
    +    for (i = 0; i < PRUint32(maxBorderWidth); i++) {
           gfxRGBA lineColor;
           siRect = soRect;
           siRect.Inset(fakeBorderSizes);
    @@ -2311,7 +2313,8 @@
     
       // do we have any sides that are dotted/dashed?
       PRIntn dashedSides = 0;
    -  for (int i = 0; i < 4; i++) {
    +  int i = 0;
    +  for (i = 0; i < 4; i++) {
         PRUint8 style = borderStyles[i];
         if (style == NS_STYLE_BORDER_STYLE_DASHED ||
             style == NS_STYLE_BORDER_STYLE_DOTTED)
    @@ -2373,7 +2376,7 @@
         if (dashedSides != 0) {
           canAvoidGroup = PR_FALSE;
         } else {
    -      for (int i = 0; i < 4; i++) {
    +      for (i = 0; i < 4; i++) {
             if (borderRadii[i] != 0.0) {
               canAvoidGroup = PR_FALSE;
               break;
    @@ -2468,7 +2471,7 @@
     
       // Render with either 1, 2, or 4 passes, depending on how
       // many are needed to get the job done.
    -  for (int i = 0; i < numRenderPasses; i++) {
    +  for (i = 0; i < numRenderPasses; i++) {
         PRIntn sideBits;
         PRUint8 side;
     
    @@ -2609,7 +2612,8 @@
       aBorderStyle.mBorderRadius.GetLeft(bordStyleRadius[3]);     //bottomleft
     
       // convert percentage values
    -  for(int i = 0; i < 4; i++) {
    +  int i;
    +  for (i = 0; i < 4; i++) {
         twipsRadii[i] = 0;
     
         switch (bordStyleRadius[i].GetUnit()) {
    @@ -2725,7 +2729,7 @@
       nsBorderColors *compositeColors[4];
     
       // pull out styles, colors, composite colors
    -  for (int i = 0; i < 4; i++) {
    +  for (i = 0; i < 4; i++) {
         PRBool transparent, foreground;
         borderStyles[i] = aBorderStyle.GetBorderStyle(i);
         aBorderStyle.GetBorderColor(i, borderColors[i], transparent, foreground);
    Index: nsCSSFrameConstructor.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/base/nsCSSFrameConstructor.cpp,v
    retrieving revision 1.1467
    diff -u -r1.1467 nsCSSFrameConstructor.cpp
    --- nsCSSFrameConstructor.cpp	19 Feb 2008 09:16:20 -0000	1.1467
    +++ nsCSSFrameConstructor.cpp	20 Feb 2008 13:00:51 -0000
    @@ -13245,7 +13245,8 @@
       if (selectorFlags & NODE_HAS_EDGE_CHILD_SELECTOR) {
         // restyle the previously-first element child if it is after this node
         PRBool passedChild = PR_FALSE;
    -    for (PRInt32 index = 0; ; ++index) {
    +    PRInt32 index;
    +    for (index = 0; ; ++index) {
           nsIContent *content = aContainer->GetChildAt(index);
           if (!content)
             break; // went through all children
    @@ -13262,7 +13263,7 @@
         }
         // restyle the previously-last element child if it is before this node
         passedChild = PR_FALSE;
    -    for (PRInt32 index = aContainer->GetChildCount() - 1;
    +    for (index = aContainer->GetChildCount() - 1;
              index >= 0; --index) {
           nsIContent *content = aContainer->GetChildAt(index);
           if (content == aChild) {
    @@ -13321,7 +13322,8 @@
     
       if (selectorFlags & NODE_HAS_EDGE_CHILD_SELECTOR) {
         // restyle the previously-first element child if it is after aOldChild
    -    for (PRInt32 index = 0; ; ++index) {
    +    PRInt32 index;
    +    for (index = 0; ; ++index) {
           nsIContent *content = aContainer->GetChildAt(index);
           if (!content)
             break; // went through all children
    @@ -13333,7 +13335,7 @@
           }
         }
         // restyle the previously-last element child if it is before aOldChild
    -    for (PRInt32 index = aContainer->GetChildCount() - 1;
    +    for (index = aContainer->GetChildCount() - 1;
              index >= 0; --index) {
           nsIContent *content = aContainer->GetChildAt(index);
           if (content->IsNodeOfType(nsINode::eELEMENT)) {
    
    Index: xpcom/tests/TestProxies.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/tests/TestProxies.cpp,v
    retrieving revision 1.1
    diff -u -r1.1 TestProxies.cpp
    --- xpcom/tests/TestProxies.cpp	9 May 2008 00:14:19 -0000	1.1
    +++ xpcom/tests/TestProxies.cpp	10 May 2008 22:06:55 -0000
    @@ -402,7 +402,7 @@
       // Make sure a non-threadsafe object and proxy to it (both created on the same
       // thread) can be used on the same thread.
     
    -  PRUint32 counter = 0;
    +  PRUint32 counter = 0, otherCounter;
       nsCOMPtr<nsIRunnable> runnable(new MainThreadRunnable(&counter));
       NS_ENSURE_TRUE(runnable, NS_ERROR_OUT_OF_MEMORY);
     
    @@ -412,7 +412,7 @@
                                       getter_AddRefs(proxy));
       NS_ENSURE_SUCCESS(rv, rv);
     
    -  for (PRUint32 otherCounter = 0; otherCounter < 5;) {
    +  for (otherCounter = 0; otherCounter < 5;) {
         rv = gTestThread->Dispatch(proxy, NS_DISPATCH_SYNC);
         NS_ENSURE_SUCCESS(rv, rv);
         NS_ENSURE_TRUE(counter == ++otherCounter, NS_ERROR_FAILURE);
    @@ -434,7 +434,7 @@
     
       runnable = nsnull;
     
    -  for (PRUint32 otherCounter = 0; otherCounter < 5;) {
    +  for (otherCounter = 0; otherCounter < 5;) {
         rv = proxy->Run();
         NS_ENSURE_SUCCESS(rv, rv);
         NS_ENSURE_TRUE(counter == ++otherCounter, NS_ERROR_FAILURE);
    @@ -461,7 +461,7 @@
       NS_ENSURE_SUCCESS(rv, rv);
       NS_ENSURE_TRUE(proxy, NS_ERROR_FAILURE);
     
    -  for (PRUint32 otherCounter = 0; otherCounter < 5;) {
    +  for (otherCounter = 0; otherCounter < 5;) {
         rv = proxy->Run();
         NS_ENSURE_SUCCESS(rv, rv);
         NS_ENSURE_TRUE(counter == ++otherCounter, NS_ERROR_FAILURE);
    @@ -494,7 +494,7 @@
       NS_ENSURE_SUCCESS(rv, rv);
       NS_ENSURE_TRUE(proxy, NS_ERROR_FAILURE);
     
    -  for (PRUint32 otherCounter = 0; otherCounter < 5;) {
    +  for (otherCounter = 0; otherCounter < 5;) {
         rv = proxy->Run();
         NS_ENSURE_SUCCESS(rv, rv);
         NS_ENSURE_TRUE(counter == ++otherCounter, NS_ERROR_FAILURE);
    @@ -714,7 +714,7 @@
                              NS_PROXY_ASYNC, getter_AddRefs(proxy));
       NS_ENSURE_SUCCESS(rv, rv);
     
    -  for (PRUint32 i = 0; i < 5; i++) {
    +  for (PRUint32 j = 0; j < 5; j++) {
         rv = proxy->Run();
         NS_ENSURE_SUCCESS(rv, rv);
       }
    
    Index: nsMsgCopyService.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/mailnews/base/src/nsMsgCopyService.cpp,v
    retrieving revision 1.61
    diff -u -r1.61 nsMsgCopyService.cpp
    --- nsMsgCopyService.cpp	30 May 2008 18:10:57 -0000	1.61
    +++ nsMsgCopyService.cpp	1 Jun 2008 07:09:15 -0000
    @@ -467,7 +467,8 @@
     
       // duplicate the message array so we could sort the messages by it's
       // folder easily
    -  for (PRUint32 i = 0; i < cnt; i++)
    +  PRUint32 i;
    +  for (i = 0; i < cnt; i++)
       {
         nsCOMPtr<nsIMsgDBHdr> currMsg = do_QueryElementAt(messages, i);
         msgArray.AppendObject(currMsg);
    
    Index: nsSVGFilters.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGFilters.cpp,v
    retrieving revision 1.30
    diff -u -r1.30 nsSVGFilters.cpp
    --- nsSVGFilters.cpp	20 Feb 2007 11:02:59 -0000	1.30
    +++ nsSVGFilters.cpp	21 Feb 2007 20:10:22 -0000
    @@ -1201,6 +1201,7 @@
       nsCOMPtr<nsIDOMSVGNumber> number;
       float colorMatrix[20];
       float s, c;
    +  PRUint32 j;
     
       switch (type) {
       case nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_MATRIX:
    @@ -1208,7 +1209,7 @@
         if (num != 20)
           return NS_ERROR_FAILURE;
     
    -    for(PRUint32 j = 0; j < num; j++) {
    +    for (j = 0; j < num; j++) {
           list->GetItem(j, getter_AddRefs(number));
           number->GetValue(&colorMatrix[j]);
         }
    
    Index: xpcjsruntime.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp,v
    retrieving revision 1.63
    diff -u -r1.63 xpcjsruntime.cpp
    --- xpcjsruntime.cpp	1 Nov 2007 22:51:58 -0000	1.63
    +++ xpcjsruntime.cpp	2 Nov 2007 13:47:12 -0000
    @@ -376,10 +376,11 @@
     
         XPCWrappedNativeScope::TraceJS(trc, this);
     
    -    for(XPCRootSetElem *e = mVariantRoots; e ; e = e->GetNextRoot())
    +    XPCRootSetElem *e;
    +    for (e = mVariantRoots; e ; e = e->GetNextRoot())
             static_cast<XPCTraceableVariant*>(e)->TraceJS(trc);
     
    -    for(XPCRootSetElem *e = mWrappedJSRoots; e ; e = e->GetNextRoot())
    +    for (e = mWrappedJSRoots; e ; e = e->GetNextRoot())
             static_cast<nsXPCWrappedJS*>(e)->TraceJS(trc);
     
         if(mJSHolders.ops)
    @@ -428,10 +429,11 @@
     
         XPCWrappedNativeScope::SuspectAllWrappers(this, cx, cb);
     
    -    for(XPCRootSetElem *e = mVariantRoots; e ; e = e->GetNextRoot())
    +    XPCRootSetElem *e;
    +    for(e = mVariantRoots; e ; e = e->GetNextRoot())
             cb.NoteXPCOMRoot(static_cast<XPCTraceableVariant*>(e));
     
    -    for(XPCRootSetElem *e = mWrappedJSRoots; e ; e = e->GetNextRoot())
    +    for(e = mWrappedJSRoots; e ; e = e->GetNextRoot())
         {
             nsIXPConnectWrappedJS *wrappedJS = static_cast<nsXPCWrappedJS*>(e);
             cb.NoteXPCOMRoot(wrappedJS);
    
    Index: nsSVGForeignObjectFrame.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGForeignObjectFrame.cpp,v
    retrieving revision 1.79
    diff -u -r1.79 nsSVGForeignObjectFrame.cpp
    --- nsSVGForeignObjectFrame.cpp	21 Jun 2007 23:01:10 -0000	1.79
    +++ nsSVGForeignObjectFrame.cpp	22 Jun 2007 08:04:07 -0000
    @@ -217,8 +217,8 @@
       x[3] = aX;
       y[3] = aY + aHeight;
      
    -  for (int i = 0; i < 4; i++) {
    -    nsSVGUtils::TransformPoint(aMatrix, &x[i], &y[i]);
    +  for (int j = 0; j < 4; j++) {
    +    nsSVGUtils::TransformPoint(aMatrix, &x[j], &y[j]);
       }
     
       float xmin, xmax, ymin, ymax;
    Index: nsSVGFilterFrame.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGFilterFrame.cpp,v
    retrieving revision 1.55
    diff -u -r1.55 nsSVGFilterFrame.cpp
    --- nsSVGFilterFrame.cpp	18 Feb 2008 07:29:01 -0000	1.55
    +++ nsSVGFilterFrame.cpp	19 Feb 2008 09:35:43 -0000
    @@ -244,8 +244,8 @@
       for (PRInt32 i = mFilterInfo.Length() - 1; i >= 0; --i) {
         Info* info = &mFilterInfo[i];
         nsAutoTArray<nsRect,2> sourceBBoxes;
    -    for (PRUint32 j = 0; j < info->mInputs.Length(); ++j) {
    -      sourceBBoxes.AppendElement(info->mInputs[j]->mResultBoundingBox);
    +    for (PRUint32 k = 0; k < info->mInputs.Length(); ++k) {
    +      sourceBBoxes.AppendElement(info->mInputs[k]->mResultBoundingBox);
         }
         
         info->mFE->ComputeNeededSourceBBoxes(
    
    Index: TestCookie.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/netwerk/test/TestCookie.cpp,v
    retrieving revision 1.14
    diff -u -r1.14 TestCookie.cpp
    --- TestCookie.cpp	16 Jul 2007 21:06:55 -0000	1.14
    +++ TestCookie.cpp	21 Jul 2007 06:53:51 -0000
    @@ -789,7 +789,7 @@
           // b) evicted by order of creation time, if the limit on cookies per host (50) is reached
           nsCAutoString name;
           nsCAutoString expected;
    -      for (PRInt32 i = 0; i < 60; ++i) {
    +      for (i = 0; i < 60; ++i) {
             name = NS_LITERAL_CSTRING("test");
             name.AppendInt(i);
             name += NS_LITERAL_CSTRING("=creation");
    @@ -807,7 +807,7 @@
           // test that cookies are evicted by order of creation time, if the limit on total cookies
           // (1000) is reached
           nsCAutoString host;
    -      for (PRInt32 i = 0; i < 1010; ++i) {
    +      for (i = 0; i < 1010; ++i) {
             host = NS_LITERAL_CSTRING("http://eviction.");
             host.AppendInt(i);
             host += NS_LITERAL_CSTRING(".tests/");
    
    Index: TestStrings.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/tests/TestStrings.cpp,v
    retrieving revision 1.13
    diff -u -r1.13 TestStrings.cpp
    --- TestStrings.cpp	24 Jul 2007 01:30:19 -0000	1.13
    +++ TestStrings.cpp	25 Jul 2007 10:29:48 -0000
    @@ -263,7 +263,7 @@
     
         // Should not find a match (search not beyond Substring)
         delim_begin = begin;
    -    delim_end = end; for (int i=0;i<7;i++) delim_end--;
    +    delim_end = end; for (int j=0;j<7;j++) delim_end--;
         if (FindInReadable(NS_LITERAL_CSTRING("classic"), delim_begin, delim_end))
             return PR_FALSE;
     
    @@ -348,7 +348,7 @@
         }
     
         // Should not find a match (search not before Substring)
    -    delim_begin = begin; for (int i=0;i<6;i++) delim_begin++;
    +    delim_begin = begin; for (int j=0;j<6;j++) delim_begin++;
         delim_end = end;
         if (RFindInReadable(NS_LITERAL_CSTRING("jar:"), delim_begin, delim_end)) {
             printf("Should not find a match (search not before Substring)\n");
    @@ -363,7 +363,7 @@
     
         // Should not find a match (search not beyond Substring)
         delim_begin = begin;
    -    delim_end = end; for (int i=0;i<7;i++) delim_end--;
    +    delim_end = end; for (int k=0;k<7;k++) delim_end--;
         if (RFindInReadable(NS_LITERAL_CSTRING("classic"), delim_begin, delim_end)) {
             printf("Should not find a match (search not beyond Substring)\n");
             return PR_FALSE;
    
    Index: nsOfflineCacheUpdate.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/uriloader/prefetch/nsOfflineCacheUpdate.cpp,v
    retrieving revision 1.5
    diff -u -r1.5 nsOfflineCacheUpdate.cpp
    --- nsOfflineCacheUpdate.cpp	16 Jan 2008 21:54:35 -0000	1.5
    +++ nsOfflineCacheUpdate.cpp	17 Jan 2008 00:58:37 -0000
    @@ -976,8 +976,8 @@
                 mWeakObservers.RemoveObjectAt(i--);
         }
     
    -    for (PRInt32 i = 0; i < mObservers.Count(); i++) {
    -        aObservers.AppendObject(mObservers[i]);
    +    for (PRInt32 j = 0; j < mObservers.Count(); j++) {
    +        aObservers.AppendObject(mObservers[j]);
         }
     
         return NS_OK;
    @@ -1286,9 +1286,9 @@
             }
         }
     
    -    for (PRInt32 i = 0; i < mObservers.Count(); i++) {
    -        if (mObservers[i] == aObserver) {
    -            mObservers.RemoveObjectAt(i);
    +    for (PRInt32 j = 0; j < mObservers.Count(); j++) {
    +        if (mObservers[j] == aObserver) {
    +            mObservers.RemoveObjectAt(j);
                 return NS_OK;
             }
         }
    
    Index: nsCanvasRenderingContext2D.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp,v
    retrieving revision 1.90
    diff -u -r1.90 nsCanvasRenderingContext2D.cpp
    --- nsCanvasRenderingContext2D.cpp	25 Jul 2007 18:21:34 -0000	1.90
    +++ nsCanvasRenderingContext2D.cpp	27 Jul 2007 10:04:10 -0000
    @@ -1672,7 +1672,8 @@
     
         gfxPoint position;//(mThebesContext->CurrentPoint());
         gfxFloat x = position.x;
    -    for (PRUint32 i = 0; i < strLength; i++)
    +    PRUint32 i;
    +    for (i = 0; i < strLength; i++)
         {
             gfxFloat halfAdvance = textRun->GetAdvanceWidth(i, 1, nsnull) / (2.0 * aupdp);
     
    @@ -1695,7 +1696,7 @@
         else
             ApplyStyle(STYLE_FILL);
     
    -    for(PRUint32 i = 0; i < strLength; i++)
    +    for (i = 0; i < strLength; i++)
         {
             // Skip non-visible characters
             if(!cp[i].draw) continue;
    
    Index: nsXULTreeAccessible.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/accessible/src/xul/nsXULTreeAccessible.cpp,v
    retrieving revision 1.66
    diff -u -r1.66 nsXULTreeAccessible.cpp
    --- nsXULTreeAccessible.cpp	11 Dec 2007 08:18:05 -0000	1.66
    +++ nsXULTreeAccessible.cpp	12 Dec 2007 13:10:30 -0000
    @@ -581,7 +581,8 @@
       NS_ENSURE_SUCCESS(rv, rv);
     #endif
     
    -  for (PRInt32 rowIdx = aRow; rowIdx < aRow - aCount; rowIdx++) {
    +  PRInt32 rowIdx;
    +  for (rowIdx = aRow; rowIdx < aRow - aCount; rowIdx++) {
     #ifdef MOZ_ACCESSIBILITY_ATK
         for (PRInt32 colIdx = 0; colIdx < colsCount; ++colIdx) {
     #else
    @@ -611,7 +612,7 @@
     
       PRInt32 oldRowCount = newRowCount - aCount;
     
    -  for (PRInt32 rowIdx = newRowCount; rowIdx < oldRowCount; ++rowIdx) {
    +  for (rowIdx = newRowCount; rowIdx < oldRowCount; ++rowIdx) {
     #ifdef MOZ_ACCESSIBILITY_ATK
         for (PRInt32 colIdx = 0; colIdx < colsCount; ++colIdx) {
     #else
    @@ -846,7 +847,8 @@
       NS_ENSURE_SUCCESS(rv, rv);
     
       PRInt32 topCount = 1;
    -  for (PRInt32 index = mRow - 1; index >= 0; index--) {
    +  PRInt32 index;
    +  for (index = mRow - 1; index >= 0; index--) {
         PRInt32 lvl = -1;
         if (NS_SUCCEEDED(view->GetLevel(index, &lvl))) {
           if (lvl < level)
    @@ -862,7 +864,7 @@
       NS_ENSURE_SUCCESS(rv, rv);
     
       PRInt32 bottomCount = 0;
    -  for (PRInt32 index = mRow + 1; index < rowCount; index++) {
    +  for (index = mRow + 1; index < rowCount; index++) {
         PRInt32 lvl = -1;
         if (NS_SUCCEEDED(view->GetLevel(index, &lvl))) {
           if (lvl < level)
    Index: nsXULSelectAccessible.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/accessible/src/xul/nsXULSelectAccessible.cpp,v
    retrieving revision 1.54
    diff -u -r1.54 nsXULSelectAccessible.cpp
    --- nsXULSelectAccessible.cpp	19 Feb 2008 13:47:19 -0000	1.54
    +++ nsXULSelectAccessible.cpp	20 Feb 2008 13:00:53 -0000
    @@ -283,7 +283,8 @@
       nsCOMPtr<nsIContent> headContent;
       PRUint32 count = content->GetChildCount();
     
    -  for (PRUint32 index = 0; index < count; ++index) {
    +  PRUint32 index;
    +  for (index = 0; index < count; ++index) {
         nsCOMPtr<nsIContent> childContent(content->GetChildAt(index));
         NS_ENSURE_STATE(childContent);
     
    @@ -299,7 +300,7 @@
       PRUint32 columnCount = 0;
       count = headContent->GetChildCount();
     
    -  for (PRUint32 index = 0; index < count; ++index) {
    +  for (index = 0; index < count; ++index) {
         nsCOMPtr<nsIContent> childContent(headContent->GetChildAt(index));
         NS_ENSURE_STATE(childContent);
     
    
    Index: nsJISx4501LineBreaker.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/intl/lwbrk/src/nsJISx4501LineBreaker.cpp,v
    retrieving revision 1.59
    diff -u -r1.59 nsJISx4501LineBreaker.cpp
    --- nsJISx4501LineBreaker.cpp	19 Sep 2007 06:34:25 -0000	1.59
    +++ nsJISx4501LineBreaker.cpp	20 Sep 2007 12:38:58 -0000
    @@ -615,7 +615,7 @@
             break;
         }
         // Note that index is always less than mLength - CONSERVATIVE_BREAK_RANGE.
    -    for (PRUint32 i = index + 1; i < index + CONSERVATIVE_BREAK_RANGE; ++i) {
    +    for (i = index + 1; i < index + CONSERVATIVE_BREAK_RANGE; ++i) {
           if (IS_NONBREAKABLE_SPACE(GetCharAt(i)))
             return PR_TRUE;
         }
    
    Index: nsDOMStorageDB.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/dom/src/storage/nsDOMStorageDB.cpp,v
    retrieving revision 1.12
    diff -u -r1.12 nsDOMStorageDB.cpp
    --- nsDOMStorageDB.cpp	23 Jan 2008 04:06:37 -0000	1.12
    +++ nsDOMStorageDB.cpp	24 Jan 2008 13:34:31 -0000
    @@ -471,8 +471,8 @@
                                                  getter_AddRefs(statement));
       NS_ENSURE_SUCCESS(rv, rv);
     
    -  for (PRInt32 i = 0; i < aOwners.Count(); i++) {
    -    rv = statement->BindStringParameter(i, *aOwners[i]);
    +  for (PRInt32 j = 0; j < aOwners.Count(); j++) {
    +    rv = statement->BindStringParameter(j, *aOwners[j]);
         NS_ENSURE_SUCCESS(rv, rv);
       }
     
    
    Index: nsCacheService.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/netwerk/cache/src/nsCacheService.cpp,v
    retrieving revision 1.118
    diff -u -r1.118 nsCacheService.cpp
    --- nsCacheService.cpp	10 Feb 2008 04:53:28 -0000	1.118
    +++ nsCacheService.cpp	12 Feb 2008 12:53:00 -0000
    @@ -184,8 +184,8 @@
         nsCOMPtr<nsIPrefBranch2> branch = do_GetService(NS_PREFSERVICE_CONTRACTID);
         if (!branch) return NS_ERROR_FAILURE;
     
    -    for (int i=0; i<NS_ARRAY_LENGTH(prefList); i++) {
    -        rv = branch->AddObserver(prefList[i], this, PR_FALSE);
    +    for (int j=0; j<NS_ARRAY_LENGTH(prefList); j++) {
    +        rv = branch->AddObserver(prefList[j], this, PR_FALSE);
             if (NS_FAILED(rv))
                 rv2 = rv;
         }
    
    Index: gfxWindowsFonts.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp,v
    retrieving revision 1.205
    diff -u -r1.205 gfxWindowsFonts.cpp
    --- gfxWindowsFonts.cpp	7 May 2008 20:29:49 -0000	1.205
    +++ gfxWindowsFonts.cpp	8 May 2008 06:57:34 -0000
    @@ -223,8 +223,8 @@
             }
         }
     
    -    for (PRUint32 i = 0; i < ff->mVariations.Length(); ++i) {
    -        fe = ff->mVariations[i];
    +    for (PRUint32 j = 0; j < ff->mVariations.Length(); ++j) {
    +        fe = ff->mVariations[j];
             // check if we already know about this face
             if (fe->mWeight == logFont.lfWeight &&
                 fe->mItalic == (logFont.lfItalic == 0xFF)) {
    @@ -399,9 +399,10 @@
             baseWeight = 4;
         }
     
    +    PRInt8 i, k;
         PRInt8 matchBaseWeight = 0;
         PRInt8 direction = (baseWeight > 5) ? 1 : -1;
    -    for (PRInt8 i = baseWeight; ; i += direction) {
    +    for (i = baseWeight; ; i += direction) {
             if (weightList[i]) {
                 matchBaseWeight = i;
                 break;
    @@ -416,7 +417,7 @@
         FontEntry *matchFE;
         const PRInt8 absDistance = abs(weightDistance);
         direction = (weightDistance >= 0) ? 1 : -1;
    -    for (PRInt8 i = matchBaseWeight, k = 0; i < 10 && i > 0; i += direction) {
    +    for (i = matchBaseWeight, k = 0; i < 10 && i > 0; i += direction) {
             if (weightList[i]) {
                 matchFE = weightList[i];
                 k++;
    
    Index: nsWindow.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/widget/src/windows/nsWindow.cpp,v
    retrieving revision 3.744
    diff -u -r3.744 nsWindow.cpp
    --- nsWindow.cpp	6 May 2008 07:33:08 -0000	3.744
    +++ nsWindow.cpp	6 May 2008 19:10:35 -0000
    @@ -3582,7 +3582,8 @@
       keySequence.AppendElement(KeyPair(aNativeKeyCode, 0));
     
       // Simulate the pressing of each modifier key and then the real key
    -  for (PRUint32 i = 0; i < keySequence.Length(); ++i) {
    +  PRUint32 i;
    +  for (i = 0; i < keySequence.Length(); ++i) {
         PRUint8 key = keySequence[i].mGeneral;
         PRUint8 keySpecific = keySequence[i].mSpecific;
         kbdState[key] = 0x81; // key is down and toggled on if appropriate
    @@ -3599,7 +3600,7 @@
           OnKeyDown(key, 0, nsnull);
         }
       }
    -  for (PRUint32 i = keySequence.Length(); i > 0; --i) {
    +  for (i = keySequence.Length(); i > 0; --i) {
         PRUint8 key = keySequence[i - 1].mGeneral;
         PRUint8 keySpecific = keySequence[i - 1].mSpecific;
         kbdState[key] = 0; // key is up and toggled off if appropriate
    
    • VC6 won't let you declare static const member variables. This may be alleviated by changing them to enums using these patches:
    Index: nsSVGFilters.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGFilters.cpp,v
    retrieving revision 1.21
    diff -u -r1.21 nsSVGFilters.cpp
    --- nsSVGFilters.cpp	8 Jan 2007 16:48:55 -0000	1.21
    +++ nsSVGFilters.cpp	9 Jan 2007 15:17:03 -0000
    @@ -2731,11 +2731,11 @@
     #undef RAND_Q
     #undef RAND_R
     
    -  const static int sBSize = 0x100;
    -  const static int sBM = 0xff;
    -  const static int sPerlinN = 0x1000;
    -  const static int sNP = 12;			/* 2^PerlinN */
    -  const static int sNM = 0xfff;
    +  enum { sBSize = 0x100 };
    +  enum { sBM = 0xff };
    +  enum { sPerlinN = 0x1000 };
    +  enum { sNP = 12 };			/* 2^PerlinN */
    +  enum { sNM = 0xfff };
     
       PRInt32 mLatticeSelector[sBSize + sBSize + 2];
       double mGradient[4][sBSize + sBSize + 2][2];
    
    Index: nsEudoraMailbox.h
    ===================================================================
    RCS file: /cvsroot/mozilla/mailnews/import/eudora/src/nsEudoraMailbox.h,v
    retrieving revision 1.14
    diff -u -r1.14 nsEudoraMailbox.h
    --- nsEudoraMailbox.h	20 Sep 2007 23:00:18 -0000	1.14
    +++ nsEudoraMailbox.h	21 Sep 2007 09:41:01 -0000
    @@ -69,75 +69,77 @@
       PRBool      HasEudoraLabel() { return (m_Label > 0) && (m_Label <= 7); }
       PRInt16      GetLabelNumber() { return HasEudoraLabel() ? m_Label : 0; }
     
    -  // MesSummary flags (used with m_Flags)
    -  static const PRUint16 MSF_ALT_SIGNATURE    = 0x0001;
    -  static const PRUint16 MSF_USE_SIGNATURE    = 0x0002;
    -  static const PRUint16 MSF_WORD_WRAP      = 0x0004;
    -  static const PRUint16 MSF_TABS_IN_BODY    = 0x0008;
    -  static const PRUint16 MSF_KEEP_COPIES    = 0x0010;
    -  static const PRUint16 MSF_TEXT_AS_DOC    = 0x0020;
    -  static const PRUint16 MSF_RETURN_RECEIPT  = 0x0040;
    -  static const PRUint16 MSF_QUOTED_PRINTABLE  = 0x0080;
    -  static const PRUint16 MSF_ENCODE0      = 0x0100;
    -  static const PRUint16 MSF_ENCODE1      = 0x0200;
    -  static const PRUint16 MSF_SHOW_ALL_HEADERS  = 0x0400;
    -  static const PRUint16 MSF_SUB_PART      = 0x0800;
    -  static const PRUint16 MSF_MAPI_MESSAGE    = 0x1000;
    -  static const PRUint16 MSF_XRICH        = 0x2000;
    -  static const PRUint16 MSF_READ_RECEIPT    = 0x4000;
    -  static const PRUint16 MSF_HAS_ATTACHMENT  = 0x8000;
    -  static const PRUint16 MSF_COMP_MOD_FLAGS  = 0x8FFF;
    -  static const PRUint16 MSF_BINHEX      = 0;
    -  static const PRUint16 MSF_MIME        = MSF_ENCODE0;
    -  static const PRUint16 MSF_UUENCODE      = MSF_ENCODE1;
    -
    -  // MesSummary extended flags (used with m_FlagsEx)
    -  static const PRUint16 MSFEX_AUTO_ATTACHED  = 0x0001;
    -  static const PRUint16 MSFEX_HTML      = 0x0002;
    -  static const PRUint16 MSFEX_MDN        = 0x0004;
    -  static const PRUint16 MSFEX_MIME_ATTACHED  = 0x0008;
    -  static const PRUint16 MSFEX_SEND_PLAIN    = 0x0010;
    -  static const PRUint16 MSFEX_SEND_STYLED    = 0x0020;
    -  static const PRUint16 MSFEX_FLOWED      = 0x0040;
    -  static const PRUint16 MSFEX_INL_SIGNATURE  = 0x0080;
    -  static const PRUint16 MSFEX_EMPTY_BODY    = 0x0100;
    -
    -  // MesSummary states
    -  static const PRInt8 MS_UNREAD    = 0;
    -  static const PRInt8 MS_READ      = 1;
    -  static const PRInt8 MS_REPLIED    = 2;
    -  static const PRInt8 MS_FORWARDED  = 3;
    -  static const PRInt8 MS_REDIRECT    = 4;
    -  static const PRInt8 MS_UNSENDABLE  = 5;
    -  static const PRInt8 MS_SENDABLE    = 6;
    -  static const PRInt8 MS_QUEUED    = 7;
    -  static const PRInt8 MS_SENT      = 8;
    -  static const PRInt8 MS_UNSENT    = 9;
    -  static const PRInt8 MS_TIME_QUEUED  =10;
    -  static const PRInt8 MS_SPOOLED    =11;
    -  static const PRInt8 MS_RECOVERED  =12;
    -
    -  // MesSummary priorites
    -  static const PRInt16 MSP_HIGHEST  = 1;
    -  static const PRInt16 MSP_HIGH    = 2;
    -  static const PRInt16 MSP_NORMAL    = 3;
    -  static const PRInt16 MSP_LOW    = 4;
    -  static const PRInt16 MSP_LOWEST    = 5;
    -
    -  // MesSummary Mood
    -  static const PRInt8 MSM_MOOD_UNKNOWN  = 0;
    -  static const PRInt8 MSM_MOOD_CLEAN    = 1;
    -  static const PRInt8 MSM_MOOD_LOW    = 2;
    -  static const PRInt8 MSM_MOOD_MEDIUM    = 3;
    -  static const PRInt8 MSM_MOOD_HIGH    = 4;
    -
    -  // Imap message flags :
    -  static const PRUint32 IMFLAGS_SEEN    = 0x00000001;
    -  static const PRUint32 IMFLAGS_ANSWERED  = 0x00000002;
    -  static const PRUint32 IMFLAGS_FLAGGED  = 0x00000004;
    -  static const PRUint32 IMFLAGS_DELETED  = 0x00000008;
    -  static const PRUint32 IMFLAGS_DRAFT    = 0x00000010;
    -  static const PRUint32 IMFLAGS_RECENT  = 0x00000020;
    +  enum {
    +    // MesSummary flags (used with m_Flags)
    +    MSF_ALT_SIGNATURE		= 0x0001,
    +    MSF_USE_SIGNATURE		= 0x0002,
    +    MSF_WORD_WRAP			= 0x0004,
    +    MSF_TABS_IN_BODY		= 0x0008,
    +    MSF_KEEP_COPIES			= 0x0010,
    +    MSF_TEXT_AS_DOC			= 0x0020,
    +    MSF_RETURN_RECEIPT		= 0x0040,
    +    MSF_QUOTED_PRINTABLE	= 0x0080,
    +    MSF_ENCODE0				= 0x0100,
    +    MSF_ENCODE1				= 0x0200,
    +    MSF_SHOW_ALL_HEADERS	= 0x0400,
    +    MSF_SUB_PART			= 0x0800,
    +    MSF_MAPI_MESSAGE		= 0x1000,
    +    MSF_XRICH				= 0x2000,
    +    MSF_READ_RECEIPT		= 0x4000,
    +    MSF_HAS_ATTACHMENT		= 0x8000,
    +    MSF_COMP_MOD_FLAGS		= 0x8FFF,
    +    MSF_BINHEX				= 0,
    +    MSF_MIME				= MSF_ENCODE0,
    +    MSF_UUENCODE			= MSF_ENCODE1,
    +
    +    // MesSummary extended flags (used with m_FlagsEx)
    +    MSFEX_AUTO_ATTACHED		= 0x0001,
    +    MSFEX_HTML				= 0x0002,
    +    MSFEX_MDN				= 0x0004,
    +    MSFEX_MIME_ATTACHED		= 0x0008,
    +    MSFEX_SEND_PLAIN		= 0x0010,
    +    MSFEX_SEND_STYLED		= 0x0020,
    +    MSFEX_FLOWED			= 0x0040,
    +    MSFEX_INL_SIGNATURE		= 0x0080,
    +    MSFEX_EMPTY_BODY		= 0x0100,
    +
    +    // MesSummary states
    +    MS_UNREAD		= 0,
    +    MS_READ			= 1,
    +    MS_REPLIED		= 2,
    +    MS_FORWARDED	= 3,
    +    MS_REDIRECT		= 4,
    +    MS_UNSENDABLE	= 5,
    +    MS_SENDABLE		= 6,
    +    MS_QUEUED		= 7,
    +    MS_SENT			= 8,
    +    MS_UNSENT		= 9,
    +    MS_TIME_QUEUED	=10,
    +    MS_SPOOLED		=11,
    +    MS_RECOVERED	=12,
    +
    +    // MesSummary priorites
    +    MSP_HIGHEST		= 1,
    +    MSP_HIGH		= 2,
    +    MSP_NORMAL		= 3,
    +    MSP_LOW			= 4,
    +    MSP_LOWEST		= 5,
    +
    +    // MesSummary Mood
    +    MSM_MOOD_UNKNOWN	= 0,
    +    MSM_MOOD_CLEAN		= 1,
    +    MSM_MOOD_LOW		= 2,
    +    MSM_MOOD_MEDIUM		= 3,
    +    MSM_MOOD_HIGH		= 4,
    +
    +    // Imap message flags :
    +    IMFLAGS_SEEN		= 0x00000001,
    +    IMFLAGS_ANSWERED	= 0x00000002,
    +    IMFLAGS_FLAGGED		= 0x00000004,
    +    IMFLAGS_DELETED		= 0x00000008,
    +    IMFLAGS_DRAFT		= 0x00000010,
    +    IMFLAGS_RECENT		= 0x00000020
    +  };
     
       PRUint16    m_Flags;
       PRUint16    m_FlagsEx;
    
    Index: phonet.hxx
    ===================================================================
    RCS file: /cvsroot/mozilla/extensions/spellcheck/hunspell/src/phonet.hxx,v
    retrieving revision 1.1
    diff -u -r1.1 phonet.hxx
    --- phonet.hxx	6 Sep 2007 13:04:27 -0000	1.1
    +++ phonet.hxx	7 Sep 2007 07:56:54 -0000
    @@ -54,7 +54,7 @@
       cs_info * lang;
       int num;
       char * * rules;
    -  static const int hash_size = 256;
    +  enum { hash_size = 256 };
       int hash[hash_size];
     };
     
    
    Index: nsImapMailFolder.h
    ===================================================================
    RCS file: /cvsroot/mozilla/mailnews/imap/src/nsImapMailFolder.h,v
    retrieving revision 1.253
    diff -u -r1.253 nsImapMailFolder.h
    --- nsImapMailFolder.h	13 Jun 2008 23:36:35 -0000	1.253
    +++ nsImapMailFolder.h	15 Jun 2008 09:10:37 -0000
    @@ -219,7 +219,7 @@
                               public nsIMsgFilterHitNotify,
                               public nsIJunkMailClassificationListener
     {
    - static const PRUint32 PLAYBACK_TIMER_INTERVAL_IN_MS = 500; 
    +  enum { PLAYBACK_TIMER_INTERVAL_IN_MS = 500 };
     public:
       nsImapMailFolder();
       virtual ~nsImapMailFolder();
    
    • VC6 won't let you return a value from a void function. This may be resolved using these patches:
    Index: nsHTMLInputElement.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/html/content/src/nsHTMLInputElement.cpp,v
    retrieving revision 1.458
    diff -u -r1.458 nsHTMLInputElement.cpp
    --- nsHTMLInputElement.cpp	28 Jun 2007 02:48:16 -0000	1.458
    +++ nsHTMLInputElement.cpp	3 Jul 2007 16:41:06 -0000
    @@ -240,7 +240,7 @@
     
       virtual void UpdateEditableState()
       {
    -    return UpdateEditableFormControlState();
    +    UpdateEditableFormControlState();
       }
     
       NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsHTMLInputElement,
    Index: nsHTMLTextAreaElement.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp,v
    retrieving revision 1.204
    diff -u -r1.204 nsHTMLTextAreaElement.cpp
    --- nsHTMLTextAreaElement.cpp	28 Jun 2007 02:48:16 -0000	1.204
    +++ nsHTMLTextAreaElement.cpp	3 Jul 2007 16:41:12 -0000
    @@ -167,7 +167,7 @@
     
       virtual void UpdateEditableState()
       {
    -    return UpdateEditableFormControlState();
    +    UpdateEditableFormControlState();
       }
     
       NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHTMLTextAreaElement,
    
    Index: nsDOMFile.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/base/public/nsDOMFile.h,v
    retrieving revision 1.1
    diff -u -r1.1 nsDOMFile.h
    --- nsDOMFile.h	25 Jul 2007 04:29:47 -0000	1.1
    +++ nsDOMFile.h	27 Jul 2007 10:04:08 -0000
    @@ -86,7 +86,7 @@
       PRBool Append(nsIDOMFile *aFile) { return mFiles.AppendObject(aFile); }
     
       PRBool Remove(PRUint32 aIndex) { return mFiles.RemoveObjectAt(aIndex); }
    -  void Clear() { return mFiles.Clear(); }
    +  void Clear() { mFiles.Clear(); }
     
     private:
       nsCOMArray<nsIDOMFile> mFiles;
    
    Index: nsDiskCacheDeviceSQL.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/netwerk/cache/src/nsDiskCacheDeviceSQL.cpp,v
    retrieving revision 1.15
    diff -u -r1.15 nsDiskCacheDeviceSQL.cpp
    --- nsDiskCacheDeviceSQL.cpp	26 Jul 2007 00:47:33 -0000	1.15
    +++ nsDiskCacheDeviceSQL.cpp	27 Jul 2007 10:04:11 -0000
    @@ -132,7 +132,7 @@
           mEvictionFunction->Reset();
         }
     
    -    void Apply() { return mEvictionFunction->Apply(); }
    +    void Apply() { mEvictionFunction->Apply(); }
     
       private:
         mozIStorageConnection *mDB;
    
    Index: nsSVGOuterSVGFrame.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp,v
    retrieving revision 1.117
    diff -u -r1.117 nsSVGOuterSVGFrame.cpp
    --- nsSVGOuterSVGFrame.cpp	20 Nov 2007 09:10:19 -0000	1.117
    +++ nsSVGOuterSVGFrame.cpp	21 Nov 2007 10:09:08 -0000
    @@ -766,7 +766,7 @@
       NS_ASSERTION(aFrame, "Who on earth is calling us?!");
       NS_ASSERTION(mForeignObjectHash.GetEntry(aFrame),
                    "nsSVGForeignObjectFrame not in registry!");
    -  return mForeignObjectHash.RemoveEntry(aFrame);
    +  mForeignObjectHash.RemoveEntry(aFrame);
     }
     
     PRBool
    Index: nsSVGGlyphFrame.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGGlyphFrame.cpp,v
    retrieving revision 1.124
    diff -u -r1.124 nsSVGGlyphFrame.cpp
    --- nsSVGGlyphFrame.cpp	18 Mar 2008 19:50:29 -0000	1.124
    +++ nsSVGGlyphFrame.cpp	19 Mar 2008 12:41:51 -0000
    @@ -146,7 +146,7 @@
        * rotation for the current character.
        */
       void SetupForDrawing(gfxContext *aContext) {
    -    return SetupFor(aContext, mDrawScale);
    +    SetupFor(aContext, mDrawScale);
       }
       /**
        * Set up aContext for glyph measuring. This applies any global transform
    @@ -155,7 +155,7 @@
        * to device pixels so that drawing in appunits sizes works.
        */
       void SetupForMetrics(gfxContext *aContext) {
    -    return SetupFor(aContext, mMetricsScale);
    +    SetupFor(aContext, mMetricsScale);
       }
       /**
        * Get the raw position data for the current character.
    
    • VC6 won't let you compare pointers that have both different types and different constness. This may be alleviated using these patches:
    Index: nsSpaceManager.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/generic/nsSpaceManager.cpp,v
    retrieving revision 3.75
    diff -u -r3.75 nsSpaceManager.cpp
    --- nsSpaceManager.cpp	23 Jan 2007 21:42:41 -0000	3.75
    +++ nsSpaceManager.cpp	24 Jan 2007 15:29:27 -0000
    @@ -433,14 +433,14 @@
     nsSpaceManager::BandRect*
     nsSpaceManager::GetPrevBand(const BandRect* aBandRect) const
     {
    -  NS_ASSERTION(aBandRect->Prev() == &mBandList ||
    +  NS_ASSERTION(aBandRect->Prev() == (const BandRect*)&mBandList ||
                    aBandRect->Prev()->mBottom <= aBandRect->mTop,
                    "aBandRect should be first rect within its band");
     
       BandRect* prev = aBandRect->Prev();
       nscoord topOfBand = prev->mTop;
     
    -  while (prev != &mBandList) {
    +  while (prev != (const BandRect*)&mBandList) {
         // Check whether the prev rect is part of the same band
         if (prev->mTop != topOfBand) {
           // We found the beginning of this band
    
    Index: nsIDocument.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/base/public/nsIDocument.h,v
    retrieving revision 3.275
    diff -u -r3.275 nsIDocument.h
    --- nsIDocument.h	12 Dec 2007 02:26:09 -0000	3.275
    +++ nsIDocument.h	13 Dec 2007 13:48:21 -0000
    @@ -397,7 +397,7 @@
       nsIContent *GetRootContent() const
       {
         return (mCachedRootContent &&
    -            mCachedRootContent->GetNodeParent() == this) ?
    +            mCachedRootContent->GetNodeParent() == (const nsINode *)this) ?
                reinterpret_cast<nsIContent*>(mCachedRootContent.get()) :
                GetRootContentInternal();
       }
    
    Index: xpcmaps.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/js/src/xpconnect/src/xpcmaps.cpp,v
    retrieving revision 1.27
    diff -u -r1.27 xpcmaps.cpp
    --- xpcmaps.cpp	8 Feb 2008 23:10:06 -0000	1.27
    +++ xpcmaps.cpp	11 Feb 2008 10:31:55 -0000
    @@ -688,7 +688,7 @@
         newEntry->key = oldEntry->key;
     
         // Now update the list.
    -    if(PR_CLIST_IS_EMPTY(&oldEntry->value))
    +    if(PR_CLIST_IS_EMPTY((const PRCList*)&oldEntry->value))
         {
             PR_INIT_CLIST(&newEntry->value);
             newEntry->value.obj = oldEntry->value.obj;
    
    • VC6 won't allow access to a protected or private member of the base type of an nsRefPtr. This may be alleviated using these patches:
    Index: nsXFormsModelElement.h
    ===================================================================
    RCS file: /cvsroot/mozilla/extensions/xforms/nsXFormsModelElement.h,v
    retrieving revision 1.57
    diff -u -r1.57 nsXFormsModelElement.h
    --- nsXFormsModelElement.h	31 Jan 2007 17:08:30 -0000	1.57
    +++ nsXFormsModelElement.h	12 Feb 2007 15:24:31 -0000
    @@ -131,6 +131,8 @@
     {
       nsAutoRefCnt                      mRefCnt;
     
    +public:
    +
       /** The XForms control itself */
       nsCOMPtr<nsIXFormsControl>        mNode;
     
    @@ -142,8 +144,6 @@
     
       nsRefPtrHashtable<nsISupportsHashKey, nsXFormsControlListItem> *mControlListHash;
     
    -public:
    -
       /** The constructor takes a hashtable pointer, which needs to point to the
        *  model's hashtable.  This is so that each item in the control list has
        *  access to the same hashtable and can add/remove items from it and find
    
    Index: nsViewManager.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/view/src/nsViewManager.cpp,v
    retrieving revision 3.461
    diff -u -r3.461 nsViewManager.cpp
    --- nsViewManager.cpp	19 Dec 2007 19:40:19 -0000	3.461
    +++ nsViewManager.cpp	20 Dec 2007 19:39:59 -0000
    @@ -1032,7 +1032,7 @@
                 if (widget)
                     widget->GetHasTransparentBackground(transparentWindow);
     
    -            if (rootVM->mScrollCnt == 0 && !transparentWindow) {
    +            if (rootVM.get()->mScrollCnt == 0 && !transparentWindow) {
                   nsIViewObserver* observer = GetViewObserver();
                   if (observer) {
                     // Do an update view batch.  Make sure not to do it DEFERRED,
    @@ -1057,8 +1057,8 @@
                 }
                 // Make sure to sync up any widget geometry changes we
                 // have pending before we paint.
    -            if (rootVM->mHasPendingUpdates) {
    -              rootVM->ProcessPendingUpdates(mRootView, PR_FALSE);
    +            if (rootVM.get()->mHasPendingUpdates) {
    +              rootVM.get()->ProcessPendingUpdates(mRootView, PR_FALSE);
                 }
                 
                 if (view) {
    
    Index: nsAccessibleEventData.h
    ===================================================================
    RCS file: /cvsroot/mozilla/accessible/src/base/nsAccessibleEventData.h,v
    retrieving revision 1.32
    diff -u -r1.32 nsAccessibleEventData.h
    --- nsAccessibleEventData.h	17 Mar 2008 08:13:10 -0000	1.32
    +++ nsAccessibleEventData.h	18 Mar 2008 20:38:52 -0000
    @@ -105,7 +105,7 @@
       void CaptureIsFromUserInput(PRBool aIsAsynch);
       PRBool mIsFromUserInput;
     
    -private:
    +public:
       PRUint32 mEventType;
       EEventRule mEventRule;
       nsCOMPtr<nsIAccessible> mAccessible;
    @@ -115,7 +115,6 @@
       static PRBool gLastEventFromUserInput;
       static nsIDOMNode* gLastEventNodeWeak;
     
    -public:
       static PRUint32 EventType(nsIAccessibleEvent *aAccEvent) {
         PRUint32 eventType;
         aAccEvent->GetEventType(&eventType);
    
    • VC6 won't delete a const pointer. This may be alleviated by casting away const using this patch:
    Index: gfxFont.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/thebes/src/gfxFont.cpp,v
    retrieving revision 1.54
    diff -u -r1.54 gfxFont.cpp
    --- gfxFont.cpp	8 Jul 2007 07:08:27 -0000	1.54
    +++ gfxFont.cpp	10 Jul 2007 10:55:22 -0000
    @@ -698,9 +698,9 @@
     #endif
         if (!(mFlags & gfxTextRunFactory::TEXT_IS_PERSISTENT)) {
             if (mFlags & gfxTextRunFactory::TEXT_IS_8BIT) {
    -            delete[] mText.mSingle;
    +            delete[] const_cast<PRUint8 *>(mText.mSingle);
             } else {
    -            delete[] mText.mDouble;
    +            delete[] const_cast<PRUnichar *>(mText.mDouble);
             }
         }
         NS_RELEASE(mFontGroup);
    
    • VC6 thinks that (typename( is the beginning of a cast to a function returning typename, rather than a function-style cast. This may be alleviated by changing the cast to a C-style cast using this patch:
    Index: nsCSSRendering.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/layout/base/nsCSSRendering.cpp,v
    retrieving revision 3.318
    diff -u -r3.318 nsCSSRendering.cpp
    --- nsCSSRendering.cpp	30 May 2007 08:37:30 -0000	3.318
    +++ nsCSSRendering.cpp	31 May 2007 16:07:52 -0000
    @@ -1956,7 +1956,7 @@
         // of them.
         PRUint32 maxBorderWidth = 0;
         for (int i = 0; i < 4; i++)
    -      maxBorderWidth = PR_MAX(maxBorderWidth, PRUint32(borderWidths[i]));
    +      maxBorderWidth = PR_MAX(maxBorderWidth, (PRUint32)(borderWidths[i]));
         
         borderColorStyle = new BorderColorStyle[maxBorderWidth];
         borderColorStyleCount = maxBorderWidth;
    
    • VC6 does not permit a derived class to override a virtual function with a covariant type. This may be alleviated using this patch:
    Index: gfxWindowsFonts.h
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/thebes/public/gfxWindowsFonts.h,v
    retrieving revision 1.60
    diff -u -r1.60 gfxWindowsFonts.h
    --- gfxWindowsFonts.h	13 Jun 2007 23:28:25 -0000	1.60
    +++ gfxWindowsFonts.h	15 Jun 2007 09:34:27 -0000
    @@ -529,7 +529,11 @@
             return mFontEntries[i];
         }
     
    -    virtual gfxWindowsFont *GetFontAt(PRInt32 i);
    +    virtual gfxFont *GetFontAt(PRInt32 i) {
    +        return GetWindowsFontAt(i);
    +    }
    +
    +    gfxWindowsFont *GetWindowsFontAt(PRInt32 i);
     
     protected:
         void InitTextRunGDI(gfxContext *aContext, gfxTextRun *aRun, const char *aString, PRUint32 aLength);
    Index: gfxWindowsFonts.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp,v
    retrieving revision 1.201
    diff -u -r1.201 gfxWindowsFonts.cpp
    --- gfxWindowsFonts.cpp	28 Apr 2008 22:30:22 -0000	1.201
    +++ gfxWindowsFonts.cpp	29 Apr 2008 07:16:39 -0000
    @@ -805,7 +806,7 @@
     }
     
     gfxWindowsFont *
    -gfxWindowsFontGroup::GetFontAt(PRInt32 i)
    +gfxWindowsFontGroup::GetWindowsFontAt(PRInt32 i)
     {
         if (!mFonts[i]) {
             nsRefPtr<gfxWindowsFont> font =
    @@ -991,7 +992,7 @@
     gfxWindowsFontGroup::InitTextRunGDI(gfxContext *aContext, gfxTextRun *aRun,
                                         const char *aString, PRUint32 aLength)
     {
    -    nsRefPtr<gfxWindowsFont> font = GetFontAt(0);
    +    nsRefPtr<gfxWindowsFont> font = GetWindowsFontAt(0);
         DCFromContext dc(aContext);
         if (SetupDCFont(dc, font)) {
             nsAutoTArray<WCHAR,500> glyphArray;
    @@ -1015,7 +1016,7 @@
     gfxWindowsFontGroup::InitTextRunGDI(gfxContext *aContext, gfxTextRun *aRun,
                                         const PRUnichar *aString, PRUint32 aLength)
     {
    -    nsRefPtr<gfxWindowsFont> font = GetFontAt(0);
    +    nsRefPtr<gfxWindowsFont> font = GetWindowsFontAt(0);
         DCFromContext dc(aContext);
         if (SetupDCFont(dc, font)) {
             nsAutoTArray<WCHAR,500> glyphArray;
    @@ -1538,7 +1539,7 @@
             if (mRanges[i].font)
                 font = mRanges[i].font;
             else
    -            font = mGroup->GetFontAt(0);
    +            font = mGroup->GetWindowsFontAt(0);
     
             SetCurrentFont(font);
     
    @@ -1688,7 +1689,7 @@
             if (!selectedFont) {
                 PR_LOG(gFontLog, PR_LOG_DEBUG, (" - Looking for best match"));
     
    -            nsRefPtr<gfxWindowsFont> refFont = mGroup->GetFontAt(0);
    +            nsRefPtr<gfxWindowsFont> refFont = mGroup->GetWindowsFontAt(0);
                 gfxWindowsPlatform *platform = gfxWindowsPlatform::GetPlatform();
                 selectedFont = platform->FindFontForChar(ch, refFont);
             }
    
    • VC6 thinks that typename *varname( is the beginning of a function pointer declaration, rather than a C++ style constructor, and is completely confused by typename& varname(. This may be alleviated by changing the constructors to C-style initialisers using these patches:
    Index: nsNativeThemeWin.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/widget/src/windows/nsNativeThemeWin.cpp,v
    retrieving revision 3.88
    diff -u -r3.88 nsNativeThemeWin.cpp
    --- nsNativeThemeWin.cpp	6 Aug 2007 17:45:57 -0000	3.88
    +++ nsNativeThemeWin.cpp	7 Aug 2007 13:38:39 -0000
    @@ -338,7 +338,7 @@
     static PRBool IsTopLevelMenu(nsIFrame *aFrame)
     {
       PRBool isTopLevel(PR_FALSE);
    -  nsIMenuFrame *menuFrame(nsnull);
    +  nsIMenuFrame *menuFrame = nsnull;
       CallQueryInterface(aFrame, &menuFrame);
     
       if (menuFrame) {
    
    Index: xpcwrappednativeproto.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/js/src/xpconnect/src/xpcwrappednativeproto.cpp,v
    retrieving revision 1.21
    diff -u -r1.21 xpcwrappednativeproto.cpp
    --- xpcwrappednativeproto.cpp	14 Dec 2007 01:39:28 -0000	1.21
    +++ xpcwrappednativeproto.cpp	15 Dec 2007 21:06:21 -0000
    @@ -104,7 +104,7 @@
     
         if(mScriptableInfo)
         {
    -        const XPCNativeScriptableFlags& flags(mScriptableInfo->GetFlags());
    +        const XPCNativeScriptableFlags& flags = mScriptableInfo->GetFlags();
     
             if(flags.AllowPropModsToPrototype())
             {
    
    • VC6 doesn't understand the LL or ll suffixes for long long integer constants. This may be alleviated by changing the suffix to i64 using these patches:
    Index: prmjtime.c
    ===================================================================
    RCS file: /cvsroot/mozilla/js/src/prmjtime.c,v
    retrieving revision 3.61
    diff -u -r3.61 prmjtime.c
    --- prmjtime.c	16 Jul 2007 21:29:57 -0000	3.61
    +++ prmjtime.c	21 Jul 2007 06:53:50 -0000
    @@ -173,7 +173,7 @@
     
     static CalibrationData calibration = { 0 };
     
    -#define FILETIME2INT64(ft) (((JSInt64)ft.dwHighDateTime) << 32LL | (JSInt64)ft.dwLowDateTime)
    +#define FILETIME2INT64(ft) (((JSInt64)ft.dwHighDateTime) << 32i64 | (JSInt64)ft.dwLowDateTime)
     
     static void
     NowCalibrate()
    
    Index: cairo-fixed-private.h
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairo-fixed-private.h,v
    retrieving revision 1.1
    diff -u -r1.1 cairo-fixed-private.h
    --- cairo-fixed-private.h	24 Jul 2007 17:29:35 -0000	1.1
    +++ cairo-fixed-private.h	5 Aug 2007 13:50:56 -0000
    @@ -129,7 +129,7 @@
     #define CAIRO_MAGIC_NUMBER_FIXED_16_16 (103079215104.0)
     
     #if CAIRO_FIXED_BITS <= 32
    -#define CAIRO_MAGIC_NUMBER_FIXED ((1LL << (52 - CAIRO_FIXED_FRAC_BITS)) * 1.5)
    +#define CAIRO_MAGIC_NUMBER_FIXED ((1i64 << (52 - CAIRO_FIXED_FRAC_BITS)) * 1.5)
     
     /* For 32-bit fixed point numbers */
     static inline cairo_fixed_t
    
    • VC6 doesn't define M_PI. This may be alleviated by copying the backup definition from cairo-private.h to pixman-private.h using this patch:
    Index: pixman-private.h
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/cairo/libpixman/src/pixman-private.h,v
    retrieving revision 1.11
    diff -u -r1.11 pixman-private.h
    --- pixman-private.h	20 Sep 2007 19:24:51 -0000	1.11
    +++ pixman-private.h	27 Sep 2007 06:26:01 -0000
    @@ -16,6 +16,10 @@
     #define TRUE 1
     #endif
     
    +#ifndef M_PI
    +#define M_PI 3.14159265358979323846
    +#endif
    +
     #define MSBFirst 0
     #define LSBFirst 1
     
    
    • VC6 fails with an internal compiler error when asked to convert a member function pointer into a boolean. This may be alleviated by explicitly comparing the value to zero using this patch:
    Index: nsHttpChannel.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/netwerk/protocol/http/src/nsHttpChannel.cpp,v
    retrieving revision 1.317
    diff -u -r1.317 nsHttpChannel.cpp
    --- nsHttpChannel.cpp	23 Aug 2007 18:56:12 -0000	1.317
    +++ nsHttpChannel.cpp	25 Aug 2007 07:56:29 -0000
    @@ -369,7 +369,7 @@
     void
     nsHttpChannel::HandleAsyncNotifyListener()
     {
    -    NS_PRECONDITION(!mPendingAsyncCallOnResume, "How did that happen?");
    +    NS_PRECONDITION(nsnull == mPendingAsyncCallOnResume, "How did that happen?");
         
         if (mSuspendCount) {
             LOG(("Waiting until resume to do async notification [this=%p]\n",
    @@ -395,7 +395,7 @@
     void
     nsHttpChannel::HandleAsyncRedirect()
     {
    -    NS_PRECONDITION(!mPendingAsyncCallOnResume, "How did that happen?");
    +    NS_PRECONDITION(nsnull == mPendingAsyncCallOnResume, "How did that happen?");
         
         if (mSuspendCount) {
             LOG(("Waiting until resume to do async redirect [this=%p]\n", this));
    @@ -438,7 +438,7 @@
     void
     nsHttpChannel::HandleAsyncNotModified()
     {
    -    NS_PRECONDITION(!mPendingAsyncCallOnResume, "How did that happen?");
    +    NS_PRECONDITION(nsnull == mPendingAsyncCallOnResume, "How did that happen?");
         
         if (mSuspendCount) {
             LOG(("Waiting until resume to do async not-modified [this=%p]\n",
    @@ -1017,7 +1017,7 @@
     void
     nsHttpChannel::HandleAsyncReplaceWithProxy()
     {
    -    NS_PRECONDITION(!mPendingAsyncCallOnResume, "How did that happen?");
    +    NS_PRECONDITION(nsnull == mPendingAsyncCallOnResume, "How did that happen?");
     
         if (mSuspendCount) {
             LOG(("Waiting until resume to do async proxy replacement [this=%p]\n",
    
    • VC6 can't specialise a template with a constant. This may be alleviated by removing the specialisation using this patch:
    Index: nsTArray.h
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/glue/nsTArray.h,v
    retrieving revision 1.41
    diff -u -r1.41 nsTArray.h
    --- nsTArray.h	20 Dec 2007 07:30:04 -0000	1.41
    +++ nsTArray.h	21 Dec 2007 14:04:42 -0000
    @@ -755,12 +755,4 @@
         char mAutoBuf[sizeof(Header) + N * sizeof(elem_type)];
     };
     
    -// specialization for N = 0. this makes the inheritance model easier for
    -// templated users of nsAutoTArray.
    -template<class E>
    -class nsAutoTArray<E, 0> : public nsTArray<E> {
    -  public:
    -    nsAutoTArray() {}
    -};
    -
     #endif  // nsTArray_h__
    
    • VC6 uses an old definition for _open_osfhandle that isn't 64-bit safe. This may be alleviated by casting the HANDLE to the type it expects using the following patch:
    Index: cairo-win32.c
    ===================================================================
    RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairo-win32.c,v
    retrieving revision 1.1
    diff -u -r1.1 cairo-win32.c
    --- cairo-win32.c	18 Jan 2008 21:46:26 -0000	1.1
    +++ cairo-win32.c	19 Jan 2008 18:27:25 -0000
    @@ -82,7 +82,7 @@
     	return NULL;
         }
     
    -    fd = _open_osfhandle((intptr_t) handle, 0);
    +    fd = _open_osfhandle((long) handle, 0);
         if (fd < 0) {
     	CloseHandle (handle);
     	return NULL;
    
    • VC6 cannot use offsetof within a declaration-time constant. As this is only used for compile-time assertions it may be alleviated by removing them using this patch:
    Index: jsparse.c
    ===================================================================
    RCS file: /cvsroot/mozilla/js/src/jsparse.c,v
    retrieving revision 3.330
    diff -u -r3.330 jsparse.c
    --- jsparse.c	20 Jan 2008 20:55:42 -0000	3.330
    +++ jsparse.c	21 Jan 2008 14:53:10 -0000
    @@ -85,14 +85,6 @@
     #endif
     
     /*
    - * Asserts to verify assumptions behind pn_ macros.
    - */
    -JS_STATIC_ASSERT(offsetof(JSParseNode, pn_u.name.atom) ==
    -                 offsetof(JSParseNode, pn_u.apair.atom));
    -JS_STATIC_ASSERT(offsetof(JSParseNode, pn_u.name.slot) ==
    -                 offsetof(JSParseNode, pn_u.lexical.slot));
    -
    -/*
      * JS parsers, from lowest to highest precedence.
      *
      * Each parser takes a context, a token stream, and a tree context struct.
    
    • VC6 cannot declare a template member in a different compilation unit from its definition. This may be alleviated using this patch:
    Index: nsSVGFilters.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGFilters.cpp,v
    retrieving revision 1.63
    diff -u -r1.63 nsSVGFilters.cpp
    --- nsSVGFilters.cpp	18 Feb 2008 07:29:00 -0000	1.63
    +++ nsSVGFilters.cpp	19 Feb 2008 09:35:42 -0000
    @@ -314,8 +314,6 @@
     NS_IMPL_ADDREF_INHERITED(nsSVGFE,nsSVGFEBase)
     NS_IMPL_RELEASE_INHERITED(nsSVGFE,nsSVGFEBase)
     
    -NS_DEFINE_STATIC_IID_ACCESSOR(nsSVGFE, NS_SVG_FE_CID)
    -
     NS_INTERFACE_MAP_BEGIN(nsSVGFE)
        // nsISupports is an ambiguous base of nsSVGFE so we have to work
        // around that
    Index: nsSVGFilters.h
    ===================================================================
    RCS file: /cvsroot/mozilla/content/svg/content/src/nsSVGFilters.h,v
    retrieving revision 1.12
    diff -u -r1.12 nsSVGFilters.h
    --- nsSVGFilters.h	18 Feb 2008 07:29:00 -0000	1.12
    +++ nsSVGFilters.h	19 Feb 2008 09:35:42 -0000
    @@ -155,4 +155,6 @@
       nsCOMPtr<nsIDOMSVGAnimatedString> mResult;
     };
     
    +NS_DEFINE_STATIC_IID_ACCESSOR(nsSVGFE, NS_SVG_FE_CID)
    +
     #endif
    
    • VC6 can't generate a default constructor for an unnamed class. This may be alleviated by naming the class using this patch:
    Index: nsGUIEvent.h
    ===================================================================
    RCS file: /cvsroot/mozilla/widget/public/nsGUIEvent.h,v
    retrieving revision 3.156
    diff -u -r3.156 nsGUIEvent.h
    --- nsGUIEvent.h	20 Feb 2008 07:40:06 -0000	3.156
    +++ nsGUIEvent.h	21 Feb 2008 09:39:42 -0000
    @@ -876,7 +876,7 @@
         PRUint32 mOffset;
         PRUint32 mLength;
       } mInput;
    -  struct {
    +  struct Reply {
         void* mContentsRoot;
         PRUint32 mOffset;
         nsString mString;
    
    • VC6 does not have std::max. This can be worked around by replacing it with PR_MAX using this patch:
    Index: ssltunnel.cpp
    ===================================================================
    RCS file: /cvsroot/mozilla/testing/mochitest/ssltunnel/ssltunnel.cpp,v
    retrieving revision 1.1
    diff -u -r1.1 ssltunnel.cpp
    --- ssltunnel.cpp	9 Apr 2008 15:30:55 -0000	1.1
    +++ ssltunnel.cpp	10 Apr 2008 12:24:04 -0000
    @@ -318,10 +320,8 @@
       }
     
       // create a thread pool to handle connections
    -  threads = PR_CreateThreadPool(std::max<PRInt32>(INITIAL_THREADS,
    -                                                  servers.size()*2),
    -                                std::max<PRInt32>(MAX_THREADS,
    -                                                  servers.size()*2),
    +  threads = PR_CreateThreadPool(PR_MAX(INITIAL_THREADS, servers.size()*2),
    +                                PR_MAX(MAX_THREADS, servers.size()*2),
                                     DEFAULT_STACKSIZE);
       if (!threads) {
         fprintf(stderr, "Failed to create thread pool\n");
    
    • VC6 fails to stringify empty macro parameters. This can be alleviated using the following patch:
    Index: xpcom/tests/TestProxies.cpp
    ===================================================================
    Index: nsDebug.h
    ===================================================================
    RCS file: /cvsroot/mozilla/xpcom/glue/nsDebug.h,v
    retrieving revision 1.29
    diff -u -r1.29 nsDebug.h
    --- nsDebug.h	28 Sep 2007 18:59:07 -0000	1.29
    +++ nsDebug.h	10 May 2008 23:11:58 -0000
    @@ -208,7 +208,7 @@
     
     #define NS_ENSURE_SUCCESS_BODY(res, ret)                                  \
         char *msg = PR_smprintf("NS_ENSURE_SUCCESS(%s, %s) failed with "      \
    -                            "result 0x%X", #res, #ret, __rv);             \
    +                            "result 0x%X", #res, #ret "", __rv);          \
         NS_WARNING(msg);                                                      \
         PR_smprintf_free(msg);
     
    

    Show all patches as one big diff file.

    Document Tags and Contributors

    Contributors to this page: Mnyromyr, Neil
    Last updated by: Neil,