Make sens Jens. I did not get what you told me in the first place. Let
me know if this would fix it. It works for me with GCC 4.6 (patch file
is also attached):

diff --git a/fio-arh/compiler/compiler.h b/fio-arh/compiler/compiler.h
index 40e857c..c9f8776 100644
--- a/fio-arh/compiler/compiler.h
+++ b/fio-arh/compiler/compiler.h
@@ -1,5 +1,6 @@
 #ifndef FIO_COMPILER_H
 #define FIO_COMPILER_H
+#include <assert.h>

 #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
@@ -55,4 +61,6 @@
 #define compiletime_assert(condition, msg) \
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)

+#endif
+
 #endif
diff --git a/fio-arh/configure b/fio-arh/configure
index e459d63..ab85936 100755
--- a/fio-arh/configure
+++ b/fio-arh/configure
@@ -1492,6 +1492,21 @@ if compile_prog "" "" "getmntinfo"; then
 fi
 echo "getmntinfo                    $getmntinfo"

+##########################################
+# 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
@@ -1671,6 +1686,9 @@ fi
 if test "$getmntinfo" = "yes" ; then
   output_sym "CONFIG_GETMNTINFO"
 fi
+if test "$static_assert" = "yes" ; then
+  output_sym "CONFIG_STATIC_ASSERT"
+fi

 if test "$zlib" = "no" ; then

Attachment: patch
Description: Binary data

Reply via email to