Add a debugging print macro.
[beanstalkd.git] / util.h
blobd06285680d10817d4cb0e5f088d1aed85a18bc28
1 #ifndef util_h
2 #define util_h
4 #define min(a,b) ((a)<(b)?(a):(b))
6 int warn(const char *s);
8 void v();
10 #ifdef DEBUG
11 #define dprintf(fmt, args...) fprintf(stderr, fmt, ##args)
12 #else
13 #define dprintf(fmt, ...) (0)
14 #endif
16 #endif /*util_h*/