summaryrefslogtreecommitdiff
path: root/include/misc.h
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 01:59:06 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 04:54:34 +0700
commit868e372a73b377705217e0379bc6e00f36c4d8e5 (patch)
treeb1d00d5abc7401baac8b41fb4893bd75dbedd2f7 /include/misc.h
parent5a8e2f2745ae1f74501cd3f42614a1ed2cf974f2 (diff)
Introduce X_NORETURN macro defined as __attribute__((noreturn)) for gcc
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'include/misc.h')
-rw-r--r--include/misc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/misc.h b/include/misc.h
index c7add253e..e4bdee480 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -106,6 +106,12 @@ typedef unsigned long ATOM;
#define X_DEPRECATED
#endif
+#if defined(__GNUC__) && (__GNUC__ > 2)
+#define X_NORETURN __attribute__((noreturn))
+#else
+#define X_NORETURN
+#endif
+
#ifndef _XTYPEDEF_CALLBACKLISTPTR
typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */
#define _XTYPEDEF_CALLBACKLISTPTR