]> git.proxmox.com Git - mirror_lxcfs.git/blame - macro.h
Fix test_proc on s390x
[mirror_lxcfs.git] / macro.h
CommitLineData
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
18#endif /* __LXCFS_MACRO_H */