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

Rémi Denis-Courmont remi at remlab.net
Fri Oct 6 22:46:37 CEST 2017


Le perjantaina 6. lokakuuta 2017, 14.29.53 EEST Pierre Lamot a écrit :
> ---
>  include/vlc/libvlc_media.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
> index 383f366b69..e44bf1a180 100644
> --- a/include/vlc/libvlc_media.h
> +++ b/include/vlc/libvlc_media.h
> @@ -26,6 +26,11 @@
>  #ifndef VLC_LIBVLC_MEDIA_H
>  #define VLC_LIBVLC_MEDIA_H 1
> 
> +# if defined(_MSC_VER)
> +#  include <basetsd.h>
> +typedef SSIZE_T ssize_t;
> +# endif
> +
>  # ifdef __cplusplus
>  extern "C" {
>  # endif

This looks like a namespace violation to me, in multiple ways.

If POSIX ssize_t bothers you, use ISO C intptr_t or ptrdiff_t as appropriate.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list