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 2010/02/25 18:51:41 UTC
svn commit: r916374 - in /incubator/trafficserver/traffic/trunk:
README.libev libev/
Author: jplevyak
Date: Thu Feb 25 17:51:40 2010
New Revision: 916374
URL: http://svn.apache.org/viewvc?rev=916374&view=rev
Log:
TS-206: remove libev and leave a README on how to compile with it by pulling
the source from the libev distribution.
Added:
incubator/trafficserver/traffic/trunk/README.libev
Removed:
incubator/trafficserver/traffic/trunk/libev/
Added: incubator/trafficserver/traffic/trunk/README.libev
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/README.libev?rev=916374&view=auto
==============================================================================
--- incubator/trafficserver/traffic/trunk/README.libev (added)
+++ incubator/trafficserver/traffic/trunk/README.libev Thu Feb 25 17:51:40 2010
@@ -0,0 +1,63 @@
+To compile TrafficServer with libev
+
+1. pull the libev source into the root of the TS source
+ cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co libev
+2. apply the patch at the end of this file (after CUT HERE) to the libev source
+3. In the libev directory
+ a. autoreconf -i
+ b. ./configure CFLAGS="$CFLAGS -Dinline_size= -DEV_MINPRI=0 -DEV_MAXPRI=0"
+ c. install normally
+4. configure trafffic server with --with-libev
+
+
+------------------------ CUT HERE ----------------
+Index: ev.c
+===================================================================
+RCS file: /schmorpforge/libev/ev.c,v
+retrieving revision 1.320
+diff -u -r1.320 ev.c
+--- ev.c 4 Dec 2009 20:25:06 -0000 1.320
++++ ev.c 25 Feb 2010 17:24:18 -0000
+@@ -467,7 +467,9 @@
+
+ #define expect_false(expr) expect ((expr) != 0, 0)
+ #define expect_true(expr) expect ((expr) != 0, 1)
++#ifndef inline_size
+ #define inline_size static inline
++#endif
+
+ #if EV_MINIMAL
+ # define inline_speed static noinline
+Index: ev_poll.c
+===================================================================
+RCS file: /schmorpforge/libev/ev_poll.c,v
+retrieving revision 1.31
+diff -u -r1.31 ev_poll.c
+--- ev_poll.c 19 Jul 2009 04:11:27 -0000 1.31
++++ ev_poll.c 25 Feb 2010 17:24:18 -0000
+@@ -104,12 +104,12 @@
+ else if (errno != EINTR)
+ ev_syserr ("(libev) poll");
+ }
+- else
+- for (p = polls; res; ++p)
++ else {
++ int i = 0;
++ for (i = 0; i < pollcnt; i++) {
++ p = &polls[i];
+ if (expect_false (p->revents)) /* this expect is debatable */
+ {
+- --res;
+-
+ if (expect_false (p->revents & POLLNVAL))
+ fd_kill (EV_A_ p->fd);
+ else
+@@ -120,6 +120,8 @@
+ | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
+ );
+ }
++ }
++ }
+ }
+
+ int inline_size