diff --git a/mozilla/xpcom/libxpt/xptinfo/public/xpt_cpp.h b/mozilla/xpcom/libxpt/xptinfo/public/xpt_cpp.h index acbb23f2237..3352bb24c57 100644 --- a/mozilla/xpcom/libxpt/xptinfo/public/xpt_cpp.h +++ b/mozilla/xpcom/libxpt/xptinfo/public/xpt_cpp.h @@ -22,6 +22,7 @@ #define xpt_cpp_h___ #include "xpt_struct.h" +#include "xptinfo.h" // Everything here is dependent upon - and sensitive to changes in - // xpcom/libxpt/xpt_struct.h! @@ -115,10 +116,10 @@ public: // is associated with so that we can find the table this index indexes // and then find the referenced XPTInterfaceDirectoryEntry so that we can // find (or build) the appropriate nsIInterfaceInfo. Simple :) - nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ; + XPTI_EXPORT nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ; // a *little* simpler than the above - const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ; + XPTI_EXPORT const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ; private: nsXPTParamInfo(); // no implementation diff --git a/mozilla/xpcom/libxpt/xptinfo/public/xptinfo.h b/mozilla/xpcom/libxpt/xptinfo/public/xptinfo.h index 997b56d8fe3..af7428a3f62 100644 --- a/mozilla/xpcom/libxpt/xptinfo/public/xptinfo.h +++ b/mozilla/xpcom/libxpt/xptinfo/public/xptinfo.h @@ -32,13 +32,20 @@ #ifdef EXPORT_XPTI_API #define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t) #define XPTI_PUBLIC_DATA(t) PR_IMPLEMENT_DATA(t) +#ifdef _WIN32 +# define XPTI_EXPORT _declspec(dllexport) +#else +# define XPTI_EXPORT +#endif #else #ifdef _WIN32 # define XPTI_PUBLIC_API(t) _declspec(dllimport) t # define XPTI_PUBLIC_DATA(t) _declspec(dllimport) t +# define XPTI_EXPORT _declspec(dllimport) #else # define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t) # define XPTI_PUBLIC_DATA(t) t +# define XPTI_EXPORT #endif #endif #define XPTI_FRIEND_API(t) XPTI_PUBLIC_API(t) diff --git a/mozilla/xpcom/libxpt/xptinfo/tests/TestInterfaceInfo.cpp b/mozilla/xpcom/libxpt/xptinfo/tests/TestInterfaceInfo.cpp index c0dc13b08b3..8be253897ba 100644 --- a/mozilla/xpcom/libxpt/xptinfo/tests/TestInterfaceInfo.cpp +++ b/mozilla/xpcom/libxpt/xptinfo/tests/TestInterfaceInfo.cpp @@ -102,7 +102,7 @@ int main (int argc, char **argv) { nsXPTParamInfo param2 = mi->GetParam(2); // should be IID for nsIShutdownListener - nsIID *nsISL = param2.GetInterfaceIID(info5); + const nsIID *nsISL = param2.GetInterfaceIID(info5); fprintf(stderr, "iid assoc'd with param 2 of method 7 of GetServiceWithListener - %s\n", nsISL->ToString()); // if we look up the name? char *nsISLname; @@ -112,7 +112,7 @@ int main (int argc, char **argv) { fprintf(stderr, "\nhow about one defined in a different typelib\n"); nsXPTParamInfo param3 = mi->GetParam(3); // should be IID for nsIShutdownListener - nsIID *nsISS = param3.GetInterfaceIID(info5); + const nsIID *nsISS = param3.GetInterfaceIID(info5); fprintf(stderr, "iid assoc'd with param 3 of method 7 of GetServiceWithListener - %s\n", nsISS->ToString()); // if we look up the name? char *nsISSname; diff --git a/mozilla/xpcom/reflect/xptinfo/public/xpt_cpp.h b/mozilla/xpcom/reflect/xptinfo/public/xpt_cpp.h index acbb23f2237..3352bb24c57 100644 --- a/mozilla/xpcom/reflect/xptinfo/public/xpt_cpp.h +++ b/mozilla/xpcom/reflect/xptinfo/public/xpt_cpp.h @@ -22,6 +22,7 @@ #define xpt_cpp_h___ #include "xpt_struct.h" +#include "xptinfo.h" // Everything here is dependent upon - and sensitive to changes in - // xpcom/libxpt/xpt_struct.h! @@ -115,10 +116,10 @@ public: // is associated with so that we can find the table this index indexes // and then find the referenced XPTInterfaceDirectoryEntry so that we can // find (or build) the appropriate nsIInterfaceInfo. Simple :) - nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ; + XPTI_EXPORT nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ; // a *little* simpler than the above - const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ; + XPTI_EXPORT const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ; private: nsXPTParamInfo(); // no implementation diff --git a/mozilla/xpcom/reflect/xptinfo/public/xptinfo.h b/mozilla/xpcom/reflect/xptinfo/public/xptinfo.h index 997b56d8fe3..af7428a3f62 100644 --- a/mozilla/xpcom/reflect/xptinfo/public/xptinfo.h +++ b/mozilla/xpcom/reflect/xptinfo/public/xptinfo.h @@ -32,13 +32,20 @@ #ifdef EXPORT_XPTI_API #define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t) #define XPTI_PUBLIC_DATA(t) PR_IMPLEMENT_DATA(t) +#ifdef _WIN32 +# define XPTI_EXPORT _declspec(dllexport) +#else +# define XPTI_EXPORT +#endif #else #ifdef _WIN32 # define XPTI_PUBLIC_API(t) _declspec(dllimport) t # define XPTI_PUBLIC_DATA(t) _declspec(dllimport) t +# define XPTI_EXPORT _declspec(dllimport) #else # define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t) # define XPTI_PUBLIC_DATA(t) t +# define XPTI_EXPORT #endif #endif #define XPTI_FRIEND_API(t) XPTI_PUBLIC_API(t) diff --git a/mozilla/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp b/mozilla/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp index c0dc13b08b3..8be253897ba 100644 --- a/mozilla/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp +++ b/mozilla/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp @@ -102,7 +102,7 @@ int main (int argc, char **argv) { nsXPTParamInfo param2 = mi->GetParam(2); // should be IID for nsIShutdownListener - nsIID *nsISL = param2.GetInterfaceIID(info5); + const nsIID *nsISL = param2.GetInterfaceIID(info5); fprintf(stderr, "iid assoc'd with param 2 of method 7 of GetServiceWithListener - %s\n", nsISL->ToString()); // if we look up the name? char *nsISLname; @@ -112,7 +112,7 @@ int main (int argc, char **argv) { fprintf(stderr, "\nhow about one defined in a different typelib\n"); nsXPTParamInfo param3 = mi->GetParam(3); // should be IID for nsIShutdownListener - nsIID *nsISS = param3.GetInterfaceIID(info5); + const nsIID *nsISS = param3.GetInterfaceIID(info5); fprintf(stderr, "iid assoc'd with param 3 of method 7 of GetServiceWithListener - %s\n", nsISS->ToString()); // if we look up the name? char *nsISSname;