From: Tom Fogal Date: Wed, 19 Oct 2011 20:41:35 +0000 (-0600) Subject: Only use gcc visibility support with gcc4+. X-Git-Tag: 062012170305~3690 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbb2b4149ba26ee26f73f53e9b2aa960d9e5862c;p=profile%2Fivi%2Fmesa.git 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 --- diff --git a/include/GL/gl.h b/include/GL/gl.h index 998a83a..e65e1bc 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -67,7 +67,7 @@ #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ # define GLAPI extern # 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 GLAPIENTRY #endif /* WIN32 && !CYGWIN */ diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 89d6cda9..921e302 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -150,7 +150,7 @@ extern "C" { * inline a static function that we later use in an alias. - ajax */ #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 USED __attribute__((used)) # else