diff options
-rw-r--r-- | src/glx/x11/indirect.c | 6 | ||||
-rw-r--r-- | src/glx/x11/indirect.h | 6 | ||||
-rw-r--r-- | src/glx/x11/indirect_size.c | 6 | ||||
-rw-r--r-- | src/glx/x11/indirect_size.h | 6 | ||||
-rw-r--r-- | src/mesa/glapi/gl_XML.py | 8 |
5 files changed, 25 insertions, 7 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index 35be63f36ec..2a4db6578a7 100644 --- a/src/glx/x11/indirect.c +++ b/src/glx/x11/indirect.c @@ -39,7 +39,11 @@ #define __GLX_PAD(n) (((n) + 3) & ~3) -#define FASTCALL +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif # if defined(__GNUC__) # define NOINLINE __attribute__((noinline)) # else diff --git a/src/glx/x11/indirect.h b/src/glx/x11/indirect.h index fd5cbf1edb1..1c45fa28a4c 100644 --- a/src/glx/x11/indirect.h +++ b/src/glx/x11/indirect.h @@ -42,7 +42,11 @@ # else # define HIDDEN # endif -#define FASTCALL +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif # if defined(__GNUC__) # define NOINLINE __attribute__((noinline)) # else diff --git a/src/glx/x11/indirect_size.c b/src/glx/x11/indirect_size.c index aa5ed752a59..79d57d55b68 100644 --- a/src/glx/x11/indirect_size.c +++ b/src/glx/x11/indirect_size.c @@ -35,7 +35,11 @@ # define PURE # endif -#define FASTCALL +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif # if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) # define INTERNAL __attribute__((visibility("internal"))) diff --git a/src/glx/x11/indirect_size.h b/src/glx/x11/indirect_size.h index c3f353dbf4c..9ba0bd69075 100644 --- a/src/glx/x11/indirect_size.h +++ b/src/glx/x11/indirect_size.h @@ -42,7 +42,11 @@ # define PURE # endif -#define FASTCALL +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif # if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) # define INTERNAL __attribute__((visibility("internal"))) diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py index 0cea2687771..11b23b7a867 100644 --- a/src/mesa/glapi/gl_XML.py +++ b/src/mesa/glapi/gl_XML.py @@ -194,9 +194,11 @@ class gl_print_base: """ self.undef_list.append("FASTCALL") - # I've removed the previous code for __attribute__((fastcall)) - # because it breaks server-side GLX. (BrianP) - print "#define FASTCALL" + print """# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif""" return |