From 00c12a28e774c5a8ae010918e8602f8da3698814 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 18 Jul 2007 15:43:28 +0000 Subject: more cleanup; restored compatibility to non-gcc compilers --- configure.ac | 2 +- klogd.c | 1 + rsyslog.h | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fa8d93f8..ff8587af 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_CONFIG_HEADER([config.h]) AC_PROG_CC AM_PROG_CC_C_O if test "$GCC" = "yes" -then CFLAGS="$CFLAGS -W -Wall -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g" +then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g" fi AC_CANONICAL_HOST diff --git a/klogd.c b/klogd.c index 5b9025f1..909bc6f8 100644 --- a/klogd.c +++ b/klogd.c @@ -334,6 +334,7 @@ static void LogProcLine(void); extern int main(int argc, char *argv[]); +extern void Syslog(int priority, char *fmt, ...) __attribute__((format(printf,2, 3))); extern void Syslog(int priority, char *fmt, ...) { va_list ap; diff --git a/rsyslog.h b/rsyslog.h index 2c3449ab..1f633059 100644 --- a/rsyslog.h +++ b/rsyslog.h @@ -94,4 +94,12 @@ typedef enum rsObjectID rsObjID; */ typedef unsigned char uchar; +/* for the time being, we do our own portability handling here. It + * looks like autotools either does not yet support checks for it, or + * I wasn't smart enough to find them ;) rgerhards, 2007-07-18 + */ +#ifndef __GNUC__ +# define __attribute__(x) /*NOTHING*/ +#endif + #endif /* multi-include protection */ -- cgit v1.2.3