[vlc-devel] [PATCH] vlc_codecs.h: separare the MSVC and MS clang packing

Rémi Denis-Courmont remi at remlab.net
Mon Jul 11 17:14:18 CEST 2016


Le maanantaina 11. heinäkuuta 2016, 13.34.58 EEST Steve Lhomme a écrit :
> needed when using cl.exe when configure was ran with clang.exe

Not clear what you mean by that, but you MUST use the same compiler for 
configure and make - obviously.

> ---
>  include/vlc_codecs.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h
> index cdac8b6..ad72e4a 100644
> --- a/include/vlc_codecs.h
> +++ b/include/vlc_codecs.h
> @@ -45,11 +45,11 @@ typedef struct _GUID
> 
>  typedef GUID guid_t;
> 
> -#ifdef HAVE_ATTRIBUTE_PACKED
> -#   define ATTR_PACKED __attribute__((__packed__))
> -#elif defined(__SUNPRO_C) || defined(_MSC_VER)
> +#if defined(__SUNPRO_C) || (defined(_MSC_VER) && !defined(__clang__))
>  #   pragma pack(1)
>  #   define ATTR_PACKED
> +#elif defined(HAVE_ATTRIBUTE_PACKED)
> +#   define ATTR_PACKED __attribute__((__packed__))
>  #elif defined(__APPLE__)
>  #   pragma pack(push, 1)
>  #   define ATTR_PACKED
> @@ -210,7 +210,7 @@ ATTR_PACKED
>  } VIDEOINFO;
>  #endif
> 
> -#if defined(__SUNPRO_C) || defined(_MSC_VER)
> +#if defined(__SUNPRO_C) || (defined(_MSC_VER) && !defined(__clang__))
>  #   pragma pack()
>  #elif defined(__APPLE__) && !HAVE_ATTRIBUTE_PACKED
>  #   pragma pack(pop)


-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list