include: Don't use the visibility attribute on Solaris.

Francois Gouget fgouget at free.fr
Sat Mar 5 03:49:04 CST 2016


It is not supported and mostly ignored but can still break linking with static libraries.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---
 include/winnt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/winnt.h b/include/winnt.h
index 2309ae3..9386249 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -148,7 +148,7 @@ extern "C" {
 # define DECLSPEC_EXPORT __declspec(dllexport)
 #elif defined(__MINGW32__)
 # define DECLSPEC_EXPORT __attribute__((dllexport))
-#elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+#elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) && !defined(__sun)
 # define DECLSPEC_EXPORT __attribute__((visibility ("default")))
 #else
 # define DECLSPEC_EXPORT
@@ -156,7 +156,7 @@ extern "C" {
 
 #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)
 # define DECLSPEC_HIDDEN
-#elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+#elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) && !defined(__sun)
 # define DECLSPEC_HIDDEN __attribute__((visibility ("hidden")))
 #else
 # define DECLSPEC_HIDDEN
-- 
2.7.0



More information about the wine-patches mailing list