You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/08/02 06:52:02 UTC
[2/2] git commit: Fix autoconf checks for mcheck_pedantic()
Fix autoconf checks for mcheck_pedantic()
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b580e05d
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b580e05d
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b580e05d
Branch: refs/heads/master
Commit: b580e05d7652113c3847299c4268caa41f154ff6
Parents: 3dd1dd4
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 21:48:07 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 21:48:07 2013 -0700
----------------------------------------------------------------------
configure.ac | 6 ++++++
proxy/Main.cc | 8 +++++---
2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b580e05d/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 3f19c45..2879655 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1118,6 +1118,12 @@ TS_FLAG_HEADERS([sys/eventfd.h], [
AC_CHECK_FUNCS(eventfd)
#
+# Check for mcheck_pedantic(3)
+#
+TS_FLAG_HEADERS(mcheck.h)
+AC_CHECK_FUNCS(mcheck_pedantic)
+
+#
# Check for pcre library
#
TS_CHECK_PCRE
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b580e05d/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index d0785d5..a13633f 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -34,17 +34,19 @@
#include "libts.h"
#include "ink_sys_control.h"
+#include <syslog.h>
#if !defined(linux)
#include <sys/lock.h>
#endif
+
#if defined(linux)
extern "C" int plock(int);
#else
#include <sys/filio.h>
#endif
-#include <syslog.h>
-#if !defined(darwin) && !defined(freebsd) && !defined(solaris) && !defined(openbsd)
+
+#if HAVE_MCHECK_H
#include <mcheck.h>
#endif
@@ -1289,7 +1291,7 @@ main(int /* argc ATS_UNUSED */, char **argv)
#endif
bool admin_user_p = false;
-#ifdef HAVE_MCHECK
+#if defined(DEBUG) && defined(HAVE_MCHECK_PEDANTIC)
mcheck_pedantic(NULL);
#endif