summaryrefslogtreecommitdiff
path: root/lib/quota/common.h
blob: b5e83316e16a489bd58a7f655884da53213322a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 *
 *	Various things common for all utilities
 *
 */

#ifndef __QUOTA_COMMON_H__
#define __QUOTA_COMMON_H__

#ifndef __attribute__
# if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
#  define __attribute__(x)
# endif
#endif

#define log_err(format, ...)	fprintf(stderr, \
				"[ERROR] %s:%d:%s:: " format "\n", \
				__FILE__, __LINE__, __func__, __VA_ARGS__)

#ifdef DEBUG_QUOTA
# define log_debug(format, ...)	fprintf(stderr, \
				"[DEBUG] %s:%d:%s:: " format "\n", \
				__FILE__, __LINE__, __func__, __VA_ARGS__)
#else
# define log_debug(format, ...)
#endif

#endif /* __QUOTA_COMMON_H__ */