[libdvdnav-devel] [PATCH] add __DEPRECATED__ modifier which can be used to deprecate API calls where compiler supports it

Andrew Clayton andrew at digital-domain.net
Fri Jan 16 01:29:48 CET 2015


On Fri, 16 Jan 2015 12:49:16 +1300, Lawrence D'Oliveiro wrote:

> +AC_COMPILE_IFELSE(
> +    [AC_LANG_PROGRAM([__attribute__((deprecated)) extern void
> f(void);], [])],
> +    [echo C compiler supports "__attribute__((deprecated))";
> AC_DEFINE([HAVE_ATTRIBUTE_DEPRECATED], [1], [define to 1 if C
> compiler allows nested routines])],
> +    [echo WARNING: C compiler does not support
> "__attribute__((deprecated))"] +)
> +

Would it perhaps be better to keep the configure output consistent? e.g

Checking if gcc supports __attribute__((deprecated))... yes

Cheers,
Andrew


More information about the libdvdnav-devel mailing list