1 /*
2  *
3  *	Various things common for all utilities
4  *
5  */
6 
7 #ifndef __QUOTA_COMMON_H__
8 #define __QUOTA_COMMON_H__
9 
10 #if EXT2_FLAT_INCLUDES
11 #include "e2_types.h"
12 #else
13 #include <ext2fs/ext2_types.h>
14 #endif /* EXT2_FLAT_INCLUDES */
15 
16 /* #define DEBUG_QUOTA 1 */
17 
18 #ifndef __attribute__
19 # if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
20 #  define __attribute__(x)
21 # endif
22 #endif
23 
24 #define log_err(format, arg ...)					\
25 	fprintf(stderr, "[ERROR] %s:%d:%s: " format "\n",		\
26 		__FILE__, __LINE__, __func__, ## arg)
27 
28 #ifdef DEBUG_QUOTA
29 # define log_debug(format, arg ...)					\
30 	fprintf(stderr, "[DEBUG] %s:%d:%s: " format "\n",		\
31 		__FILE__, __LINE__, __func__, ## arg)
32 #else
33 # define log_debug(...)
34 #endif
35 
36 #endif /* __QUOTA_COMMON_H__ */
37