[patch] Use dlsym instead of glXGetProcAddress in xdriinfo
Felix Kühling
fxkuehl at gmx.de
Wed Nov 23 20:36:25 PST 2005
Am Dienstag, den 22.11.2005, 20:45 -0800 schrieb Eric Anholt:
> On Tue, 2005-11-22 at 17:58 -0500, Felix Kühling wrote:
[snip]
> > Right now there doesn't seem to be the one patch that makes everybody
> > happy. The dlsym version isn't portable and the glXGetProcAddressARB has
> > been reported (by you) to be broken on AMD64. At this point there is
> > really nothing I can do. I'm basically waiting for someone with AMD64 to
> > track down that issue. Until then from my POV the current solution is at
> > least as good as any of the other ones that have been proposed so far.
>
> So, good news. I went to test if I still had segfaults with
> glXGetProcAddressARB and noticed that there were warnings about nested
> extern declaration (i.e. no prototype), and warnings that pointers were
> being cast to int. After adding #define GLX_GLXEXT_LEGACY at the top,
> it works. I must have just missed those with the first time I tried it.
>
> Patch attached. Sound sane?
The patch looks good to me. I built and tested it on 32-bit in the
modular tree. Except glXGetProcAddressARB seems to be defined with an
unsigned char * parameter, which makes the compiler complain about
pointer target signedness mismatches. IIRC using glXGetProcAddressARB
was found to work correctly (without segfaulting) with the NVidia libGL
before. If that's correct and the release managers give their "OK" feel
free to commit the patch.
Regards,
Felix
--
| Felix Kühling <fxkuehl at gmx.de> http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 |
More information about the xorg
mailing list