Commit c9f563b7 authored by fogal1's avatar fogal1

Update export headers for gcc visibility.

Explicitly marks symbols as external in the same cases as we would
for MSVC.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7693 18c085ea-50e0-402c-830e-de6fd14e8384
parent 68c4d48e
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define DBATTS_API # if __GNUC__ >= 4 && defined(DBATTS_EXPORTS)
# define DBATTS_API __attribute__ ((visibility("default")))
# else
# define DBATTS_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define AVTDDF_API # if __GNUC__ >= 4 && defined(AVTDDF_EXPORTS)
# define AVTDDF_API __attribute__ ((visibility("default")))
# else
# define AVTDDF_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -60,7 +60,11 @@ ...@@ -60,7 +60,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define DATABASE_API # if __GNUC__ >= 4 && defined(DATABASE_EXPORTS)
# define DATABASE_API __attribute__ ((visibility("default")))
# else
# define DATABASE_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -56,7 +56,12 @@ ...@@ -56,7 +56,12 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define EXPRESSION_API // We dynamic_cast a lot of symbols in this library.
# if __GNUC__ >= 4
# define EXPRESSION_API __attribute__ ((visibility("default")))
# else
# define EXPRESSION_API /* no visibility support */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define AVTFILEWRITER_API # if __GNUC__ >= 4 && defined(AVTFILEWRITER_EXPORTS)
# define AVTFILEWRITER_API __attribute__ ((visibility("default")))
# else
# define AVTFILEWRITER_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define AVTFILTERS_API # if __GNUC__ >= 4 && defined(AVTFILTERS_EXPORTS)
# define AVTFILTERS_API __attribute__ ((visibility("default")))
# else
# define AVTFILTERS_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define IVP_API # if __GNUC__ >= 4 && defined(IVP_EXPORTS)
# define IVP_API __attribute__ ((visibility("default")))
# else
# define IVP_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -60,7 +60,11 @@ ...@@ -60,7 +60,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define MIR_API # if __GNUC__ >= 4 && defined(MIR_EXPORTS)
# define MIR_API __attribute__ ((visibility("default")))
# else
# define MIR_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define MATH_API # if __GNUC__ >= 4 && defined(MATH_EXPORTS)
# define MATH_API __attribute__ ((visibility("default")))
# else
# define MATH_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -68,7 +68,11 @@ ...@@ -68,7 +68,11 @@
#endif #endif
#else #else
#define PIPELINE_API # if __GNUC__ >= 4 && defined(PIPELINE_EXPORTS)
# define PIPELINE_API __attribute__ ((visibility("default")))
# else
# define PIPELINE_API /* hidden by default */
# endif
#ifndef VISIT_LONG_LONG #ifndef VISIT_LONG_LONG
#define VISIT_LONG_LONG long long #define VISIT_LONG_LONG long long
#endif #endif
......
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define PLOTTER_API # if __GNUC__ >= 4 && defined(PLOTTER_EXPORTS)
# define PLOTTER_API __attribute__ ((visibility("default")))
# else
# define PLOTTER_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -46,7 +46,11 @@ ...@@ -46,7 +46,11 @@
#define PREP_API __declspec(dllimport) #define PREP_API __declspec(dllimport)
#endif #endif
#else #else
#define PREP_API # if __GNUC__ >= 4 && defined(PREP_EXPORTS)
# define PREP_API __attribute__ ((visibility("default")))
# else
# define PREP_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define QTVISWINDOW_API # if __GNUC__ >= 4 && defined(QTVISWINDOW_EXPORTS)
# define QTVISWINDOW_API __attribute__ ((visibility("default")))
# else
# define QTVISWINDOW_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define QUERY_API # if __GNUC__ >= 4 && defined(QUERY_EXPORTS)
# define QUERY_API __attribute__ ((visibility("default")))
# else
# define QUERY_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define AVTSHAPELETS_API # if __GNUC__ >= 4 && defined(AVTSHAPELETS_EXPORTS)
# define AVTSHAPELETS_API __attribute__ ((visibility("default")))
# else
# define AVTSHAPELETS_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define AVTVIEW_API # if __GNUC__ >= 4 && defined(AVTVIEW_EXPORTS)
# define AVTVIEW_API __attribute__ ((visibility("default")))
# else
# define AVTVIEW_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define VISWINDOW_API # if __GNUC__ >= 4 && defined(VISWINDOW_EXPORTS)
# define VISWINDOW_API __attribute__ ((visibility("default")))
# else
# define VISWINDOW_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,13 @@ ...@@ -54,7 +54,13 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define AVTEXCEPTION_API // Exceptions are a special case: they must always be public, for proper
// typeinfo lookups!
# if __GNUC__ >= 4
# define AVTEXCEPTION_API __attribute__ ((visibility("default")))
# else
# define AVTEXCEPTION_API /* no visibility support */
# endif
#endif #endif
#endif #endif
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
# endif # endif
#else #else
# define DESCRIPTOR int # define DESCRIPTOR int
# define COMM_API # if __GNUC__ >= 4 && defined(COMM_EXPORTS)
# define COMM_API __attribute__ ((visibility("default")))
# else
# define COMM_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define EXPR_API # if __GNUC__ >= 4 && defined(EXPR_EXPORTS)
# define EXPR_API __attribute__ ((visibility("default")))
# else
# define EXPR_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define MISC_API # if __GNUC__ >= 4 && defined(MISC_EXPORTS)
# define MISC_API __attribute__ ((visibility("default")))
# else
# define MISC_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define PARSER_API # if __GNUC__ >= 4 && defined(PARSER_EXPORTS)
# define PARSER_API __attribute__ ((visibility("default")))
# else
# define PARSER_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -40,28 +40,35 @@ ...@@ -40,28 +40,35 @@
#define DATABASE_PLUGIN_EXPORTS_H #define DATABASE_PLUGIN_EXPORTS_H
#if defined(_WIN32) #if defined(_WIN32)
# define DBP_EXPORT __declspec(dllexport)
#else
# if __GNUC__ >= 4
# define DBP_EXPORT __attribute__((visibility("default")))
# else
# define DBP_EXPORT /* nothing */
# endif
#endif
# if defined(_MSC_VER) #if defined(_WIN32) && defined(_MSC_VER)
// Disable inheritance by dominance warning message. // Disable inheritance by dominance warning message.
# pragma warning(disable:4250) # pragma warning(disable:4250)
// Disable DLL interface warning. // Disable DLL interface warning.
# pragma warning(disable:4251) # pragma warning(disable:4251)
# endif #endif
// //
// This file makes sure that the entry point to each plugin is exported // This file makes sure that the entry point to each plugin is exported
// in the DLL. It must be exported to be visible to GetProcAddress. // in the DLL. It must be exported to be visible to GetProcAddress.
// //
extern "C" __declspec(dllexport) const char *VisItPluginVersion; extern "C" DBP_EXPORT const char *VisItPluginVersion;
# ifdef GENERAL_PLUGIN_EXPORTS #ifdef GENERAL_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) GeneralDatabasePluginInfo* GetGeneralInfo(); extern "C" DBP_EXPORT GeneralDatabasePluginInfo* GetGeneralInfo();
# endif #endif
# ifdef MDSERVER_PLUGIN_EXPORTS #ifdef MDSERVER_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) MDServerDatabasePluginInfo* GetMDServerInfo(); extern "C" DBP_EXPORT MDServerDatabasePluginInfo* GetMDServerInfo();
# endif #endif
# ifdef ENGINE_PLUGIN_EXPORTS #ifdef ENGINE_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) EngineDatabasePluginInfo* GetEngineInfo(); extern "C" DBP_EXPORT EngineDatabasePluginInfo* GetEngineInfo();
# endif
#endif #endif
#endif #endif
...@@ -40,26 +40,34 @@ ...@@ -40,26 +40,34 @@
#define Operator_PLUGIN_EXPORTS_H #define Operator_PLUGIN_EXPORTS_H
#if defined(_WIN32) #if defined(_WIN32)
# define OP_EXPORT __declspec(dllexport)
#else
# if __GNUC__ >= 4
# define OP_EXPORT __attribute__((visibility("default")))
# else
# define OP_EXPORT /* nothing */
# endif
#endif
// //
// This file makes sure that the entry point to each plugin is exported // This file makes sure that the entry point to each plugin is exported
// in the DLL. It must be exported to be visible to GetProcAddress. // in the DLL. It must be exported to be visible to GetProcAddress.
// //
extern "C" __declspec(dllexport) const char *VisItPluginVersion; extern "C" OP_EXPORT const char *VisItPluginVersion;
# ifdef GENERAL_PLUGIN_EXPORTS #ifdef GENERAL_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) GeneralOperatorPluginInfo* GetGeneralInfo(); extern "C" OP_EXPORT GeneralOperatorPluginInfo* GetGeneralInfo();
# endif #endif
# ifdef GUI_PLUGIN_EXPORTS #ifdef GUI_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) GUIOperatorPluginInfo* GetGUIInfo(); extern "C" OP_EXPORT GUIOperatorPluginInfo* GetGUIInfo();
# endif #endif
# ifdef VIEWER_PLUGIN_EXPORTS #ifdef VIEWER_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) ViewerOperatorPluginInfo* GetViewerInfo(); extern "C" OP_EXPORT ViewerOperatorPluginInfo* GetViewerInfo();
# endif #endif
# ifdef ENGINE_PLUGIN_EXPORTS #ifdef ENGINE_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) EngineOperatorPluginInfo* GetEngineInfo(); extern "C" OP_EXPORT EngineOperatorPluginInfo* GetEngineInfo();
# endif #endif
# ifdef SCRIPTING_PLUGIN_EXPORTS #ifdef SCRIPTING_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) ScriptingOperatorPluginInfo* GetScriptingInfo(); extern "C" OP_EXPORT ScriptingOperatorPluginInfo* GetScriptingInfo();
# endif
#endif #endif
#endif #endif
...@@ -40,26 +40,34 @@ ...@@ -40,26 +40,34 @@
#define PLOT_PLUGIN_EXPORTS_H #define PLOT_PLUGIN_EXPORTS_H
#if defined(_WIN32) #if defined(_WIN32)
# define PLOT_EXPORT __declspec(dllexport)
#else
# if __GNUC__ >= 4
# define PLOT_EXPORT __attribute__((visibility("default")))
# else
# define PLOT_EXPORT /* nothing */
# endif
#endif
// //
// This file makes sure that the entry point to each plugin is exported // This file makes sure that the entry point to each plugin is exported
// in the DLL. It must be exported to be visible to GetProcAddress. // in the DLL. It must be exported to be visible to GetProcAddress.
// //
extern "C" __declspec(dllexport) const char *VisItPluginVersion; extern "C" PLOT_EXPORT const char *VisItPluginVersion;
# ifdef GENERAL_PLUGIN_EXPORTS #ifdef GENERAL_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) GeneralPlotPluginInfo* GetGeneralInfo(); extern "C" PLOT_EXPORT GeneralPlotPluginInfo* GetGeneralInfo();
# endif #endif
# ifdef GUI_PLUGIN_EXPORTS #ifdef GUI_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) GUIPlotPluginInfo* GetGUIInfo(); extern "C" PLOT_EXPORT GUIPlotPluginInfo* GetGUIInfo();
# endif #endif
# ifdef VIEWER_PLUGIN_EXPORTS #ifdef VIEWER_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) ViewerPlotPluginInfo* GetViewerInfo(); extern "C" PLOT_EXPORT ViewerPlotPluginInfo* GetViewerInfo();
# endif #endif
# ifdef ENGINE_PLUGIN_EXPORTS #ifdef ENGINE_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) EnginePlotPluginInfo* GetEngineInfo(); extern "C" PLOT_EXPORT EnginePlotPluginInfo* GetEngineInfo();
# endif #endif
# ifdef SCRIPTING_PLUGIN_EXPORTS #ifdef SCRIPTING_PLUGIN_EXPORTS
extern "C" __declspec(dllexport) ScriptingPlotPluginInfo* GetScriptingInfo(); extern "C" PLOT_EXPORT ScriptingPlotPluginInfo* GetScriptingInfo();
# endif
#endif #endif
#endif #endif
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define PLUGIN_API # if __GNUC__ >= 4 && defined(PLUGIN_EXPORTS)
# define PLUGIN_API __attribute__ ((visibility("default")))
# else
# define PLUGIN_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define PROXYBASE_API # if __GNUC__ >= 4 && defined(PROXYBASE_EXPORTS)
# define PROXYBASE_API __attribute__ ((visibility("default")))
# else
# define PROXYBASE_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define STATE_API # if __GNUC__ >= 4 && defined(STATE_EXPORTS)
# define STATE_API __attribute__ ((visibility("default")))
# else
# define STATE_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
# pragma warning(disable:4786) # pragma warning(disable:4786)
# endif # endif
#else #else
# define UTILITY_API # if __GNUC__ >= 4 && defined(UTILITY_EXPORTS)
# define UTILITY_API __attribute__ ((visibility("default")))
# else
# define UTILITY_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -46,7 +46,11 @@ ...@@ -46,7 +46,11 @@
#define ENGINE_PARSTATE_API __declspec(dllimport) #define ENGINE_PARSTATE_API __declspec(dllimport)
#endif #endif
#else #else
#define ENGINE_PARSTATE_API # if __GNUC__ >= 4 && defined(ENGINE_PARSTATE_EXPORTS)
# define ENGINE_PARSTATE_API __attribute__ ((visibility("default")))
# else
# define ENGINE_PARSTATE_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define ENGINE_PROXY_API # if __GNUC__ >= 4 && defined(ENGINE_PROXY_EXPORTS)
# define ENGINE_PROXY_API __attribute__ ((visibility("default")))
# else
# define ENGINE_PROXY_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define ENGINE_RPC_API # if __GNUC__ >= 4 && defined(ENGINE_RPC_EXPORTS)
# define ENGINE_RPC_API __attribute__ ((visibility("default")))
# else
# define ENGINE_RPC_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define GUI_API # if __GNUC__ >= 4 && defined(GUI_EXPORTS)
# define GUI_API __attribute__ ((visibility("default")))
# else
# define GUI_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define LAUNCHER_PROXY_API # if __GNUC__ >= 4 && defined(LAUNCHER_PROXY_EXPORTS)
# define LAUNCHER_PROXY_API __attribute__ ((visibility("default")))
# else
# define LAUNCHER_PROXY_API /* hidden by default */
# endif
#endif #endif
#endif #endif
...@@ -54,7 +54,11 @@ ...@@ -54,7 +54,11 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif #endif
#else #else
#define LAUNCHER_RPC_API # if __GNUC__ >= 4 && defined(LAUNCHER_RPC_EXPORTS)
# define LAUNCHER_RPC_API __attribute__ ((visibility("default")))
# else
# define LAUNCHER_RPC_API /* hidden by default */
# endif
#endif #endif