blob: 8dec350b9f9eb4e1c495e5c7aa1174b60169cbd3 [file] [log] [blame]
Jens Axboe4fee8092007-03-29 09:33:03 +02001#ifndef FIO_COMPILER_H
2#define FIO_COMPILER_H
3
4#if __GNUC__ >= 4
5#include "compiler-gcc4.h"
Jens Axboe73e07ac2007-03-29 09:33:46 +02006#elif __GNUC__ == 3
Jens Axboe4fee8092007-03-29 09:33:03 +02007#include "compiler-gcc3.h"
8#else
9#error Compiler too old, need gcc at least gcc 3.x
10#endif
11
Jens Axboe993cca02007-03-29 09:35:35 +020012#ifndef __must_check
13#define __must_check
14#endif
15
Jens Axboef3f552b2008-06-13 10:27:05 +020016#define uninitialized_var(x) x = x
17
Bruce Cranc3d31782011-07-10 20:56:23 +020018#ifndef _weak
Bruce Cran9b836562011-01-08 19:49:54 +010019#ifndef __CYGWIN__
Bruce Cranc3d31782011-07-10 20:56:23 +020020#define _weak __attribute__((weak))
Bruce Cran9b836562011-01-08 19:49:54 +010021#else
Bruce Cranc3d31782011-07-10 20:56:23 +020022#define _weak
Bruce Cran9b836562011-01-08 19:49:54 +010023#endif
Jens Axboe3b2e1462009-12-15 08:58:10 +010024#endif
Jens Axboeed80ddf2009-11-23 15:14:48 +010025
Jens Axboe4fee8092007-03-29 09:33:03 +020026#endif