#ifndef FIO_COMPILER_H
#define FIO_COMPILER_H
+#include <assert.h>
#if __GNUC__ >= 4
#include "compiler-gcc4.h"
1; \
})
+
+#if defined(CONFIG_STATIC_ASSERT)
+#define compiletime_assert(condition, msg) _Static_assert(condition, msg)
+
+#else
#ifndef __compiletime_error
#define __compiletime_error(message)
#endif
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
#endif
+
+#endif
fi
echo "__sync_fetch_and_add $sfa"
+##########################################
+# Check whether we have _Static_assert
+static_assert="no"
+cat > $TMPC << EOF
+#include <assert.h>
+int main(int argc, char **argv)
+{
+ _Static_assert( 1 == 1 , "Check");
+ return 0 ;
+}
+EOF
+if compile_prog "" "" "static_assert"; then
+ static_assert="yes"
+fi
+echo "Static Assert $static_assert"
#############################################################################
if test "$wordsize" = "64" ; then
if test "$sfa" = "yes" ; then
output_sym "CONFIG_SFA"
fi
+if test "$static_assert" = "yes" ; then
+ output_sym "CONFIG_STATIC_ASSERT"
+fi
if test "$zlib" = "no" ; then
echo "Consider installing zlib-dev (zlib-devel), some fio features depend on it."