1 /* vi: set sw=4 ts=4: */
3 * prioritynames[] and facilitynames[]
5 * Copyright (C) 2008 by Denys Vlasenko <vda.linux@gmail.com>
7 * Licensed under GPLv2, see file LICENSE in this source tree.
12 #define SYSLOG_NAMES_CONST
16 /* For the record: with SYSLOG_NAMES <syslog.h> defines
17 * (not declares) the following:
19 typedef struct _code {
20 /*const*/ char *c_name;
23 /*const*/ CODE prioritynames[] = {
24 { "alert", LOG_ALERT },
28 /* same for facilitynames[] */
30 /* This MUST occur only once per entire executable,
31 * therefore we can't just do it in syslogd.c and logger.c -
32 * there will be two copies of it.
34 * We cannot even do it in separate file and then just reference
35 * prioritynames[] from syslogd.c and logger.c - bare <syslog.h>
36 * will not emit extern decls for prioritynames[]! Attempts to
37 * emit "matching" struct _code declaration defeat the whole purpose
40 * For now, syslogd.c and logger.c are simply compiled into