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