diff --git a/modules/plugin/samples/default/os2/maindll.cpp b/modules/plugin/samples/default/os2/maindll.cpp index b2d0054e493..a14927e095f 100644 --- a/modules/plugin/samples/default/os2/maindll.cpp +++ b/modules/plugin/samples/default/os2/maindll.cpp @@ -47,10 +47,9 @@ void __ctordtorInit( void ); void __ctordtorTerm( void ); } -unsigned long _System _DLL_InitTerm( unsigned long hModule, - unsigned long ulFlag ) { - APIRET rc; - +extern "C" unsigned long _System _DLL_InitTerm(unsigned long hModule, + unsigned long ulFlag) +{ switch (ulFlag) { case 0 : // Init: Prime compiler run-time and construct static C++ objects. diff --git a/modules/plugin/samples/default/os2/npos2.cpp b/modules/plugin/samples/default/os2/npos2.cpp index 37acb608cdf..5647517d6f2 100644 --- a/modules/plugin/samples/default/os2/npos2.cpp +++ b/modules/plugin/samples/default/os2/npos2.cpp @@ -49,6 +49,7 @@ //\\// GLOBAL DATA NPNetscapeFuncs* g_pNavigatorFuncs = 0; +#ifdef OJI JRIGlobalRef Private_GetJavaClass(void); //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\. @@ -68,7 +69,7 @@ Private_GetJavaClass(void) } return NULL; } - +#endif /* OJI */ //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\. ////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//. // PLUGIN DLL entry points @@ -143,11 +144,11 @@ NP_Initialize(NPNetscapeFuncs* pFuncs) if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) { g_pluginFuncs->urlnotify = NPP_URLNotify; } - +#ifdef OJI if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) { g_pluginFuncs->javaClass = Private_GetJavaClass(); } - +#endif // NPP_Initialize is a standard (cross-platform) initialize function. return NPP_Initialize(); } @@ -330,7 +331,7 @@ void NPN_MemFree(void* ptr) { g_pNavigatorFuncs->memfree(ptr); } - +#ifdef OJI /* private function to Netscape. do not use! */ void NPN_ReloadPlugins(NPBool reloadPages) @@ -347,4 +348,5 @@ jref NPN_GetJavaPeer(NPP instance) { return g_pNavigatorFuncs->getJavaPeer(instance); } +#endif diff --git a/modules/plugin/samples/default/os2/npshell.cpp b/modules/plugin/samples/default/os2/npshell.cpp index 1e6ac7e07c3..99859bc98be 100644 --- a/modules/plugin/samples/default/os2/npshell.cpp +++ b/modules/plugin/samples/default/os2/npshell.cpp @@ -317,7 +317,9 @@ void NP_LOADDS NPP_URLNotify(NPP pInstance, const char* url, NPReason reason, vo pPlugin->URLNotify(url); } +#ifdef OJI jref NP_LOADDS NPP_GetJavaClass(void) { return NULL; } +#endif diff --git a/modules/plugin/samples/default/os2/plugin.cpp b/modules/plugin/samples/default/os2/plugin.cpp index d3952f1c7fb..c424cefb4ba 100644 --- a/modules/plugin/samples/default/os2/plugin.cpp +++ b/modules/plugin/samples/default/os2/plugin.cpp @@ -418,11 +418,15 @@ void CPlugin::showGetPluginDialog() m_bOnline = !bOffline; +#ifdef OJI if(m_bOnline && m_bJavaScript && m_bSmartUpdate && useDefaultURL_P()) { JRIEnv *penv = NPN_GetJavaEnv(); m_bJava = (penv != NULL); } +#else + m_bJava = FALSE; +#endif dbgOut1("Environment:"); dbgOut2("%s", m_bOnline ? "On-line" : "Off-line"); diff --git a/modules/plugin/tools/tester/os2/os2entry.cpp b/modules/plugin/tools/tester/os2/os2entry.cpp index c8572f9a717..698688dbf09 100644 --- a/modules/plugin/tools/tester/os2/os2entry.cpp +++ b/modules/plugin/tools/tester/os2/os2entry.cpp @@ -58,7 +58,7 @@ void __ctordtorInit( void ); void __ctordtorTerm( void ); } -unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long ulFlag) +extern "C" unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long ulFlag) { APIRET rc;