You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2016/01/18 05:47:07 UTC
trafficserver git commit: TS-4142: various casting fixes for OmniOS
Repository: trafficserver
Updated Branches:
refs/heads/6.1.x 9ca988a2d -> a98e59383
TS-4142: various casting fixes for OmniOS
This closes #428.
(cherry picked from commit 42534a43afb8950beec2df0d902b70af265dee97)
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a98e5938
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a98e5938
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a98e5938
Branch: refs/heads/6.1.x
Commit: a98e59383b0d5cfbbef7b3d4b50cceb93670b695
Parents: 9ca988a
Author: Leif Hedstrom <zw...@apache.org>
Authored: Sun Jan 17 16:13:16 2016 -0700
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Sun Jan 17 21:46:47 2016 -0700
----------------------------------------------------------------------
lib/ts/ink_resource.cc | 2 +-
plugins/experimental/cachekey/configs.cc | 26 +++++++++++++-------------
plugins/experimental/cachekey/pattern.h | 9 ++++++++-
3 files changed, 22 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a98e5938/lib/ts/ink_resource.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_resource.cc b/lib/ts/ink_resource.cc
index b1c4d6a..d4180b9 100644
--- a/lib/ts/ink_resource.cc
+++ b/lib/ts/ink_resource.cc
@@ -69,7 +69,7 @@ public:
setName(const void *symbol, const char *name)
{
Dl_info info;
- dladdr(symbol, &info);
+ dladdr(const_cast<void *>(symbol), &info);
snprintf(_name, sizeof(_name), "%s/%s", name, info.dli_sname);
}
const char *
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a98e5938/plugins/experimental/cachekey/configs.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/cachekey/configs.cc b/plugins/experimental/cachekey/configs.cc
index f865234..7a459d1 100644
--- a/plugins/experimental/cachekey/configs.cc
+++ b/plugins/experimental/cachekey/configs.cc
@@ -324,19 +324,19 @@ Configs::loadClassifiers(const String &args, bool blacklist)
bool
Configs::init(int argc, char *argv[])
{
- static const struct option longopt[] = {{"exclude-params", optional_argument, 0, 'a'},
- {"include-params", optional_argument, 0, 'b'},
- {"include-match-params", optional_argument, 0, 'c'},
- {"exclude-match-params", optional_argument, 0, 'd'},
- {"sort-params", optional_argument, 0, 'e'},
- {"remove-all-params", optional_argument, 0, 'f'},
- {"include-headers", optional_argument, 0, 'g'},
- {"include-cookies", optional_argument, 0, 'h'},
- {"ua-capture", optional_argument, 0, 'i'},
- {"static-prefix", optional_argument, 0, 'j'},
- {"capture-prefix", optional_argument, 0, 'k'},
- {"ua-whitelist", optional_argument, 0, 'l'},
- {"ua-blacklist", optional_argument, 0, 'm'},
+ static const struct option longopt[] = {{const_cast<char *>("exclude-params"), optional_argument, 0, 'a'},
+ {const_cast<char *>("include-params"), optional_argument, 0, 'b'},
+ {const_cast<char *>("include-match-params"), optional_argument, 0, 'c'},
+ {const_cast<char *>("exclude-match-params"), optional_argument, 0, 'd'},
+ {const_cast<char *>("sort-params"), optional_argument, 0, 'e'},
+ {const_cast<char *>("remove-all-params"), optional_argument, 0, 'f'},
+ {const_cast<char *>("include-headers"), optional_argument, 0, 'g'},
+ {const_cast<char *>("include-cookies"), optional_argument, 0, 'h'},
+ {const_cast<char *>("ua-capture"), optional_argument, 0, 'i'},
+ {const_cast<char *>("static-prefix"), optional_argument, 0, 'j'},
+ {const_cast<char *>("capture-prefix"), optional_argument, 0, 'k'},
+ {const_cast<char *>("ua-whitelist"), optional_argument, 0, 'l'},
+ {const_cast<char *>("ua-blacklist"), optional_argument, 0, 'm'},
{0, 0, 0, 0}};
bool status = true;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a98e5938/plugins/experimental/cachekey/pattern.h
----------------------------------------------------------------------
diff --git a/plugins/experimental/cachekey/pattern.h b/plugins/experimental/cachekey/pattern.h
index 69df978..57e7bfc 100644
--- a/plugins/experimental/cachekey/pattern.h
+++ b/plugins/experimental/cachekey/pattern.h
@@ -24,7 +24,14 @@
#ifndef PLUGINS_EXPERIMENTAL_CACHEKEY_PATTERN_H_
#define PLUGINS_EXPERIMENTAL_CACHEKEY_PATTERN_H_
-#include <pcre.h> /* pcre, pcre_extra, pcre_exec */
+#include "ts/ink_defs.h"
+
+#ifdef HAVE_PCRE_PCRE_H
+#include <pcre/pcre.h>
+#else
+#include <pcre.h>
+#endif
+
#include "common.h"
/**