[PATCH:xdm 2/5] Replace GCC_PRINTFLIKE with xproto's _X_ATTRIBUTE_PRINTF

Alan Coopersmith alan.coopersmith at oracle.com
Thu Jun 2 22:10:09 PDT 2011


The existing GCC_PRINTFLIKE declaration seems to have been broken, since
it only defined GCC_PRINTFLIKE if GCC_PRINTFLIKE was already defined.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 include/dm_error.h |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/include/dm_error.h b/include/dm_error.h
index 739da7b..e8a92ef 100644
--- a/include/dm_error.h
+++ b/include/dm_error.h
@@ -34,19 +34,13 @@ authorization.
 #ifndef _DM_ERROR_H_
 # define _DM_ERROR_H_ 1
 
-# if defined(GCC_PRINTFLIKE) && defined(__GNUC__)
-#  define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
-# else
-#  define GCC_PRINTFLIKE(fmt,var) /*nothing*/
-# endif
-
-extern void Debug        (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
+extern void Debug        (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
 extern void InitErrorLog (void);
-extern void LogAppend    (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
-extern void LogError     (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
-extern void LogInfo      (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
-extern void LogOutOfMem  (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
-extern void LogPanic     (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
+extern void LogAppend    (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
+extern void LogError     (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
+extern void LogInfo      (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
+extern void LogOutOfMem  (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
+extern void LogPanic     (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
 
 
 #endif /* _DM_ERROR_H_ */
-- 
1.7.3.2



More information about the xorg-devel mailing list