ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/device-tincd.C
(Generate patch)

Comparing gvpe/src/device-tincd.C (file contents):
Revision 1.1 by pcg, Tue Oct 14 03:22:09 2003 UTC vs.
Revision 1.2 by pcg, Tue Oct 14 03:59:32 2003 UTC

27#include <syslog.h> 27#include <syslog.h>
28#include <fcntl.h> 28#include <fcntl.h>
29 29
30#include "conf.h" 30#include "conf.h"
31 31
32/* make the tincd sources feel comfortable in our environment. */
33/* this was reasonably easy to do. */
32#define routing_mode 1 34#define routing_mode 1
33#define RMODE_ROUTER 0 35#define RMODE_ROUTER 0
34 36
35/* need iso c-90 or ugly workaround :( */ 37#define LOG_TO_L(level) \
36#define logger(level, ...) slog ( \
37 (level) == LOG_ERR ? L_ERR \ 38 (level) == LOG_ERR ? L_ERR \
38 : (level) == LOG_DEBUG ? L_DEBUG \ 39 : (level) == LOG_DEBUG ? L_DEBUG \
39 : (level) == LOG_WARNING ? L_WARN \ 40 : (level) == LOG_WARNING ? L_WARN \
40 : (level) == LOG_INFO ? L_INFO \ 41 : (level) == LOG_INFO ? L_INFO \
41 : L_NOTICE, __VA_ARGS__) 42 : L_NOTICE
43
44#if __STDC_VERSION__ > 199900
45# define logger(level, ...) slog (LOG_TO_L(level), __VA_ARGS__)
46#elif __GNUC__
47# define logger(level, args...) slog (LOG_TO_L(level), ## args)
48#else
49# error either need ISO-C 99 compliant compiler or gcc.
50#endif
42 51
43#define ifdebug(subsys) if (0) 52#define ifdebug(subsys) if (0)
44 53
45#define cp() 54#define cp()
46#define lookup_config(config_tree,key) (key) 55#define lookup_config(config_tree,key) (key)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines