X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=compiler%2Fcompiler.h;fp=compiler%2Fcompiler.h;h=a6a74322549fc66f3210dc9b52406d1fd43a5475;hp=40e857c004c6e4304565ad1e446b4bffaf90eb35;hb=5018f79f6d8da82b6fafbbeeebdecb3799788bc3;hpb=2a2743361cf643b9dd2ba3e491da62e7cb83a101 diff --git a/compiler/compiler.h b/compiler/compiler.h index 40e857c0..a6a74322 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -1,5 +1,6 @@ #ifndef FIO_COMPILER_H #define FIO_COMPILER_H +#include #if __GNUC__ >= 4 #include "compiler-gcc4.h" @@ -33,6 +34,11 @@ 1; \ }) + +#if defined(CONFIG_STATIC_ASSERT) +#define compiletime_assert(condition, msg) _Static_assert(condition, msg) + +#else #ifndef __compiletime_error #define __compiletime_error(message) #endif @@ -56,3 +62,5 @@ _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) #endif + +#endif