diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-11-12 16:59:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-12 17:07:26 +0100 |
commit | 9081e07c9c92267d86a90752b28bd42b592782a8 (patch) | |
tree | 0c900fba52aecafa6b238ee8acdec9bf395a2a97 /extensions | |
parent | ce629d95a6eadea43a3b5b4208f3965767f9fcea (diff) |
Enable NPP_Initialize/Shutdown again
...calling which had erroneously been dropped in
bdead69dd3c947743907681c8a2f16ca1f50cd9c "Add switch for system/internal
npapi.h." This makes the npsoplugin browser plugin work again.
(Also, init write_fd to -1 instead of 0, so that a missing do_init_pipe does not
accidentally cause writing to write_fd succeed in writing to stdin.)
Change-Id: Iced734512a43c8dfea46088f7ac16f159e7dd807
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Library_npsoplugin.mk | 3 | ||||
-rw-r--r-- | extensions/source/nsplugin/source/npshell.cxx | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/extensions/Library_npsoplugin.mk b/extensions/Library_npsoplugin.mk index 00a4785c9f15..253e2469a3d2 100644 --- a/extensions/Library_npsoplugin.mk +++ b/extensions/Library_npsoplugin.mk @@ -32,6 +32,7 @@ $(eval $(call gb_Library_Library,npsoplugin)) $(eval $(call gb_Library_use_packages,npsoplugin,\ comphelper_inc \ + np_sdk_inc \ )) $(eval $(call gb_Library_use_external,npsoplugin,mozilla_headers)) @@ -94,8 +95,6 @@ $(eval $(call gb_Library_add_defs,npsoplugin,\ ifeq ($(COM),MSC) $(eval $(call gb_Library_add_ldflags,npsoplugin,\ /EXPORT:NPP_GetMIMEDescription \ - /EXPORT:NPP_Initialize \ - /EXPORT:NPP_Shutdown \ /EXPORT:NPP_New \ /EXPORT:NPP_Destroy \ /EXPORT:NPP_SetWindow \ diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx index b7ee74dff9c0..bdfca9cafb26 100644 --- a/extensions/source/nsplugin/source/npshell.cxx +++ b/extensions/source/nsplugin/source/npshell.cxx @@ -83,6 +83,8 @@ #include "nsp_func.hxx" +#include "npsdk/plugin.h" + #include <comphelper/documentconstants.hxx> #ifdef _MSC_VER @@ -98,7 +100,7 @@ ***********************************************************************/ static NSP_Mute_Obj send_lock = NSP_New_Mute_Obj(); -static NSP_PIPE_FD write_fd = 0; +static NSP_PIPE_FD write_fd = -1; long int NSP_WriteToPipe(NSP_PIPE_FD fp, void* buf, unsigned long int len) @@ -417,7 +419,7 @@ dupMimeType(NPMIMEType type) } #endif // end of UNIX -NP_DLLPUBLIC NPError +NPError NPP_Initialize(void) { debug_fprintf(NSP_LOG_NEW, "NS Plugin begin initialize.\n"); @@ -432,7 +434,7 @@ NPP_GetJavaClass() } #endif -NP_DLLPUBLIC void +void NPP_Shutdown(void) { PLUGIN_MSG msg; |