[PATCH:xpr 1/3] Replace gcc noreturn & printf attributes with macros from <X11/Xfuncproto.h>

Alan Coopersmith alan.coopersmith at oracle.com
Sat Jan 29 11:59:09 PST 2011


Adds dependency on x11proto 7.0.17 to get the definition of _X_NORETURN

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac |    2 +-
 x2jet.c      |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5205339..d133052 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,7 @@ XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XPR, xmuu x11)
+PKG_CHECK_MODULES(XPR, [xmuu x11 xproto >= 7.0.17])
 
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/x2jet.c b/x2jet.c
index 63e3430..b5eabcc 100644
--- a/x2jet.c
+++ b/x2jet.c
@@ -72,6 +72,7 @@ from the X Consortium.
 #include <stdarg.h>
 #include <X11/Xlib.h>
 #include <X11/XWDFile.h>
+#include <X11/Xfuncproto.h>
 
 #include "xpr.h"
 
@@ -260,10 +261,7 @@ static void write_image (
   enum orientation orient,
   enum device device);
 static void fatal_err (const char *s, ...)
-#if defined(__GNUC__) && (__GNUC__ > 2)
-__attribute__((noreturn, format(printf, 1, 2)))
-#endif
-    ;
+  _X_NORETURN _X_ATTRIBUTE_PRINTF(1,2);
 
 
 /* Computes the centipoint width of one printer dot. */
-- 
1.7.3.2



More information about the xorg-devel mailing list