[PATCH:ico] Replace local checks for gcc with _X_NORETURN from xproto 7.0.17

Alan Coopersmith alan.coopersmith at oracle.com
Wed Jun 8 00:04:34 PDT 2011


Also declare icoFatal as static since it's only used in this one file.

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

diff --git a/configure.ac b/configure.ac
index 7a23166..284214a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ XORG_DEFAULT_OPTIONS
 AC_CONFIG_HEADERS([config.h])
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(ICO, x11 >= 0.99.1)
+PKG_CHECK_MODULES(ICO, [x11 >= 0.99.1 xproto >= 7.0.17])
 
 XTHREADLIB=`$PKG_CONFIG --variable=xthreadlib x11`
 AC_SUBST(XTHREADLIB)
diff --git a/ico.c b/ico.c
index 62a2e73..797aeba 100644
--- a/ico.c
+++ b/ico.c
@@ -254,11 +254,10 @@ static xcondition_rec count_cond;/* Xthreads doesn't define an equivalent to
  *	Error handling
  *****************************************************************************/
 
-#if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
-void icoFatal (const char *fmt, const char *a0) __attribute__((__noreturn__));
-#endif
-void
+
+static void icoFatal (const char *fmt, const char *a0) _X_NORETURN;
+
+static void
 icoFatal(const char *fmt, const char *a0)
 {
 	fprintf(stderr, "%s: ", ProgramName);
-- 
1.7.3.2



More information about the xorg-devel mailing list