[MPlayer-dev-eng] [PATCH] libvo/gl_common.c: Use RTLD_DEFAULT instead of 0 for dlsym to increase portability

Jeremy Huddleston jeremyhu at macports.org
Thu Apr 23 19:42:07 CEST 2009


What about:

#ifdef RTLD_DEFAULT
return dlsym(RTLD_DEFAULT, s);
#else

void *handle = dlopen(NULL, RTLD_LAZY);
void *ret = dlsym(handle, s);
dclose(handle);
return ret;
#endif

On Apr 23, 2009, at 10:35, Jeremy Huddleston wrote:

> It's not really that big of a performance bullet.  In the normal  
> case, this is just used to get the symbol for glxGetProcAddress.
>
> On Apr 23, 2009, at 03:19, Reimar Döffinger wrote:
>
>> On Thu, Apr 23, 2009 at 11:52:43AM +0200, Reimar Döffinger wrote:
>>> It might be better to just bite the performance bullet and just  
>>> always
>>> use
>>>> void *handle = dlopen(NULL, RTLD_LAZY);
>>>> void *ret = dlsym(handle, s);
>>>> dclose(handle);
>>>> return ret;
>>>
>>> _But_ I think this had issues on some other systems - they may be  
>>> gone
>>> nowadays though.
>>
>> Oh well, I just changed it this way, it works on Linux, let's see  
>> what
>> happens on other systems...
>> _______________________________________________
>> MPlayer-dev-eng mailing list
>> MPlayer-dev-eng at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng




More information about the MPlayer-dev-eng mailing list