Sun compilers now support some gcc __attribute__ values
[mesa.git] / src / mesa / main / compiler.h
index 4eb249b4af13df8b1a12b748e1bb17034844702c..9eab1ead2468d69b836a4a42058ec2fb8e252cd3 100644 (file)
@@ -173,7 +173,8 @@ extern "C" {
  * We also need to define a USED attribute, so the optimizer doesn't 
  * inline a static function that we later use in an alias. - ajax
  */
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
+       || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
 #  define PUBLIC __attribute__((visibility("default")))
 #  define USED __attribute__((used))
 #else