diff options
author | Bernard Normier <bernard@zeroc.com> | 2019-07-25 08:47:11 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2019-07-25 08:47:11 -0500 |
commit | 2b78296a9aa5dc507777a674479faf3cf35f8742 (patch) | |
tree | d2e75ee01791a1cf1a11ddd99fa68b2b0945e45c /cpp/include | |
parent | White space cleanup (diff) | |
download | ice-2b78296a9aa5dc507777a674479faf3cf35f8742.tar.bz2 ice-2b78296a9aa5dc507777a674479faf3cf35f8742.tar.xz ice-2b78296a9aa5dc507777a674479faf3cf35f8742.zip |
Add support for hidden visibility on AIX/xlC.
Link libIceXML with libexpat-static on AIX/xlC.
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/Ice/FactoryTableInit.h | 2 | ||||
-rw-r--r-- | cpp/include/Ice/OutgoingAsync.h | 2 | ||||
-rw-r--r-- | cpp/include/IceUtil/Config.h | 10 | ||||
-rw-r--r-- | cpp/include/IceUtil/ConsoleUtil.h | 8 | ||||
-rw-r--r-- | cpp/include/IceUtil/OutputUtil.h | 22 |
5 files changed, 26 insertions, 18 deletions
diff --git a/cpp/include/Ice/FactoryTableInit.h b/cpp/include/Ice/FactoryTableInit.h index 5c50d71b66f..9aca1831eb8 100644 --- a/cpp/include/Ice/FactoryTableInit.h +++ b/cpp/include/Ice/FactoryTableInit.h @@ -21,7 +21,7 @@ public: static FactoryTableInit factoryTableInitializer; // Dummy variable to force initialization of factoryTable -extern ICE_API FactoryTable* factoryTable; +extern ICE_API FactoryTable* factoryTable ICE_GLOBAL_VAR_SUFFIX; class ICE_API CompactIdInit { diff --git a/cpp/include/Ice/OutgoingAsync.h b/cpp/include/Ice/OutgoingAsync.h index b9bf898a3c9..d426b372eea 100644 --- a/cpp/include/Ice/OutgoingAsync.h +++ b/cpp/include/Ice/OutgoingAsync.h @@ -664,7 +664,7 @@ public: // // See comments in OutgoingAsync.cpp // -extern ICE_API CallbackBasePtr dummyCallback; +extern ICE_API CallbackBasePtr dummyCallback ICE_GLOBAL_VAR_SUFFIX; // // Generic callback template that requires the caller to down-cast the diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index f4eab4cb4fb..b33029c0159 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -173,7 +173,7 @@ // With Visual Studio, we can import/export member functions without importing/ // exporting the whole class # define ICE_MEMBER_IMPORT_EXPORT -#elif (defined(__GNUC__) || defined(__clang__)) && !defined(__ibmxl__) +#elif (defined(__GNUC__) || defined(__clang__) || defined(__IBMCPP__)) && !defined(__ibmxl__) # define ICE_DECLSPEC_EXPORT __attribute__((visibility ("default"))) # define ICE_DECLSPEC_IMPORT __attribute__((visibility ("default"))) #elif defined(__SUNPRO_CC) @@ -192,6 +192,14 @@ # define ICE_MEMBER(API) /**/ #endif +// With IBM xlC, the visibility attribute must be at the end of the +// declaration of global variables. +#if defined(__IBMCPP__) && !defined(ICE_STATIC_LIBS) +# define ICE_GLOBAL_VAR_SUFFIX __attribute__((visibility ("default"))) +#else +# define ICE_GLOBAL_VAR_SUFFIX /**/ +#endif + // // Let's use these extensions with Ice: // diff --git a/cpp/include/IceUtil/ConsoleUtil.h b/cpp/include/IceUtil/ConsoleUtil.h index 0083c7a9075..6956ef2dbea 100644 --- a/cpp/include/IceUtil/ConsoleUtil.h +++ b/cpp/include/IceUtil/ConsoleUtil.h @@ -77,13 +77,13 @@ operator<<(ConsoleErr& err, const T& val) ICE_API ConsoleErr& endl(ConsoleErr&); ICE_API ConsoleErr& flush(ConsoleErr&); -extern ICE_API ConsoleOut consoleOut; -extern ICE_API ConsoleErr consoleErr; +extern ICE_API ConsoleOut consoleOut ICE_GLOBAL_VAR_SUFFIX; +extern ICE_API ConsoleErr consoleErr ICE_GLOBAL_VAR_SUFFIX; #else -extern ICE_API std::ostream& consoleOut; -extern ICE_API std::ostream& consoleErr; +extern ICE_API std::ostream& consoleOut ICE_GLOBAL_VAR_SUFFIX; +extern ICE_API std::ostream& consoleErr ICE_GLOBAL_VAR_SUFFIX; #endif diff --git a/cpp/include/IceUtil/OutputUtil.h b/cpp/include/IceUtil/OutputUtil.h index c9786071b8c..00f714662f3 100644 --- a/cpp/include/IceUtil/OutputUtil.h +++ b/cpp/include/IceUtil/OutputUtil.h @@ -72,12 +72,12 @@ protected: class ICE_API NextLine { }; -extern ICE_API NextLine nl; +extern ICE_API NextLine nl ICE_GLOBAL_VAR_SUFFIX; class ICE_API Separator { }; -extern ICE_API Separator sp; +extern ICE_API Separator sp ICE_GLOBAL_VAR_SUFFIX; // ---------------------------------------------------------------------- // Output @@ -149,7 +149,7 @@ operator<<(Output& o, const Separator&) class ICE_API StartBlock { }; -extern ICE_API StartBlock sb; +extern ICE_API StartBlock sb ICE_GLOBAL_VAR_SUFFIX; template<> inline Output& @@ -162,7 +162,7 @@ operator<<(Output& o, const StartBlock&) class ICE_API EndBlock { }; -extern ICE_API EndBlock eb; +extern ICE_API EndBlock eb ICE_GLOBAL_VAR_SUFFIX; template<> inline Output& @@ -175,7 +175,7 @@ operator<<(Output& o, const EndBlock&) class ICE_API StartPar { }; -extern ICE_API StartPar spar; +extern ICE_API StartPar spar ICE_GLOBAL_VAR_SUFFIX; template<> inline Output& @@ -188,7 +188,7 @@ operator<<(Output& o, const StartPar&) class ICE_API EndPar { }; -extern ICE_API EndPar epar; +extern ICE_API EndPar epar ICE_GLOBAL_VAR_SUFFIX; template<> inline Output& @@ -201,7 +201,7 @@ operator<<(Output& o, const EndPar&) class ICE_API StartAbrk { }; -extern ICE_API StartAbrk sabrk; +extern ICE_API StartAbrk sabrk ICE_GLOBAL_VAR_SUFFIX; template<> inline Output& @@ -214,7 +214,7 @@ operator<<(Output& o, const StartAbrk&) class ICE_API EndAbrk { }; -extern ICE_API EndAbrk eabrk; +extern ICE_API EndAbrk eabrk ICE_GLOBAL_VAR_SUFFIX; template<> inline Output& @@ -292,7 +292,7 @@ operator<<(XMLOutput& o, const Separator&) class ICE_API EndElement { }; -extern ICE_API EndElement ee; +extern ICE_API EndElement ee ICE_GLOBAL_VAR_SUFFIX; template<> inline XMLOutput& @@ -353,12 +353,12 @@ operator<<(XMLOutput& o, const Attribute& e) class ICE_API StartEscapes { }; -extern ICE_API StartEscapes startEscapes; +extern ICE_API StartEscapes startEscapes ICE_GLOBAL_VAR_SUFFIX; class ICE_API EndEscapes { }; -extern ICE_API EndEscapes endEscapes; +extern ICE_API EndEscapes endEscapes ICE_GLOBAL_VAR_SUFFIX; template<> inline XMLOutput& |