[PATCH] Cygwin GCC does not use visibility attributes

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Tue Oct 13 17:57:12 PDT 2009


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

Cygwin's gcc4 accepts visibility attributes but does actually use them,
generating tons of warnings that they are not supported.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
 configure.ac             |    2 +-
 pixman/pixman-compiler.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index c548174..6db240f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -143,7 +143,7 @@ dnl -fvisibility stuff
 have_gcc4=no
 AC_MSG_CHECKING(for -fvisibility)
 AC_COMPILE_IFELSE([
-#if defined(__GNUC__) && (__GNUC__ >= 4)
+#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__)
 #else
 error Need GCC 4.0 for visibility
 #endif
diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h
index 9647dbb..37dcf72 100644
--- a/pixman/pixman-compiler.h
+++ b/pixman/pixman-compiler.h
@@ -60,7 +60,7 @@
 #endif
 
 /* GCC visibility */
-#if defined(__GNUC__) && __GNUC__ >= 4
+#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__CYGWIN__)
 #   define PIXMAN_EXPORT __attribute__ ((visibility("default")))
 /* Sun Studio 8 visibility */
 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
-- 
1.6.4.2



More information about the xorg-devel mailing list