Hi,

When using DRI with a 3dfx card, i've found that tdfx_dri.so segfault with
the last CVS version. This segfault occur in the file 
xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c.
This patch try to correct this, i think this is a typo bug ...

--- tdfx_context.c.orig Tue Jul 30 12:52:58 2002
+++ tdfx_context.c      Tue Jul 30 12:54:55 2002
@@ -756,7 +756,7 @@
    }         
 
 #define GET_FUNCTION(PTR, NAME, CHECK)                                 \
-   *((void **)(tmesa->Glide.PTR)) = dlsym(libHandle, NAME);            \
+   *((void **)&(tmesa->Glide.PTR)) = dlsym(libHandle, NAME);           \
    if (CHECK && !tmesa->Glide.PTR) {                                   \
       __driUtilMessage("couldn't find Glide function %s in %s.",       \
               NAME, libName);                                          \


Please note, that Redhat 7.3 rpms use another method to fix warning, like this.
|-#define GET_FUNCTION(PTR, NAME)                                                \
|-   tmesa->Glide.PTR = dlsym(libHandle, NAME);                          \
|+#define GET_FUNCTION(PTR, NAME, TYPEOF)                                              
|  \
|+   tmesa->Glide.PTR = (TYPEOF) dlsym(libHandle, NAME);                         \
|    if (!tmesa->Glide.PTR) {                                            \
|       char err[1000];                                                  \
|       sprintf(err, "couldn't find Glide function %s in %s.",           \
|@@ -556,111 +556,195 @@
|       __driMesaMessage(err);                                           \
|    }
|[...]
|+   GET_FUNCTION(grDrawPoint, "grDrawPoint", void (*)(const void *));
|+   GET_FUNCTION(grDrawLine, "grDrawLine",  void (*)(const void *, const void * ));
|+   GET_FUNCTION(grDrawTriangle, "grDrawTriangle", ( const void *a, const void *b, 
|const
|void *c ));
|[...]

Luc
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to