trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1236536 - in /trafficserver/traffic/trunk/lib/records: I_RecHttp.h RecHttp.cc
Date Fri, 27 Jan 2012 05:35:55 GMT
Author: amc
Date: Fri Jan 27 05:35:55 2012
New Revision: 1236536

URL: http://svn.apache.org/viewvc?rev=1236536&view=rev
Log:
TS-1077 - Fix for Solaris.

Modified:
    trafficserver/traffic/trunk/lib/records/I_RecHttp.h
    trafficserver/traffic/trunk/lib/records/RecHttp.cc

Modified: trafficserver/traffic/trunk/lib/records/I_RecHttp.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/records/I_RecHttp.h?rev=1236536&r1=1236535&r2=1236536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/records/I_RecHttp.h (original)
+++ trafficserver/traffic/trunk/lib/records/I_RecHttp.h Fri Jan 27 05:35:55 2012
@@ -255,7 +255,7 @@ public:
   static char const* const OPT_BLIND_TUNNEL; ///< Blind tunnel.
   static char const* const OPT_COMPRESSED; ///< Compressed.
 
-  static Vec<self> m_global; ///< Global ("default") data.
+  static Vec<self>& m_global; ///< Global ("default") data.
 };
 
 

Modified: trafficserver/traffic/trunk/lib/records/RecHttp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/records/RecHttp.cc?rev=1236536&r1=1236535&r2=1236536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/records/RecHttp.cc (original)
+++ trafficserver/traffic/trunk/lib/records/RecHttp.cc Fri Jan 27 05:35:55 2012
@@ -62,7 +62,15 @@ size_t const OPT_OUTBOUND_IP_PREFIX_LEN 
 size_t const OPT_INBOUND_IP_PREFIX_LEN = strlen(HttpProxyPort::OPT_INBOUND_IP_PREFIX);
 }
 
-Vec<HttpProxyPort> HttpProxyPort::m_global;
+namespace {
+// Solaris work around. On that OS the compiler will not let me use an
+// instantiated instance of Vec<self> inside the class, even if
+// static. So we have to declare it elsewhere and then import via
+// reference. Might be a problem with Vec<> creating a fixed array
+// rather than allocating on first use (compared to std::vector<>).
+  HttpProxyPort::Group GLOBAL_DATA;
+}
+HttpProxyPort::Group& HttpProxyPort::m_global = GLOBAL_DATA;
 
 HttpProxyPort::HttpProxyPort()
   : m_fd(ts::NO_FD)



Mime
View raw message