diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-02-16 00:11:46 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-02-16 00:11:46 +0400 |
commit | 51612fe5ea4cb81a8972deb0b926aaee1b233123 (patch) | |
tree | bea5d841fab4a9ff5deec50267f56b84ade64ef6 /libc | |
parent | e61b0b46ba2ae62aff18396ebc4a5ee2a338b891 (diff) | |
download | illumos-packaging-51612fe5ea4cb81a8972deb0b926aaee1b233123.tar.gz |
Implemented prioritynames and facilitynames in syslog.h
Diffstat (limited to 'libc')
-rw-r--r-- | libc/debian/changelog | 2 | ||||
-rw-r--r-- | libc/debian/patches/series | 1 | ||||
-rw-r--r-- | libc/debian/patches/syslog-names.patch | 76 |
3 files changed, 79 insertions, 0 deletions
diff --git a/libc/debian/changelog b/libc/debian/changelog index 6eb89bb..b246f7c 100644 --- a/libc/debian/changelog +++ b/libc/debian/changelog @@ -5,6 +5,8 @@ libc (2.10+16) UNRELEASED; urgency=medium * Define extern char **environ in unistd.h [unistd-add-environ.patch] * Define getdomainname and setdomainname in unistd.h * Fixed vhangup: it returns int, not void + * Implemented prioritynames and facilitynames in syslog.h [syslog- + names.patch] -- Igor Pashev <pashev.igor@gmail.com> Wed, 12 Feb 2014 14:59:10 +0400 diff --git a/libc/debian/patches/series b/libc/debian/patches/series index c5d918d..a7ab315 100644 --- a/libc/debian/patches/series +++ b/libc/debian/patches/series @@ -108,3 +108,4 @@ libc-add-mkostemp.patch unistd-add-environ.patch define-getdomainname.patch libc-vhangup-returns-int.patch +syslog-names.patch diff --git a/libc/debian/patches/syslog-names.patch b/libc/debian/patches/syslog-names.patch new file mode 100644 index 0000000..17548f9 --- /dev/null +++ b/libc/debian/patches/syslog-names.patch @@ -0,0 +1,76 @@ +Index: libc/usr/src/head/syslog.h +=================================================================== +--- libc.orig/usr/src/head/syslog.h 2012-10-08 04:25:37.000000000 +0400 ++++ libc/usr/src/head/syslog.h 2014-02-16 00:02:42.476650797 +0400 +@@ -28,10 +28,70 @@ + + #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ + +-#include <sys/feature_tests.h> ++#include <features.h> + #include <sys/syslog.h> + #include <sys/va_list.h> + ++#define LOG_PRI(p) ((p) & LOG_PRIMASK) ++#define LOG_MAKEPRI(fac, pri) ((fac) | (pri)) ++ ++ ++#ifdef SYSLOG_NAMES ++#define INTERNAL_NOPRI 0x10 ++#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES << 3, 0) ++ ++typedef struct _code ++{ ++ char *c_name; ++ int c_val; ++} CODE; ++ ++CODE prioritynames[] = ++{ ++ {"alert", LOG_ALERT}, ++ {"crit", LOG_CRIT}, ++ {"debug", LOG_DEBUG}, ++ {"emerg", LOG_EMERG}, ++ {"err", LOG_ERR}, ++ {"error", LOG_ERR}, ++ {"info", LOG_INFO}, ++ {"none", INTERNAL_NOPRI}, ++ {"notice", LOG_NOTICE}, ++ {"panic", LOG_EMERG}, ++ {"warn", LOG_WARNING}, ++ {"warning", LOG_WARNING}, ++ {NULL, -1} ++}; ++CODE facilitynames[] = ++{ ++ {"auth", LOG_AUTH}, ++ {"authpriv", LOG_AUTHPRIV}, ++ {"cron", LOG_CRON}, ++ {"daemon", LOG_DAEMON}, ++ {"ftp", LOG_FTP}, ++ {"kern", LOG_KERN}, ++ {"lpr", LOG_LPR}, ++ {"mail", LOG_MAIL}, ++ {"mark", INTERNAL_MARK}, ++ {"news", LOG_NEWS}, ++ {"security", LOG_AUTH}, ++ {"syslog", LOG_SYSLOG}, ++ {"user", LOG_USER}, ++ {"uucp", LOG_UUCP}, ++ {"local0", LOG_LOCAL0}, ++ {"local1", LOG_LOCAL1}, ++ {"local2", LOG_LOCAL2}, ++ {"local3", LOG_LOCAL3}, ++ {"local4", LOG_LOCAL4}, ++ {"local5", LOG_LOCAL5}, ++ {"local6", LOG_LOCAL6}, ++ {"local7", LOG_LOCAL7}, ++ {NULL, -1} ++}; ++ ++#endif ++ ++ + #ifdef __cplusplus + extern "C" { + #endif |