On Tue, Feb 10, 2004 at 02:34:54PM -0800, Torrey Lyons wrote:
> At 3:46 PM -0800 2/9/04, Alan Hourihane wrote:
> >CVSROOT:     /home/x-cvs
> >Module name: xc
> >Changes by:  [EMAIL PROTECTED]       04/02/09 15:46:31
> >
> >Log message:
> >   797. Fix GL_VERSION string for indirect rendering (Bugzilla 
> >#1147, DRI Project)
> >
> >Modified files:
> >      xc/programs/Xserver/hw/xfree86/:
> >        CHANGELOG
> >      xc/lib/GL/glx/:
> >        glxclient.h glxcmds.c single2.c
> >      xc/programs/Xserver/GL/glx/:
> >        glxext.h glxscreens.c single2.c single2swap.c
> 
> This fix breaks the build when the module loader is not used because 
> it introduced dependence on xf86atof() in single2.c:
> 
> --- single2.c   6 Jun 2001 19:00:15 -0000       1.6
> +++ single2.c   9 Feb 2004 23:46:31 -0000       1.7
> @@ -331,18 +340,43 @@
>         }
>         string = buf;
>      }
> +    else if ( name == GL_VERSION ) {
> +       if ( xf86atof( string ) > xf86atof( GLServerVersion ) ) {
> +           buf = __glXMalloc( __glXStrlen( string )
> ...
> 
> Should this be #ifdef'ed for IN_MODULE, or is there a more elegant 
> way to handle this.

Yes, I think that's the way to do it, as most of mesa does this too.

Here's the patch I committed.

Alan.

Index: single2.c
===================================================================
RCS file: /home/x-cvs/xc/programs/Xserver/GL/glx/single2.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- single2.c   9 Feb 2004 23:46:31 -0000       1.7
+++ single2.c   10 Feb 2004 22:54:15 -0000      1.8
@@ -341,7 +341,11 @@
        string = buf;
     }
     else if ( name == GL_VERSION ) {
+#if defined(XFree86LOADER) && defined(IN_MODULE)
        if ( xf86atof( string ) > xf86atof( GLServerVersion ) ) {
+#else
+       if ( atof( string ) > atof( GLServerVersion ) ) {
+#endif
            buf = __glXMalloc( __glXStrlen( string ) 
                               + __glXStrlen( GLServerVersion )
                               + 3 );
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to