Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / pptpd / our_syslog.h
blobdd44273a2bc17c0a2e2d8f059406f260ed666347
1 /*
2 * our_syslog.h
4 * Syslog replacement functions
6 * $Id: our_syslog.h,v 1.1.1.1 2002/06/21 08:52:00 fenix_nl Exp $
7 */
9 #ifndef _PPTPD_SYSLOG_H
10 #define _PPTPD_SYSLOG_H
13 * only enable this if you are debugging and running by hand
14 * If init runs us you may not have an fd-2, and thus your write all over
15 * someones FD and the die :-(
17 #undef USE_STDERR
19 #ifdef USE_STDERR
22 * Send all errors to stderr
25 #define openlog(a,b,c) ({})
26 #define syslog(a,b,c...) ({fprintf(stderr, "pptpd syslog: " b "\n" , ## c);})
27 #define closelog() ({})
29 #define syslog_perror perror
31 #else
34 * Send all errors to syslog
37 #include <errno.h>
38 #include <syslog.h>
40 #define syslog_perror(s) syslog(LOG_ERR, "%s: %s", s, strerror(errno))
42 #endif
44 #endif /* !_PPTPD_SYSLOG_H */