diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 20:54:00 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 20:54:00 +0000 |
commit | b8c87bb8ea9f514a8f09a0f2154f8469ba7faf00 (patch) | |
tree | aaf996be490f1160a63a25733c97883ac9fb67b3 | |
parent | 4cfc560327fc44faa4ed27a86f008d888e662ee9 (diff) | |
download | chromium_src-b8c87bb8ea9f514a8f09a0f2154f8469ba7faf00.zip chromium_src-b8c87bb8ea9f514a8f09a0f2154f8469ba7faf00.tar.gz chromium_src-b8c87bb8ea9f514a8f09a0f2154f8469ba7faf00.tar.bz2 |
Use correct decls for non-windows platforms. Create a platform-neutral wrapper for everyone to use.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1463 0039d316-1c4b-4281-b951-d872f2087c98
-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" |