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

Steve Lhomme robux4 at ycbcr.xyz
Mon Jul 15 09:12:02 CEST 2019


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
> 


More information about the vlc-devel mailing list