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 2016/01/18 00:24:14 UTC

[1/2] trafficserver git commit: TS-4142: use uint32_t in preference to non-standard u_int32_t

Repository: trafficserver
Updated Branches:
  refs/heads/master 408933a7c -> 42534a43a


TS-4142: use uint32_t in preference to non-standard u_int32_t

This closes #428.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1ef6ff76
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1ef6ff76
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1ef6ff76

Branch: refs/heads/master
Commit: 1ef6ff766c2cef8632e7b77d4a03aa378883ebc5
Parents: 408933a
Author: Leif Hedstrom <zw...@apache.org>
Authored: Sun Jan 17 16:13:02 2016 -0700
Committer: James Peach <jp...@apache.org>
Committed: Sun Jan 17 15:22:20 2016 -0800

----------------------------------------------------------------------
 lib/ts/ContFlags.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1ef6ff76/lib/ts/ContFlags.h
----------------------------------------------------------------------
diff --git a/lib/ts/ContFlags.h b/lib/ts/ContFlags.h
index f581c81..8e57cec 100644
--- a/lib/ts/ContFlags.h
+++ b/lib/ts/ContFlags.h
@@ -43,9 +43,9 @@ public:
   enum flags { DEBUG_OVERRIDE = 0, DISABLE_PLUGINS = 1, LAST_FLAG };
 
   ContFlags() : raw_flags(0) {}
-  ContFlags(u_int32_t in_flags) : raw_flags(in_flags) {}
+  ContFlags(uint32_t in_flags) : raw_flags(in_flags) {}
   void
-  set_flags(u_int32_t new_flags)
+  set_flags(uint32_t new_flags)
   {
     raw_flags = new_flags;
   }
@@ -55,7 +55,7 @@ public:
     return *this;
   }
 
-  u_int32_t
+  uint32_t
   get_flags() const
   {
     return raw_flags;
@@ -81,7 +81,7 @@ public:
   }
 
 private:
-  u_int32_t raw_flags;
+  uint32_t raw_flags;
 };
 
 void init_cont_flags();


[2/2] trafficserver git commit: TS-4142: various casting fixes for OmniOS

Posted by jp...@apache.org.
TS-4142: various casting fixes for OmniOS

This closes #428.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/42534a43
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/42534a43
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/42534a43

Branch: refs/heads/master
Commit: 42534a43afb8950beec2df0d902b70af265dee97
Parents: 1ef6ff7
Author: Leif Hedstrom <zw...@apache.org>
Authored: Sun Jan 17 16:13:16 2016 -0700
Committer: James Peach <jp...@apache.org>
Committed: Sun Jan 17 15:23:50 2016 -0800

----------------------------------------------------------------------
 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/42534a43/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/42534a43/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/42534a43/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"
 
 /**