[vlc-devel] [PATCH] compat: work-around busted FreeBSD qsort_r()

David Fuhrmann david.fuhrmann at gmail.com
Sat Jan 19 13:29:03 CET 2019


Hello,

What do you think about attached proposal? It would require config.h to be included as the very first statement (or before stdlib at least), but this should be always the case anyhow (as far as I understand config.h usage).

One problem is that some code generators (like bison with CSSLexer.l) do not obey that and auto-include stdlib even before. Thats why the patch still contains "#ifndef _STDLIB_H_“.

Best,
David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-compat-work-around-busted-FreeBSD-qsort_r.patch
Type: application/octet-stream
Size: 2276 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190119/db0d24bc/attachment.obj>
-------------- next part --------------

> Am 14.01.2019 um 13:37 schrieb Thomas Guillem <thomas at gllm.fr>:
> 
> An other way to fix this issue is to add a vlc_qsort function (but not in compat).
> The posix version will use qsort_r() and the apple one will use the inverted qsort_r.
> 
> Con: rename every usage or qsort_r() to vlc_qsort().
> 
> On Mon, Jan 7, 2019, at 21:52, Rémi Denis-Courmont wrote:
>> vlc function in compat makes no sense to me.
>> 
>> Besides, this is only perpetuating the problem that qsort_r() will not work as 
>> expected, and it is reasonable to expect that it works like both POSIX.next 
>> and Linux man pages say.
>> 
>> -- 
>> Rémi Denis-Courmont
>> http://www.remlab.net/
>> 
>> 
>> 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list