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 2014/09/09 23:07:43 UTC
git commit: TS-3066 Fix various build issues for OmniOS,
broken since 5.0.x.
Repository: trafficserver
Updated Branches:
refs/heads/master 627a7011e -> 3b68602ff
TS-3066 Fix various build issues for OmniOS, broken since 5.0.x.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3b68602f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3b68602f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3b68602f
Branch: refs/heads/master
Commit: 3b68602ffc7d38814b5ee3b73c37584e9b1fd709
Parents: 627a701
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Sep 9 15:06:51 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Sep 9 15:06:51 2014 -0600
----------------------------------------------------------------------
CHANGES | 2 ++
doc/sdk/remap-plugin/example-query-remap.en.rst | 2 +-
iocore/cache/Store.cc | 8 +++---
lib/Makefile.am | 2 +-
lib/ts/Regex.h | 2 ++
lib/ts/ink_res_init.cc | 2 +-
lib/ts/ink_res_mkquery.cc | 4 +--
lib/ts/ink_resolver.h | 26 ++++++++++----------
plugins/cacheurl/cacheurl.cc | 12 ++++-----
.../background_fetch/background_fetch.cc | 4 +--
plugins/experimental/epic/epic.cc | 2 +-
plugins/experimental/s3_auth/s3_auth.cc | 2 +-
plugins/regex_remap/regex_remap.cc | 13 +++++-----
proxy/CacheControl.cc | 4 +--
proxy/ControlMatcher.h | 14 +++++------
proxy/hdrs/HdrToken.cc | 2 +-
proxy/http/HttpConfig.h | 3 ++-
proxy/http/remap/UrlMapping.h | 1 +
proxy/http/remap/UrlRewrite.h | 1 +
19 files changed, 55 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 8fe045c..f926790 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 5.2.0
+ *) [TS-3066] Fix various build issues for OmniOS, broken since 5.0.x.
+
*) [TS-407] Cleanup the syslog facility setup for traffic_server.
*) [TS-3049] - Enhance FetchSM to handle response with "Connection:Close" header
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/doc/sdk/remap-plugin/example-query-remap.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/remap-plugin/example-query-remap.en.rst b/doc/sdk/remap-plugin/example-query-remap.en.rst
index 776c46d..acf136a 100644
--- a/doc/sdk/remap-plugin/example-query-remap.en.rst
+++ b/doc/sdk/remap-plugin/example-query-remap.en.rst
@@ -129,7 +129,7 @@ modify the request host:
++val;
//the param key matched the configured param_name
//hash the param value to pick a host
- hostidx = hash_fnv32(val, strlen(val)) % (u_int32_t)qri->num_hosts;
+ hostidx = hash_fnv32(val, strlen(val)) % (uint32_t)qri->num_hosts;
break;
}
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/iocore/cache/Store.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Store.cc b/iocore/cache/Store.cc
index 9df8f9a..5d81822 100644
--- a/iocore/cache/Store.cc
+++ b/iocore/cache/Store.cc
@@ -672,7 +672,7 @@ Span::init(char *filename, int64_t size)
{
int devnum = 0, arg = 0;
int ret = 0, is_disk = 0;
- u_int64_t heads, sectors, cylinders, adjusted_sec;
+ uint64_t heads, sectors, cylinders, adjusted_sec;
ats_scoped_fd fd;
/* Fetch file type */
@@ -734,9 +734,9 @@ Span::init(char *filename, int64_t size)
#endif
if (is_disk) {
- u_int32_t ioctl_sectors = 0;
- u_int64_t ioctl_bytes = 0;
- u_int64_t physsectors = 0;
+ uint32_t ioctl_sectors = 0;
+ uint64_t ioctl_bytes = 0;
+ uint64_t physsectors = 0;
/* Disks cannot be mmapped */
is_mmapable_internal = false;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/lib/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ab09752..77e36d6 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -52,6 +52,6 @@ all-local:
CFLAGS="$(LUA_CFLAGS)" LDFLAGS="@LUA_LDFLAGS@"
clean-local:
- test "$(top_srcdir)" != "$(top_builddir)" || (cd "$(top_builddir)/$(subdir)/luajit" && make clean)
+ test "$(top_srcdir)" != "$(top_builddir)" || (cd "$(top_builddir)/$(subdir)/luajit" && $(MAKE) clean)
test "$(top_srcdir)" = "$(top_builddir)" || rm -rf "$(top_builddir)/$(subdir)/luajit"
endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/lib/ts/Regex.h
----------------------------------------------------------------------
diff --git a/lib/ts/Regex.h b/lib/ts/Regex.h
index 734a757..f3f82ab 100644
--- a/lib/ts/Regex.h
+++ b/lib/ts/Regex.h
@@ -24,6 +24,8 @@
#ifndef __TS_REGEX_H__
#define __TS_REGEX_H__
+#include "ink_config.h"
+
#ifdef HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>
#else
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/lib/ts/ink_res_init.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_res_init.cc b/lib/ts/ink_res_init.cc
index 638e889..71a922d 100644
--- a/lib/ts/ink_res_init.cc
+++ b/lib/ts/ink_res_init.cc
@@ -262,7 +262,7 @@ ink_res_setoptions(ink_res_state statp, const char *options, const char *source
}
}
-static u_int
+static unsigned
ink_res_randomid(void) {
struct timeval now;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/lib/ts/ink_res_mkquery.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_res_mkquery.cc b/lib/ts/ink_res_mkquery.cc
index 3e01a94..b992eb5 100644
--- a/lib/ts/ink_res_mkquery.cc
+++ b/lib/ts/ink_res_mkquery.cc
@@ -308,7 +308,7 @@ ink_ns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
const u_char *cp;
char *dn, *eom;
u_char c;
- u_int n;
+ unsigned n;
int l;
cp = src;
@@ -415,7 +415,7 @@ ns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
const u_char *cp;
char *dn, *eom;
u_char c;
- u_int n;
+ unsigned n;
int l;
cp = src;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/lib/ts/ink_resolver.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_resolver.h b/lib/ts/ink_resolver.h
index 1532c40..a561797 100644
--- a/lib/ts/ink_resolver.h
+++ b/lib/ts/ink_resolver.h
@@ -200,8 +200,8 @@ parse_host_res_preference(
#ifndef NS_GET16
#define NS_GET16(s, cp) do { \
const u_char *t_cp = (const u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
+ (s) = ((uint16_t)t_cp[0] << 8) \
+ | ((uint16_t)t_cp[1]) \
; \
(cp) += NS_INT16SZ; \
} while (0)
@@ -210,10 +210,10 @@ parse_host_res_preference(
#ifndef NS_GET32
#define NS_GET32(l, cp) do { \
const u_char *t_cp = (const u_char *)(cp); \
- (l) = ((u_int32_t)t_cp[0] << 24) \
- | ((u_int32_t)t_cp[1] << 16) \
- | ((u_int32_t)t_cp[2] << 8) \
- | ((u_int32_t)t_cp[3]) \
+ (l) = ((uint32_t)t_cp[0] << 24) \
+ | ((uint32_t)t_cp[1] << 16) \
+ | ((uint32_t)t_cp[2] << 8) \
+ | ((uint32_t)t_cp[3]) \
; \
(cp) += NS_INT32SZ; \
} while (0)
@@ -221,7 +221,7 @@ parse_host_res_preference(
#ifndef NS_PUT16
#define NS_PUT16(s, cp) do { \
- u_int16_t t_s = (u_int16_t)(s); \
+ uint16_t t_s = (uint16_t)(s); \
u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_s >> 8; \
*t_cp = t_s; \
@@ -231,7 +231,7 @@ parse_host_res_preference(
#ifndef NS_PUT32
#define NS_PUT32(l, cp) do { \
- u_int32_t t_l = (u_int32_t)(l); \
+ uint32_t t_l = (uint32_t)(l); \
u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_l >> 24; \
*t_cp++ = t_l >> 16; \
@@ -246,7 +246,7 @@ struct ts_imp_res_state {
int retrans; /*%< retransmission time interval */
int retry; /*%< number of times to retransmit */
#ifdef sun
- u_int options; /*%< option flags - see below. */
+ unsigned options; /*%< option flags - see below. */
#else
u_long options; /*%< option flags - see below. */
#endif
@@ -256,7 +256,7 @@ struct ts_imp_res_state {
char *dnsrch[MAXDNSRCH+1]; /*%< components of domain to search */
char defdname[256]; /*%< default domain (deprecated) */
#ifdef sun
- u_int pfcode; /*%< RES_PRF_ flags - see below. */
+ unsigned pfcode; /*%< RES_PRF_ flags - see below. */
#else
u_long pfcode; /*%< RES_PRF_ flags - see below. */
#endif
@@ -267,9 +267,9 @@ struct ts_imp_res_state {
res_send_rhook rhook; /*%< response hook */
int res_h_errno; /*%< last one set for this context */
int _vcsock; /*%< PRIVATE: for res_send VC i/o */
- u_int _flags; /*%< PRIVATE: see below */
- u_int _pad; /*%< make _u 64 bit aligned */
- u_int16_t _nstimes[INK_MAXNS]; /*%< ms. */
+ unsigned _flags; /*%< PRIVATE: see below */
+ unsigned _pad; /*%< make _u 64 bit aligned */
+ uint16_t _nstimes[INK_MAXNS]; /*%< ms. */
};
typedef ts_imp_res_state *ink_res_state;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/plugins/cacheurl/cacheurl.cc
----------------------------------------------------------------------
diff --git a/plugins/cacheurl/cacheurl.cc b/plugins/cacheurl/cacheurl.cc
index 9698306..a1a01c3 100644
--- a/plugins/cacheurl/cacheurl.cc
+++ b/plugins/cacheurl/cacheurl.cc
@@ -25,7 +25,11 @@
#include <stdio.h>
#include <string.h>
-#include "ink_config.h"
+#include "ts/ts.h"
+#include "ts/remap.h"
+#include "ink_defs.h"
+#include <string>
+#include <vector>
#ifdef HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>
@@ -33,12 +37,6 @@
#include <pcre.h>
#endif
-#include "ts/ts.h"
-#include "ts/remap.h"
-#include "ink_defs.h"
-#include <string>
-#include <vector>
-
#define TOKENCOUNT 10
#define OVECOUNT 30
#define PLUGIN_NAME "cacheurl"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/plugins/experimental/background_fetch/background_fetch.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/background_fetch/background_fetch.cc b/plugins/experimental/background_fetch/background_fetch.cc
index f52a59d..4c18a4b 100644
--- a/plugins/experimental/background_fetch/background_fetch.cc
+++ b/plugins/experimental/background_fetch/background_fetch.cc
@@ -596,8 +596,8 @@ TSPluginInit(int argc, const char* argv[])
{
TSPluginRegistrationInfo info;
static const struct option longopt[] = {
- { "log", required_argument, NULL, 'l' },
- {NULL, no_argument, NULL, '\0' }
+ { const_cast<char *>("log"), required_argument, NULL, 'l' },
+ { NULL, no_argument, NULL, '\0' }
};
info.plugin_name = (char*)PLUGIN_NAME;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/plugins/experimental/epic/epic.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/epic/epic.cc b/plugins/experimental/epic/epic.cc
index 134b408..a05e64e 100644
--- a/plugins/experimental/epic/epic.cc
+++ b/plugins/experimental/epic/epic.cc
@@ -355,7 +355,7 @@ struct epic_sample_context
{
time_t sample_time;
FILE *sample_fp;
- char sample_host[MAXHOSTNAMELEN]; /* sysconf(_SC_HOST_NAME_MAX) */
+ char sample_host[TS_MAX_HOST_NAME_LEN]; /* sysconf(_SC_HOST_NAME_MAX) */
};
static void
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/plugins/experimental/s3_auth/s3_auth.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/s3_auth/s3_auth.cc b/plugins/experimental/s3_auth/s3_auth.cc
index c5ec0cc..38bb397 100644
--- a/plugins/experimental/s3_auth/s3_auth.cc
+++ b/plugins/experimental/s3_auth/s3_auth.cc
@@ -423,7 +423,7 @@ TSRemapNewInstance(int argc, char* argv[], void** ih, char* /* errbuf ATS_UNUSED
{ const_cast<char *>("secret_key"), required_argument, NULL, 's' },
{ const_cast<char *>("version"), required_argument, NULL, 'v' },
{ const_cast<char *>("virtual_host"), no_argument, NULL, 'h' },
- {NULL, no_argument, NULL, '\0' }
+ { NULL, no_argument, NULL, '\0' }
};
S3Config* s3 = new S3Config();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/plugins/regex_remap/regex_remap.cc
----------------------------------------------------------------------
diff --git a/plugins/regex_remap/regex_remap.cc b/plugins/regex_remap/regex_remap.cc
index 52f9119..5823af3 100644
--- a/plugins/regex_remap/regex_remap.cc
+++ b/plugins/regex_remap/regex_remap.cc
@@ -22,19 +22,12 @@
*/
#include "ts/ts.h"
#include "ts/remap.h"
-#include "ink_config.h"
#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
-#ifdef HAVE_PCRE_PCRE_H
-#include <pcre/pcre.h>
-#else
-#include <pcre.h>
-#endif
-
#include <ctype.h>
#include <unistd.h>
@@ -48,6 +41,12 @@
#include "ink_atomic.h"
#include "ink_time.h"
+#ifdef HAVE_PCRE_PCRE_H
+#include <pcre/pcre.h>
+#else
+#include <pcre.h>
+#endif
+
static const char* PLUGIN_NAME = "regex_remap";
// Constants
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/proxy/CacheControl.cc
----------------------------------------------------------------------
diff --git a/proxy/CacheControl.cc b/proxy/CacheControl.cc
index 50cb02d..6ede297 100644
--- a/proxy/CacheControl.cc
+++ b/proxy/CacheControl.cc
@@ -28,10 +28,10 @@
*
****************************************************************************/
-#include "ink_config.h"
-
#include <sys/types.h>
+#include "ink_config.h"
+
#ifdef HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>
#else
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/proxy/ControlMatcher.h
----------------------------------------------------------------------
diff --git a/proxy/ControlMatcher.h b/proxy/ControlMatcher.h
index c78db65..081b5f3 100644
--- a/proxy/ControlMatcher.h
+++ b/proxy/ControlMatcher.h
@@ -87,6 +87,13 @@
#ifndef _CONTROL_MATCHER_H_
#define _CONTROL_MATCHER_H_
+#include "DynArray.h"
+#include <ts/IpMap.h>
+
+#include "ink_defs.h"
+#include "HTTP.h"
+#include "ink_apidefs.h"
+
#ifdef HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>
#else
@@ -97,13 +104,6 @@
#include <ctype.h>
#endif
-#include "DynArray.h"
-#include <ts/IpMap.h>
-
-#include "ink_defs.h"
-#include "HTTP.h"
-#include "ink_apidefs.h"
-
class HostLookup;
struct _HttpApiInfo;
struct matcher_line;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/proxy/hdrs/HdrToken.cc
----------------------------------------------------------------------
diff --git a/proxy/hdrs/HdrToken.cc b/proxy/hdrs/HdrToken.cc
index 7080a06..06cda01 100644
--- a/proxy/hdrs/HdrToken.cc
+++ b/proxy/hdrs/HdrToken.cc
@@ -358,7 +358,7 @@ HdrTokenHashBucket hdrtoken_hash_table[HDRTOKEN_HASH_TABLE_SIZE];
/**
basic FNV hash
**/
-#define TINY_MASK(x) (((u_int32_t)1<<(x))-1)
+#define TINY_MASK(x) (((uint32_t)1<<(x))-1)
inline uint32_t
hash_to_slot(uint32_t hash)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/proxy/http/HttpConfig.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 0955e15..9d3a60d 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -37,6 +37,8 @@
#include <stdlib.h>
#include <stdio.h>
+#include "libts.h"
+
#ifdef HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>
#else
@@ -47,7 +49,6 @@
#include <ctype.h>
#endif
-#include "libts.h"
#include "HttpProxyAPIEnums.h"
#include "ProxyConfig.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/proxy/http/remap/UrlMapping.h
----------------------------------------------------------------------
diff --git a/proxy/http/remap/UrlMapping.h b/proxy/http/remap/UrlMapping.h
index 4d1340c..cd4b1e3 100644
--- a/proxy/http/remap/UrlMapping.h
+++ b/proxy/http/remap/UrlMapping.h
@@ -29,6 +29,7 @@
#include "Error.h"
#include "URL.h"
#include "RemapPluginInfo.h"
+#include "ink_config.h"
#ifdef HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b68602f/proxy/http/remap/UrlRewrite.h
----------------------------------------------------------------------
diff --git a/proxy/http/remap/UrlRewrite.h b/proxy/http/remap/UrlRewrite.h
index 8785a1a..92a20cf 100644
--- a/proxy/http/remap/UrlRewrite.h
+++ b/proxy/http/remap/UrlRewrite.h
@@ -26,6 +26,7 @@
#include "UrlMapping.h"
#include "HttpTransact.h"
+#include "ink_config.h"
#ifdef HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>