You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/22 20:29:13 UTC

svn commit: r947319 - in /trafficserver/traffic/trunk: ./ build/ iocore/cache/ iocore/eventsystem/ iocore/net/ libinktomi++/ proxy/ proxy/mgmt2/

Author: mturk
Date: Sat May 22 18:29:12 2010
New Revision: 947319

URL: http://svn.apache.org/viewvc?rev=947319&view=rev
Log:
TS-366: Always define features and libraries as 1 or 0

Modified:
    trafficserver/traffic/trunk/build/common.m4
    trafficserver/traffic/trunk/build/dbd.m4
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc
    trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h
    trafficserver/traffic/trunk/iocore/eventsystem/UnixEThread.cc
    trafficserver/traffic/trunk/iocore/net/P_UnixNet.h
    trafficserver/traffic/trunk/iocore/net/P_UnixPollDescriptor.h
    trafficserver/traffic/trunk/iocore/net/UnixNet.cc
    trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc
    trafficserver/traffic/trunk/libinktomi++/Diags.h
    trafficserver/traffic/trunk/libinktomi++/ink_config.h.in
    trafficserver/traffic/trunk/libinktomi++/ink_platform.h
    trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc
    trafficserver/traffic/trunk/proxy/CoreUtils.h
    trafficserver/traffic/trunk/proxy/Main.cc
    trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
    trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h
    trafficserver/traffic/trunk/proxy/signals.cc

Modified: trafficserver/traffic/trunk/build/common.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/common.m4?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/build/common.m4 (original)
+++ trafficserver/traffic/trunk/build/common.m4 Sat May 22 18:29:12 2010
@@ -521,7 +521,7 @@ AC_DEFUN([ATS_FLAG_FUNCS], [
 AC_CHECK_FUNCS($1)
 for tsc_j in $1
 do
-    tsc_3="have_$tsc_j"
+    tsc_3="has_$tsc_j"
     if eval "test \"`echo '$ac_cv_func_'$tsc_j`\" = yes"; then
        eval "$tsc_3=1"
     else

Modified: trafficserver/traffic/trunk/build/dbd.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/dbd.m4?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/build/dbd.m4 (original)
+++ trafficserver/traffic/trunk/build/dbd.m4 Sat May 22 18:29:12 2010
@@ -73,7 +73,6 @@ else
   fi
 fi
 
-sqlite3h=0
 if test "$enable_sqlite3" != "no"; then
   saved_ldflags=$LDFLAGS
   saved_cppflags=$CPPFLAGS
@@ -101,7 +100,6 @@ if test "$enable_sqlite3" != "no"; then
     LDFLAGS=$saved_ldflags
   fi
 fi
-AC_SUBST(sqlite3h)
 ])
 
 dnl
@@ -159,8 +157,6 @@ else
   fi
 fi
 
-db_185h=0
-dbh=0
 if test "$enable_libdb" != "no"; then
   saved_ldflags=$LDFLAGS
   saved_cppflags=$CPPFLAGS
@@ -189,7 +185,4 @@ if test "$enable_libdb" != "no"; then
     LDFLAGS=$saved_ldflags
   fi
 fi
-AC_SUBST(db_185h)
-AC_SUBST(dbh)
-
 ])

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Sat May 22 18:29:12 2010
@@ -136,16 +136,16 @@ AC_MSG_RESULT([$enable_debug])
 # Diags
 #
 
+use_diags=0
 AC_MSG_CHECKING([whether to enable diags])
 AC_ARG_ENABLE([diags],
   [AS_HELP_STRING([--disable-diags],[turn off diags])],
   [],
-  [enable_diags="yes"]
-)
-AC_MSG_RESULT([$enable_diags])
-AS_IF([test "x$enable_diags" = "xyes"],
-  [AC_DEFINE([USE_DIAGS])]
+  [enable_diags="yes"
+   use_diags=1
+  ]
 )
+AC_SUBST(use_diags)
 
 #
 # Purify
@@ -668,6 +668,9 @@ fi
 #
 # Check for default sqlite3 DB backend
 #
+sqlite3h=0
+db_185h=0
+dbh=0
 ATS_CHECK_SQLITE3
 if test "x${enable_sqlite3}" != "xyes"; then
   ATS_CHECK_BDB
@@ -675,13 +678,18 @@ if test "x${enable_sqlite3}" != "xyes"; 
     AC_MSG_ERROR([Need at least one DB backend, --with-sqlite3 and --with-libdb are supported])
   fi
 fi
+AC_SUBST(sqlite3h)
+AC_SUBST(db_185h)
+AC_SUBST(dbh)
 
 ATS_FLAG_FUNCS([clock_gettime kqueue epoll_ctl posix_memalign lrand48_r srand48_r port_create])
 ATS_FLAG_FUNCS([strndup])
 
+has_eventfd=0
 AS_IF([test "x$enable_eventfd" = "xyes"],
   [ATS_FLAG_FUNCS([eventfd])]
 )
+AC_SUBST(has_eventfd)
 
 #
 # Check for pcre library
@@ -691,6 +699,7 @@ if test "x${enable_pcre}" != "xyes"; the
   AC_MSG_ERROR([Cannot find pcre library. Configure --with-pcre=DIR])
 fi
 
+has_backtrace=0
 # Check for backtrace() support
 AC_CHECK_HEADERS([execinfo.h], [have_backtrace=yes],[])
 if test "x${have_backtrace}" = "xyes"; then
@@ -699,40 +708,50 @@ if test "x${have_backtrace}" = "xyes"; t
                                          AC_SUBST([LIBEXECINFO],["-lexecinfo"])])
   if test "x${have_backtrace_lib}" = "xyes"; then
     AC_MSG_NOTICE([Using backtrace library '-lexecinfo'])
+    has_backtrace=1
   fi
-  AC_DEFINE(HAVE_BACKTRACE, 1, [Define if you have backtrace()])
 else
   AC_MSG_WARN([No backtrace() support found])
 fi
-AC_SUBST(HAVE_BACKTRACE)
+AC_SUBST(has_backtrace)
 
+use_libev=0
+use_epoll=0
+use_kqueue=0
+use_port=0
 if test "x$enable_libev" = "xyes"; then
-  AC_DEFINE([USE_LIBEV])
+  use_libev=1
   have_good_poller=1
 elif test "$ac_cv_func_epoll_ctl" = "yes"; then
-  AC_DEFINE([USE_EPOLL])
+  use_epoll=1
   have_good_poller=1
   AC_MSG_NOTICE([Using epoll event interface])
 elif test "$ac_cv_func_kqueue" = "yes"; then
-  AC_DEFINE([USE_KQUEUE])
+  use_kqueue=1
   have_good_poller=1
   AC_MSG_NOTICE([Using kqueue event interface])
 elif test "$ac_cv_func_port_create" = "yes"; then
-  AC_DEFINE([USE_PORT])
+  use_port=1
   have_good_poller=1
   AC_MSG_NOTICE([Using port event interface])
 else
   AC_MSG_FAILURE([No suitable polling interface found])
 fi
+AC_SUBST(use_libev)
+AC_SUBST(use_epoll)
+AC_SUBST(use_kqueue)
+AC_SUBST(use_port)
 
+has_profiler=0
 if test "x${with_profiler}" = "xyes"; then
   AC_CHECK_LIB([profiler], [ProfilerStart],
     [AC_SUBST([LIBPROFILER], ["-lprofiler"])
-     AC_DEFINE([HAVE_PROFILER])
+     has_profiler=1
     ],
     [AC_MSG_FAILURE([check for profiler failed. Have you installed google-perftools-devel?])],
   )
 fi
+AC_SUBST(has_profiler)
 
 # For SunPro 5.2 - we need the demangle symbol for
 #  ink_stack_trace.cc in libinktomi++.  Because this
@@ -749,6 +768,7 @@ AC_SUBST([LIBDEMANGLE])
 AC_LANG_POP
 
 
+need_union_semun=0
 # It's stupid, but not all platforms have union semun, even those that need it.
 AC_MSG_CHECKING(for union semun in sys/sem.h)
 AC_TRY_COMPILE([
@@ -758,16 +778,13 @@ AC_TRY_COMPILE([
 ],[
 union semun arg;
 semctl(0, 0, 0, arg);
-], [have_union_semun="1" union_semun=yes ]
+], [union_semun=yes]
 msg=yes, [
-have_union_semun="0"
+need_union_semun="1"
 msg=no ] )
 AC_MSG_RESULT([$msg])
 
-if test "$have_union_semun" = "0"; then
-  AC_DEFINE([NEED_UNION_SEMUN])
-fi
-
+AC_SUBST(need_union_semun)
 
 # -----------------------------------------------------------------------------
 # 5. CHECK FOR HEADER FILES
@@ -1040,24 +1057,13 @@ AH_TEMPLATE([INK_SINGLE_THREADED],[Disab
 AH_TEMPLATE([INK_USE_MUTEX_FOR_ATOMICLISTS],[Use mutex for atomic lists.])
 AH_TEMPLATE([INK_USE_MUTEX_FOR_FREELISTS],[Use mutex for free lists.])
 AH_TEMPLATE([MODULARIZED],[Build modularized Trafficserver.])
-AH_TEMPLATE([NEED_UNION_SEMUN],[Define to 1 if sys/sem.h declares 'union semun'])
 AH_TEMPLATE([PURIFY],[Define to 1 if support for Purify was enabled.])
 AH_TEMPLATE([TS_MICRO],[Define to 1 if building 'micro' Trafficserver distribution.])
-AH_TEMPLATE([USE_DIAGS],[Use diagnostics support.])
-AH_TEMPLATE([USE_EPOLL],[Use epoll for  I/O event notification.])
-AH_TEMPLATE([USE_KQUEUE],[Use kqueue for  I/O event notification.])
-AH_TEMPLATE([USE_LIBEV],[Define to 1 if using libev.])
 AH_TEMPLATE([USE_MD5_FOR_MMH],[Use MD5 for MMH])
-AH_TEMPLATE([USE_PORT],[Use port for  I/O event notification.])
 AH_TEMPLATE([_NO_FREELIST],[Disable free list support.])
-AH_TEMPLATE([darwin],[Define to 1 if compiling for darwin.])
-AH_TEMPLATE([freebsd],[Define to 1 if compiling for freebsd.])
-AH_TEMPLATE([linux],[Define to 1 if compiling for linux.])
-AH_TEMPLATE([solaris],[Define to 1 if compiling for solaris.])
 AH_TEMPLATE([FIXME_NONMODULAR],[FIXME_NONMODULAR])
 AH_TEMPLATE([SPLIT_DNS],[Compile with 'split' DNS support.])
 AH_TEMPLATE([NON_MODULAR],[Compile without modular support.])
-AH_TEMPLATE([HAVE_PROFILER],[Define to 1 if you have Google profiler library.])
 
 AC_OUTPUT
 

Modified: trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc Sat May 22 18:29:12 2010
@@ -25,10 +25,10 @@
 // See https://cwiki.apache.org/confluence/display/TS/RamCache
 
 #include "P_Cache.h"
-#ifdef HAVE_LIBZ
+#if ATS_HAVE_ZLIB_H
 #include <zlib.h>
 #endif
-#ifdef HAVE_LZMA
+#if ATS_HAVE_LZMA_H
 #include <lzma.h>
 #endif
 
@@ -175,7 +175,7 @@ int RamCacheCLFUS::get(INK_MD5 *key, Ptr
                 goto Lfailed;
               break;
             }
-#if HAVE_LIBZ
+#if ATS_HAVE_ZLIB_H
             case CACHE_COMPRESSION_LIBZ: {
               uLongf l = e->len;
               if (Z_OK != uncompress((Bytef*)b, &l, (Bytef*)e->data->data(), e->compressed_len))
@@ -183,7 +183,7 @@ int RamCacheCLFUS::get(INK_MD5 *key, Ptr
               break;
             }
 #endif
-#ifdef HAVE_LZMA
+#if ATS_HAVE_LZMA_H
             case CACHE_COMPRESSION_LIBLZMA: {
               size_t l = (size_t)e->len, ipos = 0, opos = 0;
               uint64_t memlimit = e->len * 2 + LZMA_BASE_MEMLIMIT;
@@ -322,10 +322,10 @@ void RamCacheCLFUS::compress_entries(int
       switch (ctype) {
         default: goto Lcontinue;
         case CACHE_COMPRESSION_FASTLZ: l = (uLongf)((double)e->len * 1.05 + 66); break;
-#ifdef HAVE_LIBZ
+#if ATS_HAVE_ZLIB_H
         case CACHE_COMPRESSION_LIBZ: l = compressBound(e->len); break;
 #endif
-#ifdef HAVE_LZMA
+#if ATS_HAVE_LZMA_H
         case CACHE_COMPRESSION_LIBLZMA: l = e->len; break;
 #endif
       }
@@ -337,7 +337,7 @@ void RamCacheCLFUS::compress_entries(int
           if ((l = fastlz_compress(e->data->data(), e->len, b)) <= 0)
             goto Lfailed;
           break;
-#if HAVE_LIBZ
+#if ATS_HAVE_ZLIB_H
         case CACHE_COMPRESSION_LIBZ: {
           uLongf ll = l;
           if ((Z_OK != compress((Bytef*)b, &ll, (Bytef*)e->data->data(), e->len)))
@@ -346,7 +346,7 @@ void RamCacheCLFUS::compress_entries(int
           break;
         }
 #endif
-#ifdef HAVE_LZMA
+#if ATS_HAVE_LZMA_H
         case CACHE_COMPRESSION_LIBLZMA: {
           size_t pos = 0, ll = l;
           if (LZMA_OK != lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL,

Modified: trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/I_EThread.h Sat May 22 18:29:12 2010
@@ -338,7 +338,7 @@ public:
   void free_event(Event * e);
   void (*signal_hook)(EThread *);
 
-#ifdef HAVE_EVENTFD
+#if ATS_HAS_EVENTFD
   int evfd;
 #else
   int evpipe[2];

Modified: trafficserver/traffic/trunk/iocore/eventsystem/UnixEThread.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/UnixEThread.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/UnixEThread.cc (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/UnixEThread.cc Sat May 22 18:29:12 2010
@@ -66,7 +66,7 @@ EThread::EThread(ThreadType att, int ani
   memset((char *) ethreads_to_be_signalled, 0, MAX_EVENT_THREADS * sizeof(EThread *));
   memset(thread_private, 0, PER_THREAD_DATA);
   thread_stats_mutex = new_ProxyMutex();
-#ifdef HAVE_EVENTFD
+#if ATS_HAS_EVENTFD
   evfd = eventfd(0, O_NONBLOCK | FD_CLOEXEC);
   if (evfd < 0) {
     if (errno == EINVAL) { // flags invalid for kernel <= 2.6.26

Modified: trafficserver/traffic/trunk/iocore/net/P_UnixNet.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/P_UnixNet.h?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/P_UnixNet.h (original)
+++ trafficserver/traffic/trunk/iocore/net/P_UnixNet.h Sat May 22 18:29:12 2010
@@ -27,21 +27,23 @@
 #include "inktomi++.h"
 
 #define USE_EDGE_TRIGGER_EPOLL  1
-#define USE_EDGE_TRIGGER_KQUEUE  1
-#define USE_EDGE_TRIGGER_PORT  1
+#define USE_EDGE_TRIGGER_KQUEUE 1
+#define USE_EDGE_TRIGGER_PORT   1
 
 
-#define EVENTIO_NETACCEPT               1
-#define EVENTIO_READWRITE_VC		2
-#define EVENTIO_DNS_CONNECTION		3
-#define EVENTIO_UDP_CONNECTION		4
-#define EVENTIO_ASYNC_SIGNAL		5
+#define EVENTIO_NETACCEPT       1
+#define EVENTIO_READWRITE_VC    2
+#define EVENTIO_DNS_CONNECTION  3
+#define EVENTIO_UDP_CONNECTION  4
+#define EVENTIO_ASYNC_SIGNAL    5
 
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
 #define EVENTIO_READ EV_READ
 #define EVENTIO_WRITE EV_WRITE
 #define EVENTIO_ERROR EV_ERROR
-#elif defined(USE_EPOLL)
+#endif
+
+#if ATS_USE_EPOLL
 #ifdef USE_EDGE_TRIGGER_EPOLL
 #define USE_EDGE_TRIGGER 1
 #define EVENTIO_READ (EPOLLIN|EPOLLET)
@@ -51,7 +53,9 @@
 #define EVENTIO_WRITE EPOLLOUT
 #endif
 #define EVENTIO_ERROR (EPOLLERR|EPOLLPRI|EPOLLHUP)
-#elif defined(USE_KQUEUE)
+#endif
+
+#if ATS_USE_KQUEUE
 #ifdef USE_EDGE_TRIGGER_KQUEUE
 #define USE_EDGE_TRIGGER 1
 #define INK_EV_EDGE_TRIGGER EV_CLEAR
@@ -61,18 +65,17 @@
 #define EVENTIO_READ INK_EVP_IN
 #define EVENTIO_WRITE INK_EVP_OUT
 #define EVENTIO_ERROR (0x010|0x002|0x020) // ERR PRI HUP
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
 #ifdef USE_EDGE_TRIGGER_PORT
 #define USE_EDGE_TRIGGER 1
 #endif
 #define EVENTIO_READ  POLLIN
 #define EVENTIO_WRITE POLLOUT
 #define EVENTIO_ERROR (POLLERR|POLLPRI|POLLHUP)
-#else
-#error port me
 #endif
 
-#ifdef USE_LIBEV
+#if ATS_USE_LIBEV
 #define EV_MINPRI 0
 #define EV_MAXPRI 0
 #include "ev.h"
@@ -106,14 +109,14 @@ class NetAccept;
 class UnixUDPConnection;
 struct EventIO
 {
-#ifdef USE_LIBEV
+#if ATS_USE_LIBEV
   ev_io eio;
 #define evio_get_port(e) ((e)->eio.fd)
 #else
   int fd;
 #define evio_get_port(e) ((e)->fd)
 #endif
-#if defined(USE_KQUEUE) || (defined(USE_EPOLL) && !defined(USE_EDGE_TRIGGER)) || defined(USE_PORT)
+#if ATS_USE_KQUEUE || ATS_USE_EPOLL && !defined(USE_EDGE_TRIGGER) || ATS_USE_PORT
   int events;
 #endif
   EventLoop event_loop;
@@ -139,7 +142,7 @@ struct EventIO
   int stop();
   int close();
   EventIO() {
-#ifndef USE_LIBEV
+#if !ATS_USE_LIBEV
     fd = 0;
 #endif
     type = 0;
@@ -154,7 +157,7 @@ struct EventIO
 #include "P_UnixUDPConnection.h"
 #include "P_UnixPollDescriptor.h"
 
-#define EVENTFD			5
+#define EVENTFD   5
 
 struct UnixNetVConnection;
 struct NetHandler;
@@ -520,7 +523,7 @@ TS_INLINE int EventIO::close() {
   return -1;
 }
 
-#ifdef USE_LIBEV
+#if ATS_USE_LIBEV
 
 TS_INLINE int EventIO::start(EventLoop l, int afd, Continuation *c, int e) {
   event_loop = l;
@@ -557,13 +560,13 @@ TS_INLINE int EventIO::stop() {
   return 0;
 }
 
-#else /* !USE_LIBEV */
+#else /* !ATS_USE_LIBEV */
 
 TS_INLINE int EventIO::start(EventLoop l, int afd, Continuation *c, int e) {
   data.c = c;
   fd = afd;
   event_loop = l;
-#if defined(USE_EPOLL)
+#if ATS_USE_EPOLL
   struct epoll_event ev;
   memset(&ev, 0, sizeof(ev));
   ev.events = e;
@@ -572,7 +575,8 @@ TS_INLINE int EventIO::start(EventLoop l
   events = e;
 #endif
   return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_ADD, fd, &ev);
-#elif defined(USE_KQUEUE)
+#endif
+#if ATS_USE_KQUEUE
   events = e;
   struct kevent ev[2];
   int n = 0;
@@ -581,18 +585,17 @@ TS_INLINE int EventIO::start(EventLoop l
   if (e & EVENTIO_WRITE)
     EV_SET(&ev[n++], fd, EVFILT_WRITE, EV_ADD|INK_EV_EDGE_TRIGGER, 0, 0, this);
   return kevent(l->kqueue_fd, &ev[0], n, NULL, 0, NULL);
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
   events = e;
   int retval = port_associate(event_loop->port_fd, PORT_SOURCE_FD, fd, events, this);
   NetDebug("iocore_eventio", "[EventIO::start] e(%d), events(%d), %d[%s]=port_associate(%d,%d,%d,%d,%p)", e, events, retval, retval<0? strerror(errno) : "ok", event_loop->port_fd, PORT_SOURCE_FD, fd, events, this);
   return retval;
-#else
-#error port me
 #endif
 }
 
 TS_INLINE int EventIO::modify(int e) {
-#if defined(USE_EPOLL) && !defined(USE_EDGE_TRIGGER)
+#if ATS_USE_EPOLL && !defined(USE_EDGE_TRIGGER)
   struct epoll_event ev;
   memset(&ev, 0, sizeof(ev));
   int new_events = events, old_events = events;
@@ -609,7 +612,8 @@ TS_INLINE int EventIO::modify(int e) {
     return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_ADD, fd, &ev);
   else
     return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_MOD, fd, &ev);
-#elif defined(USE_KQUEUE) && !defined(USE_EDGE_TRIGGER)
+#endif
+#if ATS_USE_KQUEUE && !defined(USE_EDGE_TRIGGER)
   int n = 0;
   struct kevent ev[2];
   int ee = events;
@@ -631,7 +635,8 @@ TS_INLINE int EventIO::modify(int e) {
     return kevent(event_loop->kqueue_fd, &ev[0], n, NULL, 0, NULL);
   else
     return 0;
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
   int n = 0;
   int ne = e;
   if (e < 0) {
@@ -664,7 +669,7 @@ TS_INLINE int EventIO::modify(int e) {
 }
 
 TS_INLINE int EventIO::refresh(int e) {
-#if defined(USE_KQUEUE) && defined(USE_EDGE_TRIGGER)
+#if ATS_USE_KQUEUE && defined(USE_EDGE_TRIGGER)
   e = e & events;
   struct kevent ev[2];
   int n = 0;
@@ -676,7 +681,8 @@ TS_INLINE int EventIO::refresh(int e) {
     return kevent(event_loop->kqueue_fd, &ev[0], n, NULL, 0, NULL);
   else
     return 0;
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
   int n = 0;
   int ne = e;
   if ((e & events)) {
@@ -701,24 +707,22 @@ TS_INLINE int EventIO::refresh(int e) {
 
 TS_INLINE int EventIO::stop() {
   if (event_loop) {
-#if defined(USE_EPOLL)
+#if ATS_USE_EPOLL
     struct epoll_event ev;
     memset(&ev, 0, sizeof(struct epoll_event));
     ev.events = EPOLLIN | EPOLLOUT | EPOLLET;
     return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_DEL, fd, &ev);
-#elif defined(USE_KQUEUE)
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
     int retval = port_dissociate(event_loop->port_fd, PORT_SOURCE_FD, fd);
     NetDebug("iocore_eventio", "[EventIO::stop] %d[%s]=port_dissociate(%d,%d,%d)", retval, retval<0? strerror(errno) : "ok", event_loop->port_fd, PORT_SOURCE_FD, fd);
     return retval;
-#else
-#error port me
 #endif
     event_loop = 0;
   }
   return 0;
 }
 
-#endif /* !USE_LIBEV */
+#endif /* !ATS_USE_LIBEV */
 
 #endif

Modified: trafficserver/traffic/trunk/iocore/net/P_UnixPollDescriptor.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/P_UnixPollDescriptor.h?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/P_UnixPollDescriptor.h (original)
+++ trafficserver/traffic/trunk/iocore/net/P_UnixPollDescriptor.h Sat May 22 18:29:12 2010
@@ -32,10 +32,10 @@
 
 #include "inktomi++.h"
 
-#ifdef USE_LIBEV
+#if ATS_USE_LIBEV
 #include "ev.h"
 #endif
-#if defined(USE_KQUEUE)
+#if ATS_USE_KQUEUE
 #include <sys/event.h>
 #define INK_EVP_IN    0x001
 #define INK_EVP_PRI   0x002
@@ -51,22 +51,23 @@ typedef struct pollfd Pollfd;
 struct PollDescriptor
 {
   int result;                   // result of poll
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
   struct ev_loop *eio;
-#elif defined(USE_EPOLL)
+#endif
+#if ATS_USE_EPOLL
   int epoll_fd;
   int nfds;                     // actual number
   Pollfd pfd[POLL_DESCRIPTOR_SIZE];
   struct epoll_event ePoll_Triggered_Events[POLL_DESCRIPTOR_SIZE];
-#elif defined(USE_KQUEUE)
+#endif
+#if ATS_USE_KQUEUE
   int kqueue_fd;
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
   int port_fd;
-#else
-#error port me
 #endif
 
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
 #define get_ev_port(a) ((a)->eio->backend_fd)
 #define get_ev_events(a,x) (a->eio->pendings[0] + a->eio->pendingcnt[0] - 1)->events
 #define get_ev_data(a,x) ((EventIO*)(a->eio->pendings[0] + a->eio->pendingcnt[0] - 1)->w->cb)
@@ -74,12 +75,16 @@ struct PollDescriptor
     (a->eio->pendings[0] + a->eio->pendingcnt[0] - 1)->w->pending = 0; \
     a->eio->pendingcnt[0]--;                               \
   } while (0)
-#elif defined(USE_EPOLL)
+#endif
+
+#if ATS_USE_EPOLL
 #define get_ev_port(a) ((a)->epoll_fd)
 #define get_ev_events(a,x) ((a)->ePoll_Triggered_Events[(x)].events)
 #define get_ev_data(a,x) ((a)->ePoll_Triggered_Events[(x)].data.ptr)
 #define ev_next_event(a,x)
-#elif defined(USE_KQUEUE)
+#endif
+
+#if ATS_USE_KQUEUE
   struct kevent kq_Triggered_Events[POLL_DESCRIPTOR_SIZE];
   /* we define these here as numbers, because for kqueue mapping them to a combination of
  * filters / flags is hard to do. */
@@ -103,20 +108,20 @@ struct PollDescriptor
     return r;
   }
 #define ev_next_event(a,x)
-#elif defined(USE_PORT)
+#endif
+
+#if ATS_USE_PORT
   port_event_t Port_Triggered_Events[POLL_DESCRIPTOR_SIZE];
 #define get_ev_port(a) ((a)->port_fd)
 #define get_ev_events(a,x) ((a)->Port_Triggered_Events[(x)].portev_events)
 #define get_ev_data(a,x) ((a)->Port_Triggered_Events[(x)].portev_user)
 #define get_ev_odata(a,x) ((a)->Port_Triggered_Events[(x)].portev_object)
 #define ev_next_event(a,x)
-#else
-#error port to your os
 #endif
 
   Pollfd *alloc()
   {
-#ifdef USE_EPOLL
+#if ATS_USE_EPOLL
     return &pfd[nfds++];
 #else
     return 0;
@@ -125,22 +130,23 @@ struct PollDescriptor
   PollDescriptor *init()
   {
     result = 0;
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
     eio = 0;
     // eio = ev_loop_new(0); moved to initialize_thread_for_xx --- all this junk should go away
-#elif defined(USE_EPOLL)
+#endif
+#if ATS_USE_EPOLL
     nfds = 0;
     epoll_fd = epoll_create(POLL_DESCRIPTOR_SIZE);
     memset(ePoll_Triggered_Events, 0, sizeof(ePoll_Triggered_Events));
     memset(pfd, 0, sizeof(pfd));
-#elif defined(USE_KQUEUE)
+#endif
+#if ATS_USE_KQUEUE
     kqueue_fd = kqueue();
     memset(kq_Triggered_Events, 0, sizeof(kq_Triggered_Events));
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
     port_fd = port_create();
     memset(Port_Triggered_Events, 0, sizeof(Port_Triggered_Events));
-#else
-#error port to your os
 #endif
     return this;
   }

Modified: trafficserver/traffic/trunk/iocore/net/UnixNet.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/UnixNet.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/UnixNet.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/UnixNet.cc Sat May 22 18:29:12 2010
@@ -110,19 +110,19 @@ PollCont::pollEvent(int event, Event *e)
     }
   }
   // wait for fd's to tigger, or don't wait if timeout is 0
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
   struct ev_loop *eio = pollDescriptor->eio;
   double pt = (double)poll_timeout/1000.0;
   fd_reify(eio);
   eio->backend_poll(eio, pt);
   pollDescriptor->result = eio->pendingcnt[0];
   NetDebug("iocore_net_poll", "[PollCont::pollEvent] backend_poll(%d,%f), result=%d", eio->backend_fd,pt,pollDescriptor->result);
-#elif defined(USE_EPOLL)
+#elif ATS_USE_EPOLL
   pollDescriptor->result = epoll_wait(pollDescriptor->epoll_fd,
                                       pollDescriptor->ePoll_Triggered_Events, POLL_DESCRIPTOR_SIZE, poll_timeout);
   NetDebug("iocore_net_poll", "[PollCont::pollEvent] epoll_fd: %d, timeout: %d, results: %d", pollDescriptor->epoll_fd, poll_timeout,
         pollDescriptor->result);
-#elif defined(USE_KQUEUE)
+#elif ATS_USE_KQUEUE
   struct timespec tv;
   tv.tv_sec = poll_timeout / 1000;
   tv.tv_nsec = 1000000 * (poll_timeout % 1000);
@@ -132,7 +132,7 @@ PollCont::pollEvent(int event, Event *e)
                                   &tv);
   NetDebug("iocore_net_poll", "[PollCont::pollEvent] kueue_fd: %d, timeout: %d, results: %d", pollDescriptor->kqueue_fd, poll_timeout,
         pollDescriptor->result);
-#elif defined(USE_PORT)
+#elif ATS_USE_PORT
   int retval;
   timespec_t ptimeout;
   ptimeout.tv_sec = poll_timeout / 1000;
@@ -169,7 +169,7 @@ PollCont::pollEvent(int event, Event *e)
 
 static void
 net_signal_hook_callback(EThread *thread) {
-#if HAVE_EVENTFD
+#if ATS_HAS_EVENTFD
   uint64 counter;
   NOWARN_UNUSED_RETURN(read(thread->evfd, &counter, sizeof(uint64)));
 #else
@@ -180,7 +180,7 @@ net_signal_hook_callback(EThread *thread
 
 static void
 net_signal_hook_function(EThread *thread) {
-#if HAVE_EVENTFD
+#if ATS_HAS_EVENTFD
   uint64 counter = 1;
   NOWARN_UNUSED_RETURN(write(thread->evfd, &counter, sizeof(uint64)));
 #else
@@ -208,7 +208,7 @@ initialize_thread_for_net(EThread *threa
   get_NetHandler(thread)->mutex = new_ProxyMutex();
   PollCont *pc = get_PollCont(thread);
   PollDescriptor *pd = pc->pollDescriptor;
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
   if (!thread_index)
     pd->eio = ev_default_loop(LIBEV_BACKEND_LIST);
   else
@@ -224,7 +224,7 @@ initialize_thread_for_net(EThread *threa
   thread->signal_hook = net_signal_hook_function;
   thread->ep = (EventIO*)malloc(sizeof(EventIO));
   thread->ep->type = EVENTIO_ASYNC_SIGNAL;
-#if HAVE_EVENTFD
+#if ATS_HAS_EVENTFD
   thread->ep->start(pd, thread->evfd, 0, EVENTIO_READ);
 #else
   thread->ep->start(pd, thread->evpipe[0], 0, EVENTIO_READ);
@@ -305,17 +305,17 @@ NetHandler::mainNetEvent(int event, Even
 
   PollDescriptor *pd = get_PollDescriptor(trigger_event->ethread);
   UnixNetVConnection *vc = NULL;
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
   struct ev_loop *eio = pd->eio;
   double pt = (double)poll_timeout/1000.0;
   fd_reify(eio);
   eio->backend_poll(eio, pt);
   pd->result = eio->pendingcnt[0];
   NetDebug("iocore_net_main_poll", "[NetHandler::mainNetEvent] backend_poll(%d,%f), result=%d", eio->backend_fd,pt,pd->result);
-#elif defined(USE_EPOLL)
+#elif ATS_USE_EPOLL
   pd->result = epoll_wait(pd->epoll_fd, pd->ePoll_Triggered_Events, POLL_DESCRIPTOR_SIZE, poll_timeout);
   NetDebug("iocore_net_main_poll", "[NetHandler::mainNetEvent] epoll_wait(%d,%f), result=%d", pd->epoll_fd,poll_timeout,pd->result);
-#elif defined(USE_KQUEUE)
+#elif ATS_USE_KQUEUE
   struct timespec tv;
   tv.tv_sec = poll_timeout / 1000;
   tv.tv_nsec = 1000000 * (poll_timeout % 1000);
@@ -323,7 +323,7 @@ NetHandler::mainNetEvent(int event, Even
                       pd->kq_Triggered_Events, POLL_DESCRIPTOR_SIZE,
                       &tv);
   NetDebug("iocore_net_main_poll", "[NetHandler::mainNetEvent] kevent(%d,%f), result=%d", pd->kqueue_fd,poll_timeout,pd->result);
-#elif defined(USE_PORT)
+#elif ATS_USE_PORT
   int retval;
   timespec_t ptimeout;
   ptimeout.tv_sec = poll_timeout / 1000;
@@ -388,9 +388,9 @@ NetHandler::mainNetEvent(int event, Even
       }
     } else if (epd->type == EVENTIO_DNS_CONNECTION) {
       if (epd->data.dnscon != NULL) {
-	dnsqueue.enqueue(epd->data.dnscon);
+        dnsqueue.enqueue(epd->data.dnscon);
 #if defined(USE_EDGE_TRIGGER)
-	epd->refresh(EVENTIO_READ);
+        epd->refresh(EVENTIO_READ);
 #endif
       }
     }

Modified: trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc Sat May 22 18:29:12 2010
@@ -74,7 +74,7 @@ initialize_thread_for_udp_net(EThread * 
   new((ink_dummy_for_new *) get_UDPPollCont(thread)) PollCont(thread->mutex);
   new((ink_dummy_for_new *) get_UDPNetHandler(thread)) UDPNetHandler;
 
-#if defined(USE_LIBEV)
+#if ATS_USE_LIBEV
   PollCont *pc = get_UDPPollCont(thread);
   PollDescriptor *pd = pc->pollDescriptor;
   pd->eio = ev_loop_new(LIBEV_BACKEND_LIST);
@@ -306,7 +306,7 @@ UDPReadContinuation::cancel()
 void
 UDPReadContinuation::setupPollDescriptor()
 {
-#ifdef USE_EPOLL
+#if ATS_USE_EPOLL
   Pollfd *pfd;
   EThread *et = (EThread *) this_thread();
   PollCont *pc = get_PollCont(et);

Modified: trafficserver/traffic/trunk/libinktomi++/Diags.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/Diags.h?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/Diags.h (original)
+++ trafficserver/traffic/trunk/libinktomi++/Diags.h Sat May 22 18:29:12 2010
@@ -44,10 +44,6 @@
 
 #define DIAGS_MAGIC 0x12345678
 
-#if !defined(USE_DIAGS)
-#define NO_DIAG 1
-#endif
-
 class Diags;
 
 // extern int diags_on_for_plugins;
@@ -378,7 +374,7 @@ dummy_debug(const char *dummy_arg ...)
   (void) dummy_arg;
 }
 
-#ifndef NO_DIAGS
+#if ATS_USE_DIAGS
 #define Diag      if (diags->on()) DiagsDClosure(DTA(DL_Diag))  /*args */
 #define Debug     if (diags->on()) DiagsDClosure(DTA(DL_Debug)) /*args */
 #define DebugOn   DiagsDClosure(DTA(DL_Debug))  /*args */
@@ -396,7 +392,7 @@ dummy_debug(const char *dummy_arg ...)
 #define	Alert     DiagsEClosure(DTA(DL_Alert))  /*(args...) */
 #define	Emergency DiagsEClosure(DTA(DL_Emergency))      /*(args...) */
 
-#ifndef NO_DIAGS
+#if ATS_USE_DIAGS
 #define is_debug_tag_set(_t)     diags->on(_t,DiagsTagType_Debug)
 #define is_action_tag_set(_t)    diags->on(_t,DiagsTagType_Action)
 #define debug_tag_assert(_t,_a)  (is_debug_tag_set(_t) ? (ink_release_assert(_a), 0) : 0)

Modified: trafficserver/traffic/trunk/libinktomi++/ink_config.h.in
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_config.h.in?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_config.h.in (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_config.h.in Sat May 22 18:29:12 2010
@@ -42,6 +42,7 @@
 #define BUILD_PERSON                   "@build_person@"
 #define BUILD_GROUP                    "@build_group@"
 
+/* Includes */
 #define ATS_HAVE_SYS_EPOLL_H            @sys_epollh@
 #define ATS_HAVE_SYS_EVENT_H            @sys_eventh@
 #define ATS_HAVE_MACHINE_ENDIAN_H       @machine_endianh@
@@ -78,6 +79,7 @@
 #define ATS_HAVE_NETINET_IP_H           @netinet_iph@
 #define ATS_HAVE_NETINET_IP_ICMP_H      @netinet_ip_icmph@
 
+/* Libraries */
 #define ATS_HAVE_ZLIB_H                 @zlibh@
 #define ATS_HAVE_LZMA_H                 @lzmah@
 #define ATS_HAVE_SQLITE3_H              @sqlite3h@
@@ -87,8 +89,20 @@
 #define ATS_HAVE_PCRE_PCRE_H            @pcre_pcreh@
 #define ATS_HAVE_EXPAT_H                @expath@
 
+/* Features */
+#define ATS_HAS_EVENTFD                 @has_eventfd@
+#define ATS_HAS_BACKTRACE               @has_backtrace@
+#define ATS_HAS_PROFILER                @has_profiler@
+#define ATS_USE_DIAGS                   @use_diags@
+#define ATS_USE_LIBEV                   @use_libev@
+#define ATS_USE_EPOLL                   @use_epoll@
+#define ATS_USE_KQUEUE                  @use_kqueue@
+#define ATS_USE_PORT                    @use_port@
+
+/* OS API definitions */
 #define GETHOSTBYNAME_R_HOSTENT_DATA    @gethostbyname_r_hostent_data@
 #define GETHOSTBYNAME_R_GLIBC2          @gethostbyname_r_glibc2@
+#define NEED_UNION_SEMUN                @need_union_semun@
 
 /* This file is autogenerated without multiple include protection
  * which matters e.g. when the manager specifically undef's HTTP_CACHE

Modified: trafficserver/traffic/trunk/libinktomi++/ink_platform.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_platform.h?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_platform.h (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_platform.h Sat May 22 18:29:12 2010
@@ -96,11 +96,13 @@
 #include <strings.h>
 #include <poll.h>
 
-#if defined(USE_EPOLL)
+#if ATS_USE_EPOLL
 #include <sys/epoll.h>
-#elif defined(USE_KQUEUE)
+#endif
+#if ATS_USE_KQUEUE
 #include <sys/event.h>
-#elif defined(USE_PORT)
+#endif
+#if ATS_USE_PORT
 #include <port.h>
 #endif
 

Modified: trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_stack_trace.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc Sat May 22 18:29:12 2010
@@ -29,12 +29,12 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE)
+#if defined(HAVE_EXECINFO_H) && ATS_HAS_BACKTRACE
 
 #include <execinfo.h>           /* for backtrace_symbols, etc. */
 #include <signal.h>
 
-#ifdef __linux__
+#if defined(linux)
 /* TODO: port this more correctly to non-Linux platforms. */
 #define HAVE_SIGCONTEXT
 #endif
@@ -114,7 +114,7 @@ ink_stack_trace_dump(int sighandler_fram
   backtrace_symbols_fd(stack, btl, 2);
 }
 
-#else  /* !(HAVE_EXECINFO_H && HAVE_BACKTRACE) */
+#else  /* !(HAVE_EXECINFO_H && ATS_HAS_BACKTRACE) */
 
 void
 ink_stack_trace_dump(int sighandler_frame)
@@ -123,4 +123,4 @@ ink_stack_trace_dump(int sighandler_fram
   write(2, msg, sizeof(msg) - 1);
 }
 
-#endif  /* !(HAVE_EXECINFO_H && HAVE_BACKTRACE) */
+#endif  /* !(HAVE_EXECINFO_H && AST_HAS_BACKTRACE) */

Modified: trafficserver/traffic/trunk/proxy/CoreUtils.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/CoreUtils.h?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/CoreUtils.h (original)
+++ trafficserver/traffic/trunk/proxy/CoreUtils.h Sat May 22 18:29:12 2010
@@ -62,7 +62,7 @@ struct core_stack_state
 #include <assert.h>
 #include <asm/ptrace.h>         // for structure pt_regs
 #include <elf.h>
-#ifdef USE_LIBEV
+#if ATS_USE_LIBEV
 #undef EV_NONE
 #endif
 #include "DynArray.h"

Modified: trafficserver/traffic/trunk/proxy/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/Main.cc Sat May 22 18:29:12 2010
@@ -107,7 +107,7 @@ extern "C" int plock(int);
 
 #include "StatSystemV2.h"
 
-#ifdef HAVE_PROFILER
+#if ATS_HAS_PROFILER
 #include <google/profiler.h>
 #endif
 
@@ -263,7 +263,7 @@ ArgumentDescription argument_description
    "T",
    &run_test_hook, "PROXY_RUN_TEST_HOOK", NULL},
 #endif //INK_NO_TESTS
-#ifndef NO_DIAGS
+#if ATS_USE_DIAGS
   {"debug_tags", 'T', "Vertical-bar-separated Debug Tags", "S1023", error_tags,
    "PROXY_DEBUG_TAGS", NULL},
   {"action_tags", 'B', "Vertical-bar-separated Behavior Tags", "S1023", action_tags,
@@ -1728,7 +1728,7 @@ void init_stat_collector()
 int
 main(int argc, char **argv)
 {
-#ifdef HAVE_PROFILER
+#if ATS_HAS_PROFILER
   ProfilerStart("/tmp/ts.prof");
 #endif
   int mem_throttling;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/Main.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/Main.cc Sat May 22 18:29:12 2010
@@ -540,7 +540,7 @@ main(int argc, char **argv)
           } else if (strcmp(argv[i], "-clusterRSPort") == 0) {
             ++i;
             cluster_server_port = atoi(argv[i]);
-#ifndef NO_DIAGS
+#if ATS_USE_DIAGS
           } else if (strcmp(argv[i], "-debug") == 0) {
             ++i;
             strncpy(debug_tags, argv[i], 1023);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.h Sat May 22 18:29:12 2010
@@ -45,7 +45,7 @@
 #include <sys/ipc.h>
 #include <sys/sem.h>
 
-#ifdef NEED_UNION_SEMUN
+#if NEED_UNION_SEMUN
 union semun
 {
   int val;                      /* value for SETVAL */

Modified: trafficserver/traffic/trunk/proxy/signals.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/signals.cc?rev=947319&r1=947318&r2=947319&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/signals.cc (original)
+++ trafficserver/traffic/trunk/proxy/signals.cc Sat May 22 18:29:12 2010
@@ -51,8 +51,7 @@
 struct obj_list *ObjList;
 #endif
 
-// TODO: Use a proper HAVE_PROFILER
-#ifdef HAVE_PROFILER
+#if ATS_HAS_PROFILER
 #include <google/profiler.h>
 #endif
 
@@ -323,7 +322,7 @@ signal_handler(int sig, siginfo_t * t, v
   //syslog(LOG_ERR, sig_msg);
 #endif
 
-#ifdef HAVE_PROFILER
+#if ATS_HAS_PROFILER
   ProfilerStop();
 #endif
   shutdown_system();