summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Config.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/IceUtil/Config.h')
-rw-r--r--cpp/include/IceUtil/Config.h10
1 files changed, 9 insertions, 1 deletions
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:
//