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 2013/04/01 20:28:33 UTC

git commit: TS-1772: Remove multiple TS_INLINE defines

Updated Branches:
  refs/heads/master c9647a95c -> 7ca19476f


TS-1772: Remove multiple TS_INLINE defines

It took me a couple of tries to understand what the Inline.cc files
were for, but it's actually not necessary for TS_INLINE to be defined
in many different places. All we need to do to get correct inlining
is define an extern version, and make an inline version available
in a header. Forward declarations should be extern, not TS_INLINE.


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

Branch: refs/heads/master
Commit: 7ca19476f5e0b52f9d65cb11df051c045b832542
Parents: c9647a9
Author: James Peach <jp...@apache.org>
Authored: Mon Apr 1 11:18:34 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Mon Apr 1 11:25:23 2013 -0700

----------------------------------------------------------------------
 CHANGES                            |    2 +
 iocore/aio/I_AIO.h                 |    4 --
 iocore/aio/Inline.cc               |    3 +-
 iocore/aio/P_AIO.h                 |    5 ---
 iocore/cache/I_Cache.h             |    4 --
 iocore/cache/Inline.cc             |    3 +-
 iocore/cache/P_Cache.h             |    5 ---
 iocore/cluster/Inline.cc           |    3 +-
 iocore/cluster/P_Cluster.h         |    5 ---
 iocore/dns/I_DNS.h                 |    4 --
 iocore/dns/Inline.cc               |    3 +-
 iocore/dns/P_DNS.h                 |    5 ---
 iocore/eventsystem/I_EThread.h     |    2 +-
 iocore/eventsystem/I_EventSystem.h |    4 --
 iocore/eventsystem/I_IOBuffer.h    |   58 ++++++++++++++++---------------
 iocore/eventsystem/I_Thread.h      |    6 ++--
 iocore/eventsystem/Inline.cc       |    3 +-
 iocore/eventsystem/P_EventSystem.h |    5 ---
 iocore/eventsystem/P_VConnection.h |    2 +-
 iocore/hostdb/I_HostDB.h           |    4 --
 iocore/hostdb/Inline.cc            |    3 +-
 iocore/hostdb/P_HostDB.h           |    5 ---
 iocore/net/I_Net.h                 |    4 --
 iocore/net/I_UDPConnection.h       |    2 +-
 iocore/net/I_UDPPacket.h           |    8 ++--
 iocore/net/Inline.cc               |    3 +-
 iocore/net/P_Net.h                 |    5 ---
 lib/ts/ink_apidefs.h               |    4 ++
 28 files changed, 53 insertions(+), 111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2a46a2c..e46667e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
   Changes with Apache Traffic Server 3.3.2
 
 
+  *) [TS-1772] Remove multiple TS_INLINE defines
+
   *) [TS-1771] add http_load to the build
 
   *) [TS-1766] integrate AIO test into the autotools test suite

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/aio/I_AIO.h
----------------------------------------------------------------------
diff --git a/iocore/aio/I_AIO.h b/iocore/aio/I_AIO.h
index 28e303b..8d4cd2b 100644
--- a/iocore/aio/I_AIO.h
+++ b/iocore/aio/I_AIO.h
@@ -31,10 +31,6 @@
 #if !defined (_I_AIO_h_)
 #define _I_AIO_h_
 
-#ifndef TS_INLINE
-#define TS_INLINE
-#endif
-
 #include "libts.h"
 #include "I_EventSystem.h"
 #include "I_RecProcess.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/aio/Inline.cc
----------------------------------------------------------------------
diff --git a/iocore/aio/Inline.cc b/iocore/aio/Inline.cc
index f731ec5..8e9b6d3 100644
--- a/iocore/aio/Inline.cc
+++ b/iocore/aio/Inline.cc
@@ -25,7 +25,6 @@
  * Inline Functions as globals for users using the public interface
  *
  */
-#define TS_INLINE
-#define INLINE_CC
 
+#define TS_INLINE
 #include "P_AIO.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/aio/P_AIO.h
----------------------------------------------------------------------
diff --git a/iocore/aio/P_AIO.h b/iocore/aio/P_AIO.h
index 758274e..2d686e3 100644
--- a/iocore/aio/P_AIO.h
+++ b/iocore/aio/P_AIO.h
@@ -31,11 +31,6 @@
 #ifndef _P_AIO_h_
 #define _P_AIO_h_
 
-#ifndef INLINE_CC
-#undef  TS_INLINE
-#define TS_INLINE inline
-#endif
-
 #include "P_EventSystem.h"
 #include "I_AIO.h"
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/cache/I_Cache.h
----------------------------------------------------------------------
diff --git a/iocore/cache/I_Cache.h b/iocore/cache/I_Cache.h
index e551854..7b3fd72 100644
--- a/iocore/cache/I_Cache.h
+++ b/iocore/cache/I_Cache.h
@@ -24,10 +24,6 @@
 #ifndef _I_CACHE_H__
 #define _I_CACHE_H__
 
-#ifndef TS_INLINE
-#define TS_INLINE
-#endif
-
 #include "libts.h"
 #include "I_EventSystem.h"
 #include "I_AIO.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/cache/Inline.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Inline.cc b/iocore/cache/Inline.cc
index 9a9d375..c1b63c4 100644
--- a/iocore/cache/Inline.cc
+++ b/iocore/cache/Inline.cc
@@ -25,9 +25,8 @@
  * Inline Functions as globals for users using the public interface
  *
  */
-#define TS_INLINE
-#define INLINE_CC
 
+#define TS_INLINE
 #include "P_Cache.h"
 
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/cache/P_Cache.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_Cache.h b/iocore/cache/P_Cache.h
index a72868c..ed738e3 100644
--- a/iocore/cache/P_Cache.h
+++ b/iocore/cache/P_Cache.h
@@ -24,11 +24,6 @@
 #ifndef _P_CACHE_H__
 #define _P_CACHE_H__
 
-#ifndef INLINE_CC
-#undef  TS_INLINE
-#define TS_INLINE inline
-#endif
-
 #include "libts.h"
 #include "P_EventSystem.h"
 #include "P_AIO.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/cluster/Inline.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/Inline.cc b/iocore/cluster/Inline.cc
index a4a23d0..63ce713 100644
--- a/iocore/cluster/Inline.cc
+++ b/iocore/cluster/Inline.cc
@@ -25,7 +25,6 @@
  * Inline Functions as globals for users using the public interface
  *
  */
-#define TS_INLINE
-#define INLINE_CC
 
+#define TS_INLINE
 #include "P_Cluster.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/cluster/P_Cluster.h
----------------------------------------------------------------------
diff --git a/iocore/cluster/P_Cluster.h b/iocore/cluster/P_Cluster.h
index 47865ed..f6049f6 100644
--- a/iocore/cluster/P_Cluster.h
+++ b/iocore/cluster/P_Cluster.h
@@ -24,11 +24,6 @@
 #ifndef _P_CLUSTER_H__
 #define _P_CLUSTER_H__
 
-#ifndef INLINE_CC
-#undef  TS_INLINE
-#define TS_INLINE inline
-#endif
-
 #include "libts.h"
 #include "P_EventSystem.h"
 #include "I_RecProcess.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/dns/I_DNS.h
----------------------------------------------------------------------
diff --git a/iocore/dns/I_DNS.h b/iocore/dns/I_DNS.h
index 52ab535..9d7fded 100644
--- a/iocore/dns/I_DNS.h
+++ b/iocore/dns/I_DNS.h
@@ -32,10 +32,6 @@
 #ifndef _I_DNS_h_
 #define _I_DNS_h_
 
-#ifndef TS_INLINE
-#define TS_INLINE
-#endif
-
 #include "I_EventSystem.h"
 #include "I_HostDB.h"
 #include "I_Net.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/dns/Inline.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/Inline.cc b/iocore/dns/Inline.cc
index faf6903..7ced38a 100644
--- a/iocore/dns/Inline.cc
+++ b/iocore/dns/Inline.cc
@@ -25,9 +25,8 @@
  * Inline Functions as globals for users using the public interface
  *
  */
-#define TS_INLINE
-#define INLINE_CC
 
+#define TS_INLINE
 #include "P_DNS.h"
 
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/dns/P_DNS.h
----------------------------------------------------------------------
diff --git a/iocore/dns/P_DNS.h b/iocore/dns/P_DNS.h
index b1bd47b..632367c 100644
--- a/iocore/dns/P_DNS.h
+++ b/iocore/dns/P_DNS.h
@@ -30,11 +30,6 @@
 #if !defined (_P_DNS_h_)
 #define _P_DNS_h_
 
-#ifndef INLINE_CC
-#undef  TS_INLINE
-#define TS_INLINE inline
-#endif
-
 #include "libts.h"
 #include "I_DNS.h"
 #include "P_EventSystem.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/eventsystem/I_EThread.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_EThread.h b/iocore/eventsystem/I_EThread.h
index 78c26d9..52837a2 100644
--- a/iocore/eventsystem/I_EThread.h
+++ b/iocore/eventsystem/I_EThread.h
@@ -358,5 +358,5 @@ new(size_t, ink_dummy_for_new *p)
 }
 #define ETHREAD_GET_PTR(thread, offset) ((void*)((char*)(thread)+(offset)))
 
-TS_INLINE EThread *this_ethread();
+extern EThread *this_ethread();
 #endif /*_EThread_h_*/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/eventsystem/I_EventSystem.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_EventSystem.h b/iocore/eventsystem/I_EventSystem.h
index cb1481e..eb6da6e 100644
--- a/iocore/eventsystem/I_EventSystem.h
+++ b/iocore/eventsystem/I_EventSystem.h
@@ -25,10 +25,6 @@
 #ifndef _I_EventSystem_h
 #define _I_EventSystem_h
 
-#ifndef TS_INLINE
-#define TS_INLINE
-#endif
-
 #include "libts.h"
 
 #include "I_IOBuffer.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/eventsystem/I_IOBuffer.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_IOBuffer.h b/iocore/eventsystem/I_IOBuffer.h
index a6b8b01..23a2ddc 100644
--- a/iocore/eventsystem/I_IOBuffer.h
+++ b/iocore/eventsystem/I_IOBuffer.h
@@ -54,7 +54,9 @@ inkcoreapi extern int64_t max_iobuffer_size;
 extern int64_t default_small_iobuffer_size;
 extern int64_t default_large_iobuffer_size; // matched to size of OS buffers
 
-#define TRACK_BUFFER_USER
+#if !defined(TRACK_BUFFER_USER)
+#define TRACK_BUFFER_USER 1
+#endif
 
 enum AllocType
 { NO_ALLOC, FAST_ALLOCATED, XMALLOCED, MEMALIGNED,
@@ -1204,7 +1206,7 @@ private:
   MIOBufferAccessor & operator =(const MIOBufferAccessor &);
 };
 
-TS_INLINE MIOBuffer * new_MIOBuffer_internal(
+extern MIOBuffer * new_MIOBuffer_internal(
 #ifdef TRACK_BUFFER_USER
                                           const char *loc,
 #endif
@@ -1226,11 +1228,11 @@ public:
 };
 #endif
 
-TS_INLINE MIOBuffer * new_empty_MIOBuffer_internal(
+extern MIOBuffer * new_empty_MIOBuffer_internal(
 #ifdef TRACK_BUFFER_USER
-                                                     const char *loc,
+  const char *loc,
 #endif
-                                                     int64_t size_index = default_large_iobuffer_size);
+  int64_t size_index = default_large_iobuffer_size);
 
 #ifdef TRACK_BUFFER_USER
 class Empty_MIOBuffer_tracker
@@ -1255,19 +1257,20 @@ public:
 #define new_MIOBuffer               new_MIOBuffer_internal
 #define new_empty_MIOBuffer         new_empty_MIOBuffer_internal
 #endif
-TS_INLINE void free_MIOBuffer(MIOBuffer * mio);
+extern void free_MIOBuffer(MIOBuffer * mio);
 //////////////////////////////////////////////////////////////////////
 
-TS_INLINE IOBufferBlock * new_IOBufferBlock_internal(
+extern IOBufferBlock * new_IOBufferBlock_internal(
 #ifdef TRACK_BUFFER_USER
-                                                       const char *loc
+  const char *loc
 #endif
-  );
-TS_INLINE IOBufferBlock * new_IOBufferBlock_internal(
+);
+
+extern IOBufferBlock * new_IOBufferBlock_internal(
 #ifdef TRACK_BUFFER_USER
-                                                       const char *loc,
+  const char *loc,
 #endif
-                                                       IOBufferData * d, int64_t len = 0, int64_t offset = 0);
+  IOBufferData * d, int64_t len = 0, int64_t offset = 0);
 
 #ifdef TRACK_BUFFER_USER
 class IOBufferBlock_tracker
@@ -1297,25 +1300,24 @@ public:
 #endif
 ////////////////////////////////////////////////////////////
 
-TS_INLINE IOBufferData *new_IOBufferData_internal(
+extern IOBufferData *new_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
-                                                    const char *location,
+  const char *location,
 #endif
-                                                    int64_t size_index = default_large_iobuffer_size,
-                                                    AllocType type = DEFAULT_ALLOC);
+  int64_t size_index = default_large_iobuffer_size,
+  AllocType type = DEFAULT_ALLOC);
 
-TS_INLINE IOBufferData *new_xmalloc_IOBufferData_internal(
+extern IOBufferData *new_xmalloc_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
-                                                            const char *location,
+  const char *location,
 #endif
-                                                            void *b, int64_t size);
+  void *b, int64_t size);
 
-TS_INLINE IOBufferData *new_constant_IOBufferData_internal(
+extern IOBufferData *new_constant_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
-                                                             const char *loc,
+  const char *locaction,
 #endif
-                                                             void *b, int64_t size);
-
+  void *b, int64_t size);
 
 #ifdef TRACK_BUFFER_USER
 class IOBufferData_tracker
@@ -1323,7 +1325,7 @@ class IOBufferData_tracker
   const char *loc;
 
 public:
-    IOBufferData_tracker(const char *_loc):loc(_loc)
+  IOBufferData_tracker(const char *_loc):loc(_loc)
   {
   }
   IOBufferData *operator() (int64_t size_index = default_large_iobuffer_size, AllocType type = DEFAULT_ALLOC) {
@@ -1347,8 +1349,8 @@ new_constant_IOBufferData_internal(RES_PATH("memory/IOBuffer/"), \
 #define  new_constant_IOBufferData new_constant_IOBufferData_internal
 #endif
 
-TS_INLINE int64_t iobuffer_size_to_index(int64_t size, int64_t max = max_iobuffer_size);
-TS_INLINE int64_t index_to_buffer_size(int64_t idx);
+extern int64_t iobuffer_size_to_index(int64_t size, int64_t max = max_iobuffer_size);
+extern int64_t index_to_buffer_size(int64_t idx);
 /**
   Clone a IOBufferBlock chain. Used to snarf a IOBufferBlock chain
   w/o copy.
@@ -1359,7 +1361,7 @@ TS_INLINE int64_t index_to_buffer_size(int64_t idx);
   @return ptr to head of new IOBufferBlock chain.
 
 */
-TS_INLINE IOBufferBlock *iobufferblock_clone(IOBufferBlock * b, int64_t offset, int64_t len);
+extern IOBufferBlock *iobufferblock_clone(IOBufferBlock * b, int64_t offset, int64_t len);
 /**
   Skip over specified bytes in chain. Used for dropping references.
 
@@ -1371,5 +1373,5 @@ TS_INLINE IOBufferBlock *iobufferblock_clone(IOBufferBlock * b, int64_t offset,
   @return ptr to head of new IOBufferBlock chain.
 
 */
-TS_INLINE IOBufferBlock *iobufferblock_skip(IOBufferBlock * b, int64_t *poffset, int64_t *plen, int64_t write);
+extern IOBufferBlock *iobufferblock_skip(IOBufferBlock * b, int64_t *poffset, int64_t *plen, int64_t write);
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/eventsystem/I_Thread.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_Thread.h b/iocore/eventsystem/I_Thread.h
index 9aa9a95..9f21937 100644
--- a/iocore/eventsystem/I_Thread.h
+++ b/iocore/eventsystem/I_Thread.h
@@ -135,8 +135,8 @@ public:
   {  }
 };
 
-TS_INLINE ink_hrtime ink_get_hrtime();
-TS_INLINE ink_hrtime ink_get_based_hrtime();
-TS_INLINE Thread *this_thread();
+extern ink_hrtime ink_get_hrtime();
+extern ink_hrtime ink_get_based_hrtime();
+extern Thread *this_thread();
 
 #endif /*_I_Thread_h*/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/eventsystem/Inline.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/Inline.cc b/iocore/eventsystem/Inline.cc
index 3d52e0b..87d810e 100644
--- a/iocore/eventsystem/Inline.cc
+++ b/iocore/eventsystem/Inline.cc
@@ -25,8 +25,7 @@
  * Inline Functions as globals for users using the public interface
  *
  */
-#define TS_INLINE
-#define INLINE_CC
 
+#define TS_INLINE
 #include "P_EventSystem.h"
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/eventsystem/P_EventSystem.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/P_EventSystem.h b/iocore/eventsystem/P_EventSystem.h
index b2b5ed5..d54e916 100644
--- a/iocore/eventsystem/P_EventSystem.h
+++ b/iocore/eventsystem/P_EventSystem.h
@@ -31,11 +31,6 @@
 #ifndef _P_EventSystem_h
 #define _P_EventSystem_h
 
-#ifndef INLINE_CC
-#undef  TS_INLINE
-#define TS_INLINE inline
-#endif
-
 #include "libts.h"
 
 #include "I_EventSystem.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/eventsystem/P_VConnection.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/P_VConnection.h b/iocore/eventsystem/P_VConnection.h
index b18c3d2..89945c1 100644
--- a/iocore/eventsystem/P_VConnection.h
+++ b/iocore/eventsystem/P_VConnection.h
@@ -83,7 +83,7 @@ VConnection()
 //
 //////////////////////////////////////////////////////////////////////////////
 
-static TS_INLINE VIO *
+TS_INLINE VIO *
 vc_do_io_write(VConnection * vc, Continuation * cont, int64_t nbytes, MIOBuffer * buf, int64_t offset)
 {
   IOBufferReader *reader = buf->alloc_reader();

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/hostdb/I_HostDB.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/I_HostDB.h b/iocore/hostdb/I_HostDB.h
index 32d8ff8..80f3886 100644
--- a/iocore/hostdb/I_HostDB.h
+++ b/iocore/hostdb/I_HostDB.h
@@ -32,10 +32,6 @@
 #ifndef _I_HostDB_h_
 #define _I_HostDB_h_
 
-#ifndef TS_INLINE
-#define TS_INLINE
-#endif
-
 #include "I_EventSystem.h"
 #include "I_Net.h"
 #include "I_Cache.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/hostdb/Inline.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/Inline.cc b/iocore/hostdb/Inline.cc
index b30d411..e93e860 100644
--- a/iocore/hostdb/Inline.cc
+++ b/iocore/hostdb/Inline.cc
@@ -25,9 +25,8 @@
  * Inline Functions as globals for users using only the interface
  *
  */
-#define TS_INLINE
-#define INLINE_CC
 
+#define TS_INLINE
 #include "P_HostDB.h"
 
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/hostdb/P_HostDB.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/P_HostDB.h b/iocore/hostdb/P_HostDB.h
index 548226b..1973597 100644
--- a/iocore/hostdb/P_HostDB.h
+++ b/iocore/hostdb/P_HostDB.h
@@ -31,11 +31,6 @@
 #ifndef _P_HostDB_h_
 #define _P_HostDB_h_
 
-#ifndef INLINE_CC
-#undef  TS_INLINE
-#define TS_INLINE inline
-#endif
-
 #include "libts.h"
 
 #ifdef SPLIT_DNS

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/net/I_Net.h
----------------------------------------------------------------------
diff --git a/iocore/net/I_Net.h b/iocore/net/I_Net.h
index a00c966..d6464e5 100644
--- a/iocore/net/I_Net.h
+++ b/iocore/net/I_Net.h
@@ -41,10 +41,6 @@
 #ifndef __I_NET_H_
 #define __I_NET_H_
 
-#ifndef TS_INLINE
-#define TS_INLINE
-#endif
-
 #include "I_Version.h"
 #include "I_EventSystem.h"
 #include <netinet/in.h>

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/net/I_UDPConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/I_UDPConnection.h b/iocore/net/I_UDPConnection.h
index 9b835f6..ab55181 100644
--- a/iocore/net/I_UDPConnection.h
+++ b/iocore/net/I_UDPConnection.h
@@ -109,5 +109,5 @@ public:
   virtual void UDPConnection_is_abstract() = 0;
 };
 
-TS_INLINE UDPConnection *new_UDPConnection(int fd);
+extern UDPConnection *new_UDPConnection(int fd);
 #endif //__I_UDPCONNECTION_H_

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/net/I_UDPPacket.h
----------------------------------------------------------------------
diff --git a/iocore/net/I_UDPPacket.h b/iocore/net/I_UDPPacket.h
index f248e7a..ec50b9e 100644
--- a/iocore/net/I_UDPPacket.h
+++ b/iocore/net/I_UDPPacket.h
@@ -83,7 +83,7 @@ public:
    @param buf if !NULL, then len bytes copied from buf and made into packet.
    @param len # of bytes to copy from buf
  */
-TS_INLINE UDPPacket *new_UDPPacket(struct sockaddr const* to, ink_hrtime when = 0, char *buf = NULL, int len = 0);
+extern UDPPacket *new_UDPPacket(struct sockaddr const* to, ink_hrtime when = 0, char *buf = NULL, int len = 0);
 /**
    Create a new packet to be sent over UDPConnection. This clones and
    makes a reference to an existing IOBufferBlock chain.
@@ -95,19 +95,19 @@ TS_INLINE UDPPacket *new_UDPPacket(struct sockaddr const* to, ink_hrtime when =
    for packet
    @param len # of bytes to reference from block
  */
-TS_INLINE UDPPacket *new_UDPPacket(struct sockaddr const* to,
+extern UDPPacket *new_UDPPacket(struct sockaddr const* to,
                                     ink_hrtime when = 0, IOBufferBlock * block = NULL, int len = 0);
 /**
    Create a new packet to be sent over UDPConnection.  Packet has no
    destination or data.
 */
-TS_INLINE UDPPacket *new_UDPPacket();
+extern UDPPacket *new_UDPPacket();
 
 /**
    Create a new packet to be delivered to application.
    Internal function only
 */
-TS_INLINE UDPPacket *new_incoming_UDPPacket(struct sockaddr* from, char *buf, int len);
+extern UDPPacket *new_incoming_UDPPacket(struct sockaddr* from, char *buf, int len);
 
 //@}
 #endif //__I_UDPPACKET_H_

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/net/Inline.cc
----------------------------------------------------------------------
diff --git a/iocore/net/Inline.cc b/iocore/net/Inline.cc
index ac73c94..f8d0413 100644
--- a/iocore/net/Inline.cc
+++ b/iocore/net/Inline.cc
@@ -25,8 +25,7 @@
  * Inline Functions as globals for users using the public interface
  *
  */
-#define TS_INLINE
-#define INLINE_CC
 
+#define TS_INLINE
 #include "P_Net.h"
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/iocore/net/P_Net.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_Net.h b/iocore/net/P_Net.h
index 39a49af..13ab617 100644
--- a/iocore/net/P_Net.h
+++ b/iocore/net/P_Net.h
@@ -30,11 +30,6 @@
 #ifndef __P_NET_H__
 #define __P_NET_H__
 
-#ifndef INLINE_CC
-#undef  TS_INLINE
-#define TS_INLINE inline
-#endif
-
 // Net Stats
 
 enum Net_Stats

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7ca19476/lib/ts/ink_apidefs.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_apidefs.h b/lib/ts/ink_apidefs.h
index a66316e..33c0f6f 100644
--- a/lib/ts/ink_apidefs.h
+++ b/lib/ts/ink_apidefs.h
@@ -63,4 +63,8 @@
 #endif
 #endif
 
+#if !defined(TS_INLINE)
+#define TS_INLINE inline
+#endif
+
 #endif