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