[vlc-devel] [PATCH 1/4] include: add vlc_search.h for differences between POSIX search.h and other OS

Steve Lhomme robux4 at ycbcr.xyz
Tue Jul 16 08:21:51 CEST 2019


On 2019-07-15 17:40, RĂ©mi Denis-Courmont wrote:
> Hi,
> 
> Defining a new header completely misses the point IMO. The error will just
> happen again and again - and I don't see any reason why the regular fix-ups
> cannot be used.

I already explained by the regular fixups can't happen:
https://mailman.videolan.org/pipermail/vlc-devel/2019-July/126129.html

I agree that it's an ideal solution. If #include_next was in C11 we 
could override broken/invalid headers easily, but it's not (maybe in C2x ?).

IMO it's similar to vlc_qsort() that one has to use instead of the 
regular qsort(). We can't enforce it. But it's there to be used. With 
lfind() an improper use will result in a warning when compiling on Win64 
and with -Werror=incompatible-pointer-types we'll spot it quickly (I 
know I will).


More information about the vlc-devel mailing list