Kaydet (Commit) 1c0f94ab authored tarafından David Tardon's avatar David Tardon

blind fix for breaking windows build

error C2556: 'sal_Bool MNS_InitXPCOM(sal_Bool *)' : overloaded function differs only by return type from 'bool MNS_InitXPCOM(sal_Bool *)'
error C2371: 'MNS_InitXPCOM' : redefinition; different basic types
error C2440: 'initializing' : cannot convert from 'bool *' to 'sal_Bool *'

Change-Id: Ica225dd47e8d90833ce56c0bd4ee38e5013196f6
üst 52f296ac
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
static nsIServiceManager* sServiceManager = nsnull; static nsIServiceManager* sServiceManager = nsnull;
static sal_Int32 sInitCounter = 0; static sal_Int32 sInitCounter = 0;
static sal_Bool s_bProfilePresentAfterInitialized = sal_False; static bool s_bProfilePresentAfterInitialized = false;
static NS_DEFINE_CID(kProfileCID, NS_PROFILE_CID); static NS_DEFINE_CID(kProfileCID, NS_PROFILE_CID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID); static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
...@@ -93,7 +93,7 @@ extern "C" void NS_SetupRegistry(); ...@@ -93,7 +93,7 @@ extern "C" void NS_SetupRegistry();
} }
sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) bool MNS_InitXPCOM(bool* aProfileExists)
{ {
nsresult rv; nsresult rv;
OSL_TRACE( "IN : MNS_InitXPCOM()" ); OSL_TRACE( "IN : MNS_InitXPCOM()" );
...@@ -126,7 +126,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) ...@@ -126,7 +126,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists)
nsDependentCString sPath(path2.getStr()); nsDependentCString sPath(path2.getStr());
rv = NS_NewNativeLocalFile(sPath, PR_TRUE, getter_AddRefs(binDir)); rv = NS_NewNativeLocalFile(sPath, PR_TRUE, getter_AddRefs(binDir));
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return sal_False; return false;
} }
...@@ -135,7 +135,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) ...@@ -135,7 +135,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists)
NS_InitXPCOM2(&sServiceManager, binDir, NULL); NS_InitXPCOM2(&sServiceManager, binDir, NULL);
// if (!sServiceManager) // if (!sServiceManager)
// return sal_False; // return false;
#ifdef HACK_AROUND_NONREENTRANT_INITXPCOM #ifdef HACK_AROUND_NONREENTRANT_INITXPCOM
sXPCOMInitializedFlag = PR_TRUE; sXPCOMInitializedFlag = PR_TRUE;
...@@ -151,7 +151,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) ...@@ -151,7 +151,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists)
nsCOMPtr<nsIEventQueueService> eventQService( nsCOMPtr<nsIEventQueueService> eventQService(
do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv)); do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return NS_SUCCEEDED( rv ) ? sal_True : sal_False; return NS_SUCCEEDED( rv ) ? true : false;
eventQService->CreateThreadEventQueue(); eventQService->CreateThreadEventQueue();
...@@ -179,12 +179,12 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) ...@@ -179,12 +179,12 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists)
{ {
OSL_TRACE("Created an nsIPref i/f"); OSL_TRACE("Created an nsIPref i/f");
thePref->ReadUserPrefs( nsnull ); thePref->ReadUserPrefs( nsnull );
*aProfileExists = sal_True ; *aProfileExists = true;
s_bProfilePresentAfterInitialized = sal_True; s_bProfilePresentAfterInitialized = true;
} }
OSL_TRACE( "OUT : MNS_InitXPCOM() - XPCOM Init" ); OSL_TRACE( "OUT : MNS_InitXPCOM() - XPCOM Init" );
return sal_True; return true;
} }
void MNS_XPCOM_EventLoop() void MNS_XPCOM_EventLoop()
...@@ -232,7 +232,7 @@ extern "C" void MNS_Mozilla_UI_Thread( void *arg ) ...@@ -232,7 +232,7 @@ extern "C" void MNS_Mozilla_UI_Thread( void *arg )
aLive=1; aLive=1;
OSL_TRACE( "IN : MNS_Mozilla_UI_Thread()" ); OSL_TRACE( "IN : MNS_Mozilla_UI_Thread()" );
UI_Thread_ARGS * args = (UI_Thread_ARGS*) arg; UI_Thread_ARGS * args = (UI_Thread_ARGS*) arg;
sal_Bool* aProfileExists=args->bProfileExists; bool* aProfileExists=args->bProfileExists;
delete args; delete args;
args=NULL; args=NULL;
...@@ -264,9 +264,9 @@ extern "C" void MNS_Mozilla_UI_Thread( void *arg ) ...@@ -264,9 +264,9 @@ extern "C" void MNS_Mozilla_UI_Thread( void *arg )
} }
sal_Bool MNS_Init(sal_Bool& aProfileExists) bool MNS_Init(bool& aProfileExists)
{ {
aProfileExists = sal_False ; aProfileExists = false;
OSL_TRACE( "IN : MNS_Init()" ); OSL_TRACE( "IN : MNS_Init()" );
// Reentrant calls to this method do nothing except increment a counter // Reentrant calls to this method do nothing except increment a counter
...@@ -278,7 +278,7 @@ sal_Bool MNS_Init(sal_Bool& aProfileExists) ...@@ -278,7 +278,7 @@ sal_Bool MNS_Init(sal_Bool& aProfileExists)
OSL_TRACE( "OUT : MNS_Init() : counter = %d", sInitCounter ); OSL_TRACE( "OUT : MNS_Init() : counter = %d", sInitCounter );
aProfileExists = s_bProfilePresentAfterInitialized; aProfileExists = s_bProfilePresentAfterInitialized;
return sal_True; return true;
} }
UI_Thread_ARGS * args = new UI_Thread_ARGS; UI_Thread_ARGS * args = new UI_Thread_ARGS;
...@@ -287,7 +287,7 @@ sal_Bool MNS_Init(sal_Bool& aProfileExists) ...@@ -287,7 +287,7 @@ sal_Bool MNS_Init(sal_Bool& aProfileExists)
m_aUI_Thread_Condition.reset(); m_aUI_Thread_Condition.reset();
if (osl_createThread(MNS_Mozilla_UI_Thread, (void*)args) == 0) if (osl_createThread(MNS_Mozilla_UI_Thread, (void*)args) == 0)
{ {
return sal_False; return false;
} }
//wait for xpcom to be initted //wait for xpcom to be initted
...@@ -298,10 +298,10 @@ sal_Bool MNS_Init(sal_Bool& aProfileExists) ...@@ -298,10 +298,10 @@ sal_Bool MNS_Init(sal_Bool& aProfileExists)
OSL_TRACE( "OUT : MNS_Init() - First Init" ); OSL_TRACE( "OUT : MNS_Init() - First Init" );
return sal_True; return true;
} }
sal_Bool MNS_Term(sal_Bool aForce) bool MNS_Term(bool aForce)
{ {
// Reentrant calls to this method do nothing except decrement a counter // Reentrant calls to this method do nothing except decrement a counter
OSL_TRACE( "IN : MNS_Term()" ); OSL_TRACE( "IN : MNS_Term()" );
...@@ -309,7 +309,7 @@ sal_Bool MNS_Term(sal_Bool aForce) ...@@ -309,7 +309,7 @@ sal_Bool MNS_Term(sal_Bool aForce)
{ {
--sInitCounter; --sInitCounter;
OSL_TRACE( "OUT : MNS_Term() : counter = %d", sInitCounter ); OSL_TRACE( "OUT : MNS_Term() : counter = %d", sInitCounter );
return sal_True; return true;
} }
sInitCounter = 0; sInitCounter = 0;
...@@ -321,7 +321,7 @@ sal_Bool MNS_Term(sal_Bool aForce) ...@@ -321,7 +321,7 @@ sal_Bool MNS_Term(sal_Bool aForce)
OSL_TRACE( "OUT : MNS_Term() - Final Term" ); OSL_TRACE( "OUT : MNS_Term() - Final Term" );
return sal_True; return true;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
bool MNS_Init(bool& aProfileExists); bool MNS_Init(bool& aProfileExists);
bool MNS_Term(bool aForce = false); bool MNS_Term(bool aForce = false);
bool MNS_InitXPCOM(sal_Bool* aProfileExists); bool MNS_InitXPCOM(bool* aProfileExists);
typedef struct UI_Thread_ARGS typedef struct UI_Thread_ARGS
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment