[PATCH] glx: Sun compilers now support some gcc __attribute__ values

Alan Coopersmith alan.coopersmith at sun.com
Tue Jan 19 19:13:37 PST 2010


Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__
calls for aligned, always_inline, noinline, pure, const, and malloc.

This commit consists of the related updates to files that were
regenerated by gl_XML.py in mesa after adding the __SUNPRO_C checks to it

Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
---
 glx/glapitemp.h         |    2 +-
 glx/indirect_dispatch.h |    2 +-
 glx/indirect_reqsize.h  |    4 ++--
 glx/indirect_size.h     |    4 ++--
 glx/indirect_size_get.c |    4 ++--
 glx/indirect_size_get.h |    4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/glx/glapitemp.h b/glx/glapitemp.h
index 09259f4..ddd67af 100644
--- a/glx/glapitemp.h
+++ b/glx/glapitemp.h
@@ -27,7 +27,7 @@
  */
 
 
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
 #    define HIDDEN  __attribute__((visibility("hidden")))
 #  else
 #    define HIDDEN
diff --git a/glx/indirect_dispatch.h b/glx/indirect_dispatch.h
index 014e417..6cc322c 100644
--- a/glx/indirect_dispatch.h
+++ b/glx/indirect_dispatch.h
@@ -28,7 +28,7 @@
 #if !defined( _INDIRECT_DISPATCH_H_ )
 #  define _INDIRECT_DISPATCH_H_
 
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
 #    define HIDDEN  __attribute__((visibility("hidden")))
 #  else
 #    define HIDDEN
diff --git a/glx/indirect_reqsize.h b/glx/indirect_reqsize.h
index 26211ee..05ad591 100644
--- a/glx/indirect_reqsize.h
+++ b/glx/indirect_reqsize.h
@@ -28,13 +28,13 @@
 #if !defined( _INDIRECT_REQSIZE_H_ )
 #  define _INDIRECT_REQSIZE_H_
 
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
 #    define HIDDEN  __attribute__((visibility("hidden")))
 #  else
 #    define HIDDEN
 #  endif
 
-#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
 #    define PURE __attribute__((pure))
 #  else
 #    define PURE
diff --git a/glx/indirect_size.h b/glx/indirect_size.h
index 9ba0bd6..af0919f 100644
--- a/glx/indirect_size.h
+++ b/glx/indirect_size.h
@@ -36,7 +36,7 @@
  * \author Ian Romanick <idr at us.ibm.com>
  */
 
-#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
 #    define PURE __attribute__((pure))
 #  else
 #    define PURE
@@ -48,7 +48,7 @@
 #    define FASTCALL
 #  endif
 
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
 #    define INTERNAL  __attribute__((visibility("internal")))
 #  else
 #    define INTERNAL
diff --git a/glx/indirect_size_get.c b/glx/indirect_size_get.c
index 80f81de..475aa58 100644
--- a/glx/indirect_size_get.c
+++ b/glx/indirect_size_get.c
@@ -32,7 +32,7 @@
 #include "indirect_util.h"
 #include "indirect_size.h"
 
-#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
 #    define PURE __attribute__((pure))
 #  else
 #    define PURE
@@ -44,7 +44,7 @@
 #    define FASTCALL
 #  endif
 
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
 #    define INTERNAL  __attribute__((visibility("internal")))
 #  else
 #    define INTERNAL
diff --git a/glx/indirect_size_get.h b/glx/indirect_size_get.h
index 4fcb55b..378baa6 100644
--- a/glx/indirect_size_get.h
+++ b/glx/indirect_size_get.h
@@ -36,7 +36,7 @@
  * \author Ian Romanick <idr at us.ibm.com>
  */
 
-#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
 #    define PURE __attribute__((pure))
 #  else
 #    define PURE
@@ -48,7 +48,7 @@
 #    define FASTCALL
 #  endif
 
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
 #    define INTERNAL  __attribute__((visibility("internal")))
 #  else
 #    define INTERNAL
-- 
1.5.6.5



More information about the xorg-devel mailing list