From ec091abff842fb5fc94d99d50f94080d25666ce9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 16 Feb 2006 11:51:00 +0000 Subject: some changes to support Solaris --- NEWS | 1 + rsyslog.h | 3 +++ syslogd.c | 21 +++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9fe4f8ef..59621cf7 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ --------------------------------------------------------------------------- Version 1.12.x (RGer), 2006-xx-xx +- implemented some changes to support Solaris --------------------------------------------------------------------------- Version 1.12.2 (RGer), 2006-02-15 - fixed a bug in the RFC 3339 date formatter. An extra space was added diff --git a/rsyslog.h b/rsyslog.h index 36ab14e4..59210753 100644 --- a/rsyslog.h +++ b/rsyslog.h @@ -16,6 +16,9 @@ * ############################################################# */ #ifndef NOLARGEFILE +# undef _LARGEFILE_SOURCE +# undef _LARGEFILE64_SOURCE +# undef _FILE_OFFSET_BITS # define _GNU_SOURCE # define _LARGEFILE_SOURCE # define _LARGEFILE64_SOURCE diff --git a/syslogd.c b/syslogd.c index 6939875c..2b5c1433 100644 --- a/syslogd.c +++ b/syslogd.c @@ -136,7 +136,11 @@ #define SYSLOG_NAMES #include #include +#ifdef __sun +#include +#else #include +#endif #include #include #include @@ -155,9 +159,11 @@ #include #include +#ifndef __sun #ifndef BSD #include #endif +#endif #include #include #include @@ -177,6 +183,16 @@ #include #endif +/* missing definitions for solaris + * 2006-02-16 Rger + */ +#ifdef __sun +#define LOG_AUTHPRIV LOG_AUTH +#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri)) +#define LOG_PRI(p) ((p) & LOG_PRIMASK) +#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) +#endif + #include "rsyslog.h" #include "template.h" #include "outchannel.h" @@ -219,6 +235,9 @@ #ifdef BSD #define _PATH_VARRUN "/var/run/" #endif +#ifdef __sun +#define _PATH_VARRUN "/var/run/" +#endif #define _PATH_LOGPID _PATH_VARRUN SYSLOGD_PIDNAME #else #define _PATH_LOGPID "/etc/" SYSLOGD_PIDNAME @@ -3637,8 +3656,6 @@ void printline(char *hname, char *msg, int bParseHost) } /* Decode a priority into textual information like auth.emerg. - * rgerhards: This needs to be changed for syslog-protocol - severities - * are then supported up to 2^32-1. */ char *textpri(pri) int pri; -- cgit