[vlc-devel] [PATCH] libvlc: ssize_t is not standard C, provide definition for windows compiler.

pierre pierre at videolabs.io
Tue Oct 10 10:30:42 CEST 2017


On Monday, October 9, 2017 12:04:17 PM CEST Rémi Denis-Courmont wrote:
> Le 9 octobre 2017 11:28:30 GMT+03:00, pierre <pierre at videolabs.io> a écrit :
> >> If POSIX ssize_t bothers you, use ISO C intptr_t or ptrdiff_t as
> >> appropriate.
> >
> >intptr_t or ptrdiff_t kind of change the semantics. perhaps we could
> >have
> >something like:
> >
> >#if defined(_MSC_VER)
> >typedef ptrdiff_t libvlc_ssize_t;
> >#else
> >typedef ssize_t libvlc_ssize_t;
> >#endif
> 
> Hell no.

So..."no" because we shouldn't have custom definitions (libvlc_xxx_t) for 
integral types in public API or because ptrdiff_t is a bad definition for 
libvlc_ssize_t (then we might use SSIZE_T from basetsd.h for MS compiler) ?

-- 
Pierre Lamot


More information about the vlc-devel mailing list