summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-18 15:43:28 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-18 15:43:28 +0000
commit00c12a28e774c5a8ae010918e8602f8da3698814 (patch)
tree127551fccd4a9737b9f3f3245b0d9685f8439459
parent4a963e5f1fdac9c1d4d404fe75ea2ceaf93ae37d (diff)
downloadrsyslog-00c12a28e774c5a8ae010918e8602f8da3698814.tar.gz
rsyslog-00c12a28e774c5a8ae010918e8602f8da3698814.tar.xz
rsyslog-00c12a28e774c5a8ae010918e8602f8da3698814.zip
more cleanup; restored compatibility to non-gcc compilers
-rw-r--r--configure.ac2
-rw-r--r--klogd.c1
-rw-r--r--rsyslog.h8
3 files changed, 10 insertions, 1 deletions
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 */