]>
Commit | Line | Data |
---|---|---|
17e0e368 CB |
1 | #ifndef __LXCFS_MACRO_H |
2 | #define __LXCFS_MACRO_H | |
3 | ||
4 | #define lxcfs_debug_stream(stream, format, ...) \ | |
5 | do { \ | |
6 | fprintf(stream, "%s: %d: %s: " format, __FILE__, __LINE__, \ | |
7 | __func__, __VA_ARGS__); \ | |
8 | } while (false) | |
9 | ||
10 | #define lxcfs_error(format, ...) lxcfs_debug_stream(stderr, format, __VA_ARGS__) | |
11 | ||
12 | #ifdef DEBUG | |
13 | #define lxcfs_debug(format, ...) lxcfs_error(format, __VA_ARGS__) | |
14 | #else | |
15 | #define lxcfs_debug(format, ...) | |
16 | #endif /* DEBUG */ | |
17 | ||
83dad6a5 SG |
18 | #ifdef VERBOSE |
19 | #define lxcfs_v(format, ...) lxcfs_error(format, __VA_ARGS__); | |
20 | #else | |
21 | #define lxcfs_v(format, ...) | |
22 | #endif /* VERBOSE */ | |
23 | ||
17e0e368 | 24 | #endif /* __LXCFS_MACRO_H */ |