[vlc-devel] [PATCH] access: dtv: fix lfind call with different prototypes in mingw32

Rémi Denis-Courmont remi at remlab.net
Mon Jul 15 11:35:46 CEST 2019


Hi,

Indeed, you need to include some headers. We already do that many times in the fix-ups for lack of a sane cleaner alternative.

Le 15 juillet 2019 10:12:02 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>On 2019-07-13 9:33, Rémi Denis-Courmont wrote:
>> Le perjantaina 12. heinäkuuta 2019, 12.43.43 EEST Steve Lhomme a
>écrit :
>>> On 2019-07-12 9:14, Rémi Denis-Courmont wrote:
>>>> Hi,
>>>>
>>>> size_t and unsigned should be the same on Win32, so I don't exactly
>see
>>>> the point.
>>>>
>>>> Of course, there *is* a problem on Win64, but either MingW should
>be fixed
>>>> or a systematic work-around should be used,m (e.g. #define lfind
>>>> lfind_size_t), otherwise the same bug will reoccur silently (only
>on
>>>> 64-bits Windows) every time lfind() is used.
>>> I can make a local fix by remapping lfind() to a local function with
>the
>>> correct signature, but if we want to make it generic it's trickier.
>It
>>> is used by plugins, so it either needs to be exported by the core
>(nope)
>>> or added in compat.
>> 
>> Ah? You can just do that in vlc_fixups.h
>> 
>> #ifdef _WIN64
>> static inline ... lfind_size_t(..){ lfind(...); }
>
>You can't do an inline calling lfind() in vlc_fixups.h unless you 
>include search.h there. I don't think it's an option.
>
>> #define lfind lfind_size_t
>> #endif
>> 
>> But given that's unlikely VLC-specific problem, it's better to fix
>the Win64
>> port in MingW, IMO.
>> 
>> -- 
>> レミ・デニ-クールモン
>> 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

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190715/150ee6ef/attachment.html>


More information about the vlc-devel mailing list