aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-01-01 16:25:18 -0600
committerRob Landley <rob@landley.net>2018-01-01 16:25:18 -0600
commit359888abf649ed3292210e3518aa669dac1480b9 (patch)
tree194c7ef19136c034f699d484908f472dadbef6b8 /lib
parent3ba0a289a8c77bc5f103520d8227c0f6695702fb (diff)
downloadtoybox-359888abf649ed3292210e3518aa669dac1480b9.tar.gz
Cleanup logger.c, and move the facilitynames/prioritynames SYSLOG_NAMES
stuff syslog.h does into lib.c and portability.h
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.c1
-rw-r--r--lib/portability.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/lib.c b/lib/lib.c
index c4c4a149..8a818575 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -3,6 +3,7 @@
* Copyright 2006 Rob Landley <rob@landley.net>
*/
+#define SYSLOG_NAMES
#include "toys.h"
void verror_msg(char *msg, int err, va_list va)
diff --git a/lib/portability.h b/lib/portability.h
index e62de139..50c935b5 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -246,3 +246,8 @@ pid_t xfork(void);
static inline int get_sched_policy(int tid, void *policy) {return 0;}
static inline char *get_sched_policy_name(int policy) {return "unknown";}
#endif
+
+#ifndef SYSLOG_NAMES
+typedef struct {char *c_name; int c_val;} CODE;
+extern CODE prioritynames[], facilitynames[];
+#endif