Tomato 1.28
[tomato.git] / release / src / router / pptp-client / util.h
blob39bf9cc58974fbc80518e96e8e6f30970c9c93dd
1 /* util.h ....... error message utilities.
2 * C. Scott Ananian <cananian@alumni.princeton.edu>
4 * $Id: util.h,v 1.1.1.1 2002/07/25 06:52:39 honor Exp $
5 */
7 #ifndef INC_UTIL_H
8 #define INC_UTIL_H
10 void _log(char *func, char *file, int line, char *format, ...)
11 __attribute__ ((format (printf, 4, 5)));
12 void _warn(char *func, char *file, int line, char *format, ...)
13 __attribute__ ((format (printf, 4, 5)));
14 void _fatal(char *func, char *file, int line, char *format, ...)
15 __attribute__ ((format (printf, 4, 5))) __attribute__ ((noreturn));
17 #define log(format, args...) \
18 _log(__FUNCTION__,__FILE__,__LINE__, format , ## args)
19 #define warn(format, args...) \
20 _warn(__FUNCTION__,__FILE__,__LINE__, format , ## args)
21 #define fatal(format, args...) \
22 _fatal(__FUNCTION__,__FILE__,__LINE__, format , ## args)
24 #endif /* INC_UTIL_H */