Mesa (master): mapi/glapi: Avoid warnings about visibility being unsupported on MinGW.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Sat Apr 23 04:43:26 PDT 2011


Module: Mesa
Branch: master
Commit: c89cca648d4ef19dceb0bf8105c2fb4a9761497c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c89cca648d4ef19dceb0bf8105c2fb4a9761497c

Author: José Fonseca <jose.r.fonseca at gmail.com>
Date:   Sat Apr 23 12:14:39 2011 +0100

mapi/glapi: Avoid warnings about visibility being unsupported on MinGW.

---

 src/mapi/glapi/gen/gl_XML.py |    2 +-
 src/mapi/glapi/glapitemp.h   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
index 660c8cf..4d414e8 100644
--- a/src/mapi/glapi/gen/gl_XML.py
+++ b/src/mapi/glapi/gen/gl_XML.py
@@ -224,7 +224,7 @@ class gl_print_base:
 		"""
 
 		self.undef_list.append(S)
-		print """#  if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
+		print """#  if (defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) && defined(__ELF__))
 #    define %s  __attribute__((visibility("%s")))
 #  else
 #    define %s
diff --git a/src/mapi/glapi/glapitemp.h b/src/mapi/glapi/glapitemp.h
index 4eb4861..0f49b33 100644
--- a/src/mapi/glapi/glapitemp.h
+++ b/src/mapi/glapi/glapitemp.h
@@ -27,7 +27,7 @@
  */
 
 
-#  if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
+#  if (defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) && defined(__ELF__))
 #    define HIDDEN  __attribute__((visibility("hidden")))
 #  else
 #    define HIDDEN



More information about the mesa-commit mailing list