]>
Commit | Line | Data |
---|---|---|
77f175ac JF |
1 | #include <objc/objc.h> |
2 | ||
11bc1216 JF |
3 | #include <sys/time.h> |
4 | #include <time.h> | |
5 | ||
6 | #define _trace() do { \ | |
7 | struct timeval _tv; \ | |
8 | gettimeofday(&_tv, NULL); \ | |
9 | fprintf(stderr, "%lu.%.6u:_trace()@%s:%u[%s]\n", _tv.tv_sec, _tv.tv_usec, __FILE__, __LINE__, __FUNCTION__); \ | |
10 | } while (false) | |
77f175ac JF |
11 | |
12 | #define _assert(test) do \ | |
13 | if (!(test)) { \ | |
14 | fprintf(stderr, "_assert(%d:%s)@%s:%u[%s]\n", errno, #test, __FILE__, __LINE__, __FUNCTION__); \ | |
15 | exit(-1); \ | |
16 | } \ | |
17 | while (false) | |
18 | ||
19 | #define _not(type) ((type) ~ (type) 0) | |
20 | ||
21 | #define _transient |