From 99edde7f0d1dd8ba3f56b892d1dc6cc1f3a045a9 Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Mon, 22 May 2006 19:13:03 +0000 Subject: [PATCH] Bug 305949 (almost done!) - Stop exporting some nonfrozen functions (widget and libreg) r=bryner --- modules/libreg/include/NSReg.h | 23 ++-------------------- modules/oji/src/nsJVMManager.cpp | 2 +- widget/src/xpwidgets/nsPrintOptionsImpl.h | 6 ------ widget/src/xpwidgets/nsPrintSettingsImpl.h | 6 ------ 4 files changed, 3 insertions(+), 34 deletions(-) diff --git a/modules/libreg/include/NSReg.h b/modules/libreg/include/NSReg.h index f26a917eae8..1125ea27844 100644 --- a/modules/libreg/include/NSReg.h +++ b/modules/libreg/include/NSReg.h @@ -115,27 +115,8 @@ typedef struct _reginfo #define UNIX_GLOBAL_FLAG "MOZILLA_SHARED_REGISTRY" -/* Platform-dependent declspec for library interface */ -#if defined(XP_WIN) - #if defined(WIN32) - #if defined (STANDALONE_REGISTRY) - #define VR_INTERFACE(type) __declspec(dllexport) type __cdecl - #else - #define VR_INTERFACE(type) __declspec(dllexport) type __stdcall - #endif - - #else - #define VR_INTERFACE(type) type _far _pascal _export - #endif -#elif defined(XP_OS2) && defined(__declspec) - #define VR_INTERFACE(type) __declspec(dllexport) type -#elif defined XP_MAC - #define VR_INTERFACE(__x) __declspec(export) __x -#elif defined (HAVE_VISIBILITY_ATTRIBUTE) - #define VR_INTERFACE(type) __attribute__ ((visibility ("default"))) type -#else - #define VR_INTERFACE(type) type -#endif +/* libreg functions are not DLLexported and may have hidden visibility */ +#define VR_INTERFACE(type) type PR_BEGIN_EXTERN_C diff --git a/modules/oji/src/nsJVMManager.cpp b/modules/oji/src/nsJVMManager.cpp index 4eabb4706e0..61208d9bd81 100644 --- a/modules/oji/src/nsJVMManager.cpp +++ b/modules/oji/src/nsJVMManager.cpp @@ -790,7 +790,7 @@ nsJVMManager::GetJVMStatus(void) return fStatus; } -extern "C" nsresult JSJ_RegisterLiveConnectFactory(void); +extern "C" NS_VISIBILITY_DEFAULT nsresult JSJ_RegisterLiveConnectFactory(void); PRBool nsJVMManager::MaybeStartupLiveConnect(void) diff --git a/widget/src/xpwidgets/nsPrintOptionsImpl.h b/widget/src/xpwidgets/nsPrintOptionsImpl.h index 7a0727f077c..d84b34aed7a 100644 --- a/widget/src/xpwidgets/nsPrintOptionsImpl.h +++ b/widget/src/xpwidgets/nsPrintOptionsImpl.h @@ -48,9 +48,6 @@ #include "nsString.h" #include "nsFont.h" -#undef IMETHOD_VISIBILITY -#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT - /** * Class nsPrintOptions */ @@ -134,7 +131,4 @@ private: nsPrintOptions& operator=(const nsPrintOptions& x); }; -#undef IMETHOD_VISIBILITY -#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN - #endif /* nsPrintOptionsImpl_h__ */ diff --git a/widget/src/xpwidgets/nsPrintSettingsImpl.h b/widget/src/xpwidgets/nsPrintSettingsImpl.h index cb95f06183c..f2efaee72a3 100644 --- a/widget/src/xpwidgets/nsPrintSettingsImpl.h +++ b/widget/src/xpwidgets/nsPrintSettingsImpl.h @@ -52,9 +52,6 @@ //*** nsPrintSettings //***************************************************************************** -#undef IMETHOD_VISIBILITY -#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT - class nsPrintSettings : public nsIPrintSettings { public: @@ -136,7 +133,4 @@ protected: }; -#undef IMETHOD_VISIBILITY -#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN - #endif /* nsPrintSettings_h__ */