Add patch for GCC 4.6 on xulrunner
[user/sardemff7.git] / net-libs / xulrunner / files / gcc46.patch
1 diff -urN a/embedding/browser/gtk/src/EmbedPrivate.cpp b/embedding/browser/gtk/src/EmbedPrivate.cpp
2 --- a/embedding/browser/gtk/src/EmbedPrivate.cpp        2011-03-18 19:33:39.000000000 -0400
3 +++ b/embedding/browser/gtk/src/EmbedPrivate.cpp        2011-04-03 08:12:12.995741697 -0400
4 @@ -104,7 +104,7 @@
5    NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
6  };
7  
8 -static const GTKEmbedDirectoryProvider kDirectoryProvider;
9 +static const GTKEmbedDirectoryProvider kDirectoryProvider = GTKEmbedDirectoryProvider();
10  
11  NS_IMPL_QUERY_INTERFACE2(GTKEmbedDirectoryProvider,
12                           nsIDirectoryServiceProvider,
13 diff -urN a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
14 --- a/layout/style/nsCSSRuleProcessor.cpp       2011-03-18 19:34:00.000000000 -0400
15 +++ b/layout/style/nsCSSRuleProcessor.cpp       2011-04-03 08:12:35.205741696 -0400
16 @@ -1505,7 +1505,7 @@
17      return PR_FALSE;
18  
19    const nsDefaultStringComparator defaultComparator;
20 -  const nsASCIICaseInsensitiveStringComparator ciComparator;
21 +  const nsASCIICaseInsensitiveStringComparator ciComparator = nsASCIICaseInsensitiveStringComparator();
22    const nsStringComparator& comparator =
23        (aAttrSelector->mCaseSensitive || !isHTML)
24                  ? static_cast<const nsStringComparator&>(defaultComparator)
25 diff -urN a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
26 --- a/toolkit/xre/nsAppRunner.cpp       2011-04-03 08:17:35.091741681 -0400
27 +++ b/toolkit/xre/nsAppRunner.cpp       2011-04-03 08:12:12.305741698 -0400
28 @@ -1041,7 +1041,7 @@
29  
30  #endif
31  
32 -static const nsXULAppInfo kAppInfo;
33 +static const nsXULAppInfo kAppInfo = nsXULAppInfo();
34  static nsresult AppInfoConstructor(nsISupports* aOuter,
35                                     REFNSIID aIID, void **aResult)
36  {
37 diff -urN a/xpcom/base/nsDebugImpl.cpp b/xpcom/base/nsDebugImpl.cpp
38 --- a/xpcom/base/nsDebugImpl.cpp        2011-03-18 19:34:13.000000000 -0400
39 +++ b/xpcom/base/nsDebugImpl.cpp        2011-04-03 08:12:15.530741697 -0400
40 @@ -524,7 +524,7 @@
41  #endif
42  }
43  
44 -static const nsDebugImpl kImpl;
45 +static const nsDebugImpl kImpl = nsDebugImpl();
46  
47  nsresult
48  nsDebugImpl::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr)
49 diff -urN a/xpcom/base/nsTraceRefcntImpl.cpp b/xpcom/base/nsTraceRefcntImpl.cpp
50 --- a/xpcom/base/nsTraceRefcntImpl.cpp  2011-03-18 19:34:13.000000000 -0400
51 +++ b/xpcom/base/nsTraceRefcntImpl.cpp  2011-04-03 08:12:15.529741697 -0400
52 @@ -1362,7 +1362,7 @@
53    return NS_OK;
54  }
55  
56 -static const nsTraceRefcntImpl kTraceRefcntImpl;
57 +static const nsTraceRefcntImpl kTraceRefcntImpl = nsTraceRefcntImpl();
58  
59  NS_METHOD
60  nsTraceRefcntImpl::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr)
61 diff -urN a/xpcom/glue/nsEnumeratorUtils.cpp b/xpcom/glue/nsEnumeratorUtils.cpp
62 --- a/xpcom/glue/nsEnumeratorUtils.cpp  2011-03-18 19:34:13.000000000 -0400
63 +++ b/xpcom/glue/nsEnumeratorUtils.cpp  2011-04-03 08:12:15.574741697 -0400
64 @@ -112,7 +112,7 @@
65      return NS_ERROR_UNEXPECTED;
66  }
67  
68 -const EmptyEnumeratorImpl EmptyEnumeratorImpl::kInstance;
69 +const EmptyEnumeratorImpl EmptyEnumeratorImpl::kInstance = EmptyEnumeratorImpl();
70  
71  nsresult
72  NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult)
73 diff -urN a/xpcom/io/nsUnicharInputStream.cpp b/xpcom/io/nsUnicharInputStream.cpp
74 --- a/xpcom/io/nsUnicharInputStream.cpp 2011-03-18 19:34:13.000000000 -0400
75 +++ b/xpcom/io/nsUnicharInputStream.cpp 2011-04-03 08:12:16.023741697 -0400
76 @@ -464,4 +464,4 @@
77  }
78  
79  const nsSimpleUnicharStreamFactory
80 -nsSimpleUnicharStreamFactory::kInstance;
81 +nsSimpleUnicharStreamFactory::kInstance = nsSimpleUnicharStreamFactory();