[PATCH:libXmu] Use _X_ATTRIBUTE_PRINTF from Xfuncproto.h in Xmu headers
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Jun 9 11:31:26 PDT 2010
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
include/X11/Xmu/SysUtil.h | 6 +-----
include/X11/Xmu/Xmu.h | 7 ++-----
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/include/X11/Xmu/SysUtil.h b/include/X11/Xmu/SysUtil.h
index 9f5b033..5adf404 100644
--- a/include/X11/Xmu/SysUtil.h
+++ b/include/X11/Xmu/SysUtil.h
@@ -48,11 +48,7 @@ int XmuSnprintf
_Xconst char *fmt,
...
)
-#if defined(__GNUC__) && \
- ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
-__attribute((format(printf,3,4)))
-#endif
-;
+_X_ATTRIBUTE_PRINTF(3,4);
#endif
_XFUNCPROTOEND
diff --git a/include/X11/Xmu/Xmu.h b/include/X11/Xmu/Xmu.h
index c503a41..27b7fb2 100644
--- a/include/X11/Xmu/Xmu.h
+++ b/include/X11/Xmu/Xmu.h
@@ -35,6 +35,7 @@ in this Software without prior written authorization from The Open Group.
#ifndef _XMU_H_
#define _XMU_H_
+#include <X11/Xfuncproto.h>
#include <X11/Intrinsic.h>
#include <X11/Xmu/Atoms.h> /* _XA_... */
#include <X11/Xmu/CharSet.h> /* CopyISOLatin1Lowered */
@@ -117,11 +118,7 @@ XmuScanline *XmuScanlineXorSegment(XmuScanline*, XmuSegment*);
#ifndef _SYSUTIL_H_
int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...)
-#if defined(__GNUC__) && \
- ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
-__attribute((format(printf,3,4)))
-#endif
-;
+ _X_ATTRIBUTE_PRINTF(3,4);
#endif
#endif /* _XMU_H_ */
--
1.5.6.5
More information about the xorg-devel
mailing list