diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | plugins/imklog/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/immark/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/imtcp/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/imudp/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/imuxsock/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/omgssapi/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/ommysql/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/ompgsql/Makefile.am | 2 | ||||
-rw-r--r-- | plugins/omtesting/Makefile.am | 4 | ||||
-rw-r--r-- | syslogd.c | 9 |
12 files changed, 46 insertions, 22 deletions
diff --git a/Makefile.am b/Makefile.am index 6220cf17..d5170c1f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,8 +60,8 @@ rsyslogd_SOURCES = \ gss-misc.c \ gss-misc.h -rsyslogd_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/\" $(pthreads_cflags) -rsyslogd_LDADD = $(zlib_libs) $(pthreads_libs) $(gss_libs) $(dl_libs) $(rt_libs) +rsyslogd_CPPFLAGS = $(mudflap_cflags) -D_PATH_MODDIR=\"$(pkglibdir)/\" $(pthreads_cflags) +rsyslogd_LDADD = $(mudflap_libs) $(zlib_libs) $(pthreads_libs) $(gss_libs) $(dl_libs) $(rt_libs) rsyslogd_LDFLAGS = -export-dynamic man_MANS = rfc3195d.8 rsyslogd.8 rsyslog.conf.5 diff --git a/configure.ac b/configure.ac index 5a79a4a6..2da0e5b9 100644 --- a/configure.ac +++ b/configure.ac @@ -270,6 +270,26 @@ if test "$enable_debug" = "no"; then AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.]) fi +# mudflap +AC_ARG_ENABLE(mudflap, + [AS_HELP_STRING([--enable-mudflap],[Enable mudflap @<:@default=no@:>@])], + [case "${enableval}" in + yes) enable_mudflap="yes" ;; + no) enable_mudflap="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-mudflap) ;; + esac], + [enable_mudflap="no"] +) +if test "$enable_mudflap" = "yes"; then + # is there any way to just change the -O option in default CFLAGS? -- rgerhards, 2008-01-08 + CFLAGS="-O1 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g" + mudflap_libs="-lmudflapth" + mudflap_cflags="-fmudflapth" + AC_SUBST(mudflap_libs) + AC_SUBST(mudflap_cflags) + ], +fi + # MySQL support @@ -369,4 +389,5 @@ echo "Large file support enabled: $enable_largefile" echo "Networking support enabled: $enable_inet" echo "Enable GSSAPI Kerberos 5 support: $want_gssapi_krb5" echo "Debug mode enabled: $enable_debug" +echo "Mudflap enabled: $enable_mudflap" diff --git a/plugins/imklog/Makefile.am b/plugins/imklog/Makefile.am index 11e00962..8d435dfc 100644 --- a/plugins/imklog/Makefile.am +++ b/plugins/imklog/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = imklog.la imklog_la_SOURCES = imklog.c imklog.h module.h ksym.c ksyms.h ksym_mod.c -imklog_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -imklog_la_LDFLAGS = -module -avoid-version +imklog_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) $(mudflap_cflags) +imklog_la_LDFLAGS = $(mudflap_libs) -module -avoid-version imklog_la_LIBADD = diff --git a/plugins/immark/Makefile.am b/plugins/immark/Makefile.am index 3dc0e408..157ec077 100644 --- a/plugins/immark/Makefile.am +++ b/plugins/immark/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = immark.la immark_la_SOURCES = immark.c immark.h -immark_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -immark_la_LDFLAGS = -module -avoid-version +immark_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) $(mudflap_cflags) +immark_la_LDFLAGS = $(mudflap_libs) -module -avoid-version immark_la_LIBADD = diff --git a/plugins/imtcp/Makefile.am b/plugins/imtcp/Makefile.am index fe43cd98..fd06a1a0 100644 --- a/plugins/imtcp/Makefile.am +++ b/plugins/imtcp/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = imtcp.la imtcp_la_SOURCES = imtcp.c -imtcp_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -imtcp_la_LDFLAGS = -module -avoid-version +imtcp_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) $(mudflap_cflags) +imtcp_la_LDFLAGS = $(mudflap_libs) -module -avoid-version imtcp_la_LIBADD = diff --git a/plugins/imudp/Makefile.am b/plugins/imudp/Makefile.am index 53fdad16..a1f5a210 100644 --- a/plugins/imudp/Makefile.am +++ b/plugins/imudp/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = imudp.la imudp_la_SOURCES = imudp.c -imudp_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -imudp_la_LDFLAGS = -module -avoid-version +imudp_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) $(mudflap_cflags) +imudp_la_LDFLAGS = $(mudflap_libs) -module -avoid-version imudp_la_LIBADD = diff --git a/plugins/imuxsock/Makefile.am b/plugins/imuxsock/Makefile.am index e165bb7d..e1933d99 100644 --- a/plugins/imuxsock/Makefile.am +++ b/plugins/imuxsock/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = imuxsock.la imuxsock_la_SOURCES = imuxsock.c -imuxsock_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -imuxsock_la_LDFLAGS = -module -avoid-version +imuxsock_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) $(mudflap_cflags) +imuxsock_la_LDFLAGS = $(mudflap_libs) -module -avoid-version imuxsock_la_LIBADD = diff --git a/plugins/omgssapi/Makefile.am b/plugins/omgssapi/Makefile.am index 5280a1ce..3ec18282 100644 --- a/plugins/omgssapi/Makefile.am +++ b/plugins/omgssapi/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = omgssapi.la omgssapi_la_SOURCES = omgssapi.c -omgssapi_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -omgssapi_la_LDFLAGS = -module -avoid-version +omgssapi_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) $(mudflap_cflags) +omgssapi_la_LDFLAGS = $(mudflap_libs) -module -avoid-version omgssapi_la_LIBADD = $(gss_libs) diff --git a/plugins/ommysql/Makefile.am b/plugins/ommysql/Makefile.am index 3b4e6d75..4e5c1548 100644 --- a/plugins/ommysql/Makefile.am +++ b/plugins/ommysql/Makefile.am @@ -1,8 +1,8 @@ pkglib_LTLIBRARIES = ommysql.la ommysql_la_SOURCES = ommysql.c ommysql.h -ommysql_la_CPPFLAGS = -I$(top_srcdir) $(mysql_cflags) $(pthreads_cflags) -ommysql_la_LDFLAGS = -module -avoid-version +ommysql_la_CPPFLAGS = -I$(top_srcdir) $(mysql_cflags) $(pthreads_cflags) $(mudflap_cflags) +ommysql_la_LDFLAGS = $(mudflap_libs) -module -avoid-version ommysql_la_LIBADD = $(mysql_libs) EXTRA_DIST = createDB.sql contrib/delete_mysql diff --git a/plugins/ompgsql/Makefile.am b/plugins/ompgsql/Makefile.am index b2e3effa..ec8b7d91 100644 --- a/plugins/ompgsql/Makefile.am +++ b/plugins/ompgsql/Makefile.am @@ -1,7 +1,7 @@ pkglib_LTLIBRARIES = ompgsql.la ompgsql_la_SOURCES = ompgsql.c ompgsql.h -ompgsql_la_CPPFLAGS = -I$(top_srcdir) $(pgsql_cflags) +ompgsql_la_CPPFLAGS = -I$(top_srcdir) $(pgsql_cflags) $(mudflap_cflags) ompgsql_la_LDFLAGS = -module -avoid-version ompgsql_la_LIBADD = $(pgsql_libs) diff --git a/plugins/omtesting/Makefile.am b/plugins/omtesting/Makefile.am index 7e376683..83e64155 100644 --- a/plugins/omtesting/Makefile.am +++ b/plugins/omtesting/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = omtesting.la omtesting_la_SOURCES = omtesting.c -omtesting_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -omtesting_la_LDFLAGS = -module -avoid-version +omtesting_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) $(mudflap_cflags) +omtesting_la_LDFLAGS = $(mudflap_libs) -module -avoid-version omtesting_la_LIBADD = @@ -4278,14 +4278,17 @@ dbgprintf(char *fmt, ...) * rgerhards, 2007-06-15 */ if(bWasNL) { - fprintf(stdout, "%8.8x: ", (unsigned int) pthread_self()); + //fprintf(stdout, "%8.8x: ", (unsigned int) pthread_self()); + fprintf(stderr, "%8.8x: ", (unsigned int) pthread_self()); } bWasNL = (*(fmt + strlen(fmt) - 1) == '\n') ? TRUE : FALSE; va_start(ap, fmt); - vfprintf(stdout, fmt, ap); + //vfprintf(stdout, fmt, ap); + vfprintf(stderr, fmt, ap); va_end(ap); - fflush(stdout); + fflush(stderr); + //fflush(stdout); return; } |