On 4 January 2015 at 22:02, Chad Versace <[email protected]> wrote:
> This macro annotates symbols as deprecated in Waffle 1.6. The compiler
> emits deprecation warnings only if the user enables the feature macro
> for the Waffle 1.6 API.
>
> Signed-off-by: Chad Versace <[email protected]>
> ---
>  include/waffle/waffle.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
> index e04b23f..afec630 100644
> --- a/include/waffle/waffle.h
> +++ b/include/waffle/waffle.h
> @@ -36,6 +36,18 @@
>  extern "C" {
>  #endif
>
> +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
> +#    define WAFFLE_DEPRECATED __attribute__((deprecated))
For MSVC one can use the following. Although I'm thinking that the
compiler will complain as the function declaration will differ from
the definition.

#elif defined(_MSC_VER)
#    define WAFFLE_DEPRECATED __declspec(deprecated)


Adding MSVC compat can be left as a follow up if you prefer.

Thanks
Emil
_______________________________________________
waffle mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to