Only use gcc visibility support with gcc4+.

I had a colleague hitting issues compiling with an old gcc3.2
system.  These patches got them through.

NOTE: This is a candidate for the 7.11 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Tom Fogal
2011-10-19 14:41:35 -06:00
parent 2717b8f034
commit cbb2b4149b
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern # define GLAPI extern
# define GLAPIENTRY __stdcall # define GLAPIENTRY __stdcall
#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) #elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define GLAPI __attribute__((visibility("default"))) # define GLAPI __attribute__((visibility("default")))
# define GLAPIENTRY # define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */ #endif /* WIN32 && !CYGWIN */

View File

@@ -150,7 +150,7 @@ extern "C" {
* inline a static function that we later use in an alias. - ajax * inline a static function that we later use in an alias. - ajax
*/ */
#ifndef PUBLIC #ifndef PUBLIC
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) # if (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default"))) # define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used)) # define USED __attribute__((used))
# else # else