1 #include <syslog.h> 2 #define T(t) (t*)0; 3 #define F(t,n) {t *y = &x.n;} 4 #define C(n) switch(n){case n:;} f()5static void f() 6 { 7 C(LOG_PID) 8 C(LOG_CONS) 9 C(LOG_NDELAY) 10 C(LOG_ODELAY) 11 C(LOG_NOWAIT) 12 C(LOG_KERN) 13 C(LOG_USER) 14 C(LOG_MAIL) 15 C(LOG_NEWS) 16 C(LOG_UUCP) 17 C(LOG_DAEMON) 18 C(LOG_AUTH) 19 C(LOG_CRON) 20 C(LOG_LPR) 21 C(LOG_LOCAL0) 22 C(LOG_LOCAL1) 23 C(LOG_LOCAL2) 24 C(LOG_LOCAL3) 25 C(LOG_LOCAL4) 26 C(LOG_LOCAL5) 27 C(LOG_LOCAL6) 28 C(LOG_LOCAL7) 29 {int i = LOG_MASK(0);} 30 C(LOG_EMERG) 31 C(LOG_ALERT) 32 C(LOG_CRIT) 33 C(LOG_ERR) 34 C(LOG_WARNING) 35 C(LOG_NOTICE) 36 C(LOG_INFO) 37 C(LOG_DEBUG) 38 {void(*p)(void) = closelog;} 39 {void(*p)(const char*,int,int) = openlog;} 40 {int(*p)(int) = setlogmask;} 41 {void(*p)(int,const char*,...) = syslog;} 42 } 43