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

Rémi Denis-Courmont remi at remlab.net
Sat Jul 13 09:33:04 CEST 2019


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(...); }

#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/





More information about the vlc-devel mailing list