1 |
sf-pippijn |
1.3 |
#include "autoconf.h" |
2 |
|
|
|
3 |
sf-pippijn |
1.1 |
#define GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) |
4 |
sf-pippijn |
1.2 |
|
5 |
|
|
#include "adt/foreach.h" |
6 |
|
|
#include "adt/nullptr.h" |
7 |
|
|
#include "adt/logs.h" |
8 |
|
|
|
9 |
|
|
#define return_unless(cond) \ |
10 |
|
|
do { \ |
11 |
|
|
if (!(cond)) \ |
12 |
|
|
{ LOG ("error") << #cond << '\n'; \ |
13 |
|
|
return; } \ |
14 |
|
|
} while (0) |
15 |
|
|
|
16 |
|
|
#define return_val_unless(cond, val) \ |
17 |
|
|
do { \ |
18 |
|
|
if (!(cond)) \ |
19 |
|
|
{ LOG ("error") << #cond << '\n'; \ |
20 |
|
|
return val; } \ |
21 |
|
|
} while (0) |