summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2015-02-26 13:02:04 -0300
committerLucas De Marchi <lucas.demarchi@intel.com>2015-02-26 13:15:14 -0300
commit16a62c7ab3846a1996624cccc0e16dd4adb5deb0 (patch)
treea746b3b7333885cdf7fea4141cc6bb97a4f8c3ba /shared
parent481ad14550087c77c9df6d117c7a975a38a4ad33 (diff)
downloadkmod-16a62c7ab3846a1996624cccc0e16dd4adb5deb0.tar.gz
shared: avoid checking for __STDC_VERSION__
Since we pass -std=gnu99 to the compiler __STDC_VERSION__ is defined to 199901. Even in this case we can use _Noreturn. Delegate the testing to the configure phase with a compile test. In future we want to stop using AC_PROG_CC_99 and start using the new AC_PROG_CC from autoconf 2.70, which tries to choose the most recent standard.
Diffstat (limited to 'shared')
-rw-r--r--shared/macro.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/macro.h b/shared/macro.h
index a081a49..4fc5405 100644
--- a/shared/macro.h
+++ b/shared/macro.h
@@ -63,7 +63,7 @@
/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
* compiler versions */
#ifndef noreturn
-#if __STDC_VERSION__ >= 201112L
+#if defined(HAVE_NORETURN)
#define noreturn _Noreturn
#else
#define noreturn __attribute__((noreturn))