[PATCH x11proto] Add _X_DEPRECATED_MSG macro

Jeremy Huddleston jeremyhu at apple.com
Mon Sep 13 16:37:52 PDT 2010


Why not just leave that as a comment in the header where it is _X_DEPRECATED?  gcc already reports the line number of the deprecation, and that's where I look for more detailed explanations behind the deprecation.

On Sep 13, 2010, at 13:10, Mikhail Gusarov wrote:

> This macro is to be used to point out how to replace deprecated functionality.
> ---
> Xfuncproto.h.in |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
> index 0177119..96e2b34 100644
> --- a/Xfuncproto.h.in
> +++ b/Xfuncproto.h.in
> @@ -113,8 +113,10 @@ in this Software without prior written authorization from The Open Group.
> 
> #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
> # define _X_DEPRECATED  __attribute__((deprecated))
> +# define _X_DEPRECATED_MSG(msg) __attribute__((deprecated, warning(msg)))
> #else /* not gcc >= 3.1 */
> # define _X_DEPRECATED
> +# define _X_DEPRECATED_MSG(msg)
> #endif
> 
> #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
> -- 
> 1.7.1
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list