trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] branch master updated: Add --enable-mime-sanity-check option
Date Fri, 21 Apr 2017 16:46:14 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  74b2abe   Add --enable-mime-sanity-check option
74b2abe is described below

commit 74b2abecf6b0a995928208c27671cb2388e67a63
Author: Masakazu Kitajo <maskit@apache.org>
AuthorDate: Thu Apr 20 15:43:46 2017 +0900

    Add --enable-mime-sanity-check option
---
 configure.ac      | 11 +++++++++++
 proxy/hdrs/MIME.h |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index b58c137..fd1d6ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,6 +167,14 @@ AC_ARG_ENABLE([debug],
 )
 AC_MSG_RESULT([$enable_debug])
 
+AC_MSG_CHECKING([whether to enable mime sanity check])
+AC_ARG_ENABLE([mime-sanity-check],
+  [AS_HELP_STRING([--enable-mime-sanity-check],[turn on mime sanity check])],
+  [],
+  [enable_mime_sanity_check=no]
+)
+AC_MSG_RESULT([$enable_mime_sanity_check])
+
 # Enable code coverage instrumentation only if requested by the user.
 AC_MSG_CHECKING([whether to code coverage])
 AC_ARG_ENABLE([coverage],
@@ -939,6 +947,9 @@ if test "x${enable_debug}" = "xyes"; then
   TS_ADDTO(AM_CFLAGS, [${cc_oflag_dbg}])
   TS_ADDTO(AM_CXXFLAGS, [${cxx_oflag_dbg}])
   TS_ADDTO(AM_CPPFLAGS, [-DDEBUG -D_DEBUG])
+  if test "x${enable_mime_sanity_check}" = "xyes"; then
+    TS_ADDTO(AM_CPPFLAGS, [-DENABLE_MIME_SANITY_CHECK])
+  fi
 else
   TS_ADDTO(AM_CFLAGS, [${cc_oflag_opt}])
   TS_ADDTO(AM_CXXFLAGS, [${cxx_oflag_opt}])
diff --git a/proxy/hdrs/MIME.h b/proxy/hdrs/MIME.h
index 1a59498..babdbc1 100644
--- a/proxy/hdrs/MIME.h
+++ b/proxy/hdrs/MIME.h
@@ -67,7 +67,7 @@ enum MimeParseState {
  *                                                                     *
  ***********************************************************************/
 
-#ifdef DEBUG
+#ifdef ENABLE_MIME_SANITY_CHECK
 #define MIME_HDR_SANITY_CHECK mime_hdr_sanity_check
 #else
 #define MIME_HDR_SANITY_CHECK (void)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message