Jeremy Huddleston wrote:
> Signed-off-by: Jeremy Huddleston <[email protected]>
> ---
>  include/os.h |   28 +++++++++++++---------------
>  os/log.c     |    4 +---
>  2 files changed, 14 insertions(+), 18 deletions(-)
> 
> diff --git a/include/os.h b/include/os.h
> index 453ab82..957fc74 100644
> --- a/include/os.h
> +++ b/include/os.h
> @@ -83,6 +83,15 @@ typedef struct _NewClientRec *NewClientPtr;
>  #include <stdio.h>
>  #include <stdarg.h>
>  
> +/* XXX Need to check which GCC versions have the format(printf) attribute. */
> +#if defined(__GNUC__) && (__GNUC__ > 2)
> +#define _printf_attribute(a,b) __attribute((format(__printf__,a,b)))
> +#define _noreturn_attribute __attribute((noreturn))

Why not just use _X_ATTRIBUTE_PRINTF from X11/Xfuncproto.h ?
Unfortunately there's no noreturn there, but we could add it.

(Obviously I'm biased towards having one place to update as the
 Sun compilers are growing __attribute compatibility for various
 of the attributes in new releases.)

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to