diff options
-rw-r--r-- | base/port.h | 7 | ||||
-rw-r--r-- | webkit/glue/plugins/nphostapi.h | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/base/port.h b/base/port.h index 7435eb5..102651f 100644 --- a/base/port.h +++ b/base/port.h @@ -50,5 +50,12 @@ inline void va_copy(va_list& a, va_list& b) { } // namespace base +// Define an OS-neutral wrapper for shared library entry points +#if defined(OS_WIN) +#define API_CALL __stdcall +#elif defined(OS_POSIX) +#define API_CALL +#endif + #endif // BASE_PORT_H_ diff --git a/webkit/glue/plugins/nphostapi.h b/webkit/glue/plugins/nphostapi.h index 515d526..b7814d8 100644 --- a/webkit/glue/plugins/nphostapi.h +++ b/webkit/glue/plugins/nphostapi.h @@ -7,6 +7,7 @@ #ifndef WEBKIT_GLUE_PLUGIN_NPHOSTAPI_H__ #define WEBKIT_GLUE_PLUGIN_NPHOSTAPI_H__ +#include "base/port.h" #include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/npruntime.h" @@ -265,10 +266,9 @@ typedef struct _NPNetscapeFuncs { // // NPAPI DLL entry points // -typedef NPError (__stdcall * NP_InitializeFunc)(NPNetscapeFuncs* pFuncs); -typedef NPError (__stdcall * NP_GetEntryPointsFunc)(NPPluginFuncs* pFuncs); -typedef NPError (__stdcall * NP_ShutdownFunc)(void); - +typedef NPError (API_CALL * NP_InitializeFunc)(NPNetscapeFuncs* pFuncs); +typedef NPError (API_CALL * NP_GetEntryPointsFunc)(NPPluginFuncs* pFuncs); +typedef NPError (API_CALL * NP_ShutdownFunc)(void); #ifdef __cplusplus } // extern "C" |