Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
--- /dev/null
+#ifndef FIO_COMPILER_GCC3_H
+#define FIO_COMPILER_GCC3_H
+
+#if __GNUC_MINOR__ >= 4
+#define __must_check __attribute__((warn_unused_result))
+#endif
+
+#endif
--- /dev/null
+#ifndef FIO_COMPILER_GCC4_H
+#define FIO_COMPILER_GCC4_H
+
+#define __must_check __attribute__((warn_unused_result))
+
+#endif
--- /dev/null
+#ifndef FIO_COMPILER_H
+#define FIO_COMPILER_H
+
+#if __GNUC__ >= 4
+#include "compiler-gcc4.h"
+#elif __GNUC == 3
+#include "compiler-gcc3.h"
+#else
+#error Compiler too old, need gcc at least gcc 3.x
+#endif
+
+#endif
#include <string.h>
#include <getopt.h>
#include <string.h>
#include <getopt.h>
#include "list.h"
#include "rbtree.h"
#include "md5.h"
#include "list.h"
#include "rbtree.h"
#include "md5.h"
-#if __GNUC__ < 3
-#define __must_check
-#else
-#define __must_check __attribute__((warn_unused_result))
-#endif
-