From f4166a1fd76935f358c2db900c21b3532ba9d6a8 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Fri, 26 Aug 2005 09:37:41 +0000 Subject: Fix the scripts for the cygwin & mingw changes --- src/glx/x11/indirect_size.c | 15 ++++++--------- src/glx/x11/indirect_size.h | 11 ++--------- src/mesa/glapi/glX_proto_size.py | 6 ++++++ src/mesa/glapi/gl_XML.py | 4 ++-- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/glx/x11/indirect_size.c b/src/glx/x11/indirect_size.c index e87229a7d0a..438d545b6bf 100644 --- a/src/glx/x11/indirect_size.c +++ b/src/glx/x11/indirect_size.c @@ -35,18 +35,22 @@ # define PURE # endif -# if defined(__i386__) && defined(__GNUC__) +# 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) +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && !defined(__CYGWIN__) && !defined(__MINGW32__) # define INTERNAL __attribute__((visibility("internal"))) # else # define INTERNAL # endif + +#if defined(__CYGWIN__) || defined(__MINGW32__) +# undef HAVE_ALIAS +#endif #ifdef HAVE_ALIAS # define ALIAS2(from,to) \ INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ @@ -58,13 +62,6 @@ { return __gl ## to ## _size( e ); } #endif -# if defined(__CYGWIN__) || defined(__MINGW32__) -# undef FASTCALL -# define FASTCALL -# undef HAVE_ALIAS -# undef INTERNAL -# define INTERNAL -# endif INTERNAL PURE FASTCALL GLint __glCallLists_size( GLenum e ) diff --git a/src/glx/x11/indirect_size.h b/src/glx/x11/indirect_size.h index 181bdfdfd0d..46122a2519c 100644 --- a/src/glx/x11/indirect_size.h +++ b/src/glx/x11/indirect_size.h @@ -42,25 +42,18 @@ # define PURE # endif -# if defined(__i386__) && defined(__GNUC__) +# 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) +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && !defined(__CYGWIN__) && !defined(__MINGW32__) # define INTERNAL __attribute__((visibility("internal"))) # else # define INTERNAL # endif -# if defined(__CYGWIN__) || defined(__MINGW32__) -# undef FASTCALL -# define FASTCALL -# undef INTERNAL -# define INTERNAL -# endif - extern INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum); extern INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum); extern INTERNAL PURE FASTCALL GLint __glFogiv_size(GLenum); diff --git a/src/mesa/glapi/glX_proto_size.py b/src/mesa/glapi/glX_proto_size.py index d4c8b553e41..63d80dd74c7 100644 --- a/src/mesa/glapi/glX_proto_size.py +++ b/src/mesa/glapi/glX_proto_size.py @@ -320,6 +320,9 @@ class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common): self.printVisibility( "INTERNAL", "internal" ) print '' print '' + print '#if defined(__CYGWIN__) || defined(__MINGW32__)' + print '# undef HAVE_ALIAS' + print '#endif' print '#ifdef HAVE_ALIAS' print '# define ALIAS2(from,to) \\' print ' INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \\' @@ -435,6 +438,9 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): print '' print '#define __GLX_PAD(x) (((x) + 3) & ~3)' print '' + print '#if defined(__CYGWIN__) || defined(__MINGW32__)' + print '# undef HAVE_ALIAS' + print '#endif' print '#ifdef HAVE_ALIAS' print '# define ALIAS2(from,to) \\' print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\' diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py index 3b87b724ab6..808a0a474e7 100644 --- a/src/mesa/glapi/gl_XML.py +++ b/src/mesa/glapi/gl_XML.py @@ -194,7 +194,7 @@ class gl_print_base: """ self.undef_list.append("FASTCALL") - print """# if defined(__i386__) && defined(__GNUC__) + print """# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) # define FASTCALL __attribute__((fastcall)) # else # define FASTCALL @@ -214,7 +214,7 @@ class gl_print_base: """ self.undef_list.append(S) - print """# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) + print """# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && !defined(__CYGWIN__) && !defined(__MINGW32__) # define %s __attribute__((visibility("%s"))) # else # define %s -- cgit v1.2.3