trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject svn commit: r940536 - in /trafficserver/traffic/trunk: ./ example/ example/add-header/ example/append-transform/ example/basic-auth/ example/blacklist-0/ example/blacklist-1/ example/bnull-transform/ example/cache_plugin/ example/cache_scan/ example/fi...
Date Mon, 03 May 2010 17:54:17 GMT
Author: bcall
Date: Mon May  3 17:54:16 2010
New Revision: 940536

URL: http://svn.apache.org/viewvc?rev=940536&view=rev
Log:
TS-328 Added the example directory into the build and fixed some
compliation bugs.
Updated patch and tested by George Paul.

Added:
    trafficserver/traffic/trunk/example/query_remap/Makefile.am
      - copied, changed from r940506, trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am
Removed:
    trafficserver/traffic/trunk/example/README.internal
Modified:
    trafficserver/traffic/trunk/.gitignore
    trafficserver/traffic/trunk/Makefile.am
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/example/Makefile.am
    trafficserver/traffic/trunk/example/add-header/Makefile.am
    trafficserver/traffic/trunk/example/add-header/add-header.c
    trafficserver/traffic/trunk/example/append-transform/Makefile.am
    trafficserver/traffic/trunk/example/basic-auth/Makefile.am
    trafficserver/traffic/trunk/example/blacklist-0/Makefile.am
    trafficserver/traffic/trunk/example/blacklist-1/Makefile.am
    trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c
    trafficserver/traffic/trunk/example/bnull-transform/Makefile.am
    trafficserver/traffic/trunk/example/cache_plugin/Makefile.am
    trafficserver/traffic/trunk/example/cache_plugin/cache_plugin.cc
    trafficserver/traffic/trunk/example/cache_scan/Makefile.am
    trafficserver/traffic/trunk/example/cache_scan/cache_scan.cc
    trafficserver/traffic/trunk/example/file-1/Makefile.am
    trafficserver/traffic/trunk/example/file_system_cache/Makefile.am
    trafficserver/traffic/trunk/example/gzip-transform/Makefile.am
    trafficserver/traffic/trunk/example/gzip-transform/gunzip.c
    trafficserver/traffic/trunk/example/gzip-transform/gzip.c
    trafficserver/traffic/trunk/example/hello/Makefile.am
    trafficserver/traffic/trunk/example/null-transform/Makefile.am
    trafficserver/traffic/trunk/example/output-header/Makefile.am
    trafficserver/traffic/trunk/example/prefetch/Makefile.am
    trafficserver/traffic/trunk/example/protocol/Makefile.am
    trafficserver/traffic/trunk/example/protocol/Protocol.c
    trafficserver/traffic/trunk/example/redirect-1/Makefile.am
    trafficserver/traffic/trunk/example/redirect-1/redirect-1.c
    trafficserver/traffic/trunk/example/remap/Makefile.am
    trafficserver/traffic/trunk/example/remap/remap.cc
    trafficserver/traffic/trunk/example/replace-header/Makefile.am
    trafficserver/traffic/trunk/example/response-header-1/Makefile.am
    trafficserver/traffic/trunk/example/response-header-1/response-header-1.c
    trafficserver/traffic/trunk/example/server-transform/Makefile.am
    trafficserver/traffic/trunk/example/server-transform/server-transform.c
    trafficserver/traffic/trunk/example/session-1/Makefile.am
    trafficserver/traffic/trunk/example/thread-1/Makefile.am
    trafficserver/traffic/trunk/example/thread-1/thread-1.c
    trafficserver/traffic/trunk/example/thread-pool/Makefile.am
    trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am
    trafficserver/traffic/trunk/example/thread-pool/psi.c
    trafficserver/traffic/trunk/example/thread-pool/thread.c
    trafficserver/traffic/trunk/example/thread-pool/thread.h

Modified: trafficserver/traffic/trunk/.gitignore
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/.gitignore?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/.gitignore (original)
+++ trafficserver/traffic/trunk/.gitignore Mon May  3 17:54:16 2010
@@ -1,8 +1,11 @@
 *.o
 *.a
+*.so
 *.in
 *~
 *.tar.gz
+*.lo
+*.la
 
 .deps
 
@@ -59,3 +62,6 @@ m4/lt~obsolete.m4
 
 rc/trafficserver
 rc/update_records
+
+proxy/api/include/ts
+example/*/.libs

Modified: trafficserver/traffic/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/Makefile.am (original)
+++ trafficserver/traffic/trunk/Makefile.am Mon May  3 17:54:16 2010
@@ -22,9 +22,9 @@
 ACLOCAL_AMFLAGS = -I m4
 
 if STANDALONE_IOCORE
-SUBDIRS =  libinktomi++ librecords iocore @hdr_dirs@ proxy
+SUBDIRS =  libinktomi++ librecords iocore @hdr_dirs@ proxy example
 else
-SUBDIRS =  libinktomi++ librecords iocore proxy doc rc
+SUBDIRS =  libinktomi++ librecords iocore proxy example doc rc
 endif
 
 DIST_BUILD_USER=`id -nu`

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Mon May  3 17:54:16 2010
@@ -970,6 +970,33 @@ AC_CONFIG_FILES([proxy/mgmt2/tools/Makef
 AC_CONFIG_FILES([proxy/mgmt2/utils/Makefile])
 AC_CONFIG_FILES([proxy/mgmt2/web2/Makefile])
 AC_CONFIG_FILES([proxy/stats/Makefile])
+AC_CONFIG_FILES([example/Makefile])
+# example plugins
+AC_CONFIG_FILES([example/add-header/Makefile])
+AC_CONFIG_FILES([example/append-transform/Makefile])
+AC_CONFIG_FILES([example/basic-auth/Makefile])
+AC_CONFIG_FILES([example/blacklist-0/Makefile])
+AC_CONFIG_FILES([example/blacklist-1/Makefile])
+AC_CONFIG_FILES([example/bnull-transform/Makefile])
+AC_CONFIG_FILES([example/cache_plugin/Makefile])
+AC_CONFIG_FILES([example/cache_scan/Makefile])
+AC_CONFIG_FILES([example/file-1/Makefile])
+AC_CONFIG_FILES([example/file_system_cache/Makefile])
+AC_CONFIG_FILES([example/gzip-transform/Makefile])
+AC_CONFIG_FILES([example/hello/Makefile])
+AC_CONFIG_FILES([example/null-transform/Makefile])
+AC_CONFIG_FILES([example/output-header/Makefile])
+AC_CONFIG_FILES([example/prefetch/Makefile])
+AC_CONFIG_FILES([example/protocol/Makefile])
+AC_CONFIG_FILES([example/redirect-1/Makefile])
+AC_CONFIG_FILES([example/query_remap/Makefile])
+AC_CONFIG_FILES([example/remap/Makefile])
+AC_CONFIG_FILES([example/replace-header/Makefile])
+AC_CONFIG_FILES([example/response-header-1/Makefile])
+AC_CONFIG_FILES([example/server-transform/Makefile])
+AC_CONFIG_FILES([example/session-1/Makefile])
+AC_CONFIG_FILES([example/thread-1/Makefile])
+AC_CONFIG_FILES([example/thread-pool/Makefile])
 
 # -----------------------------------------------------------------------------
 # 7. autoheader TEMPLATES

Modified: trafficserver/traffic/trunk/example/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/Makefile.am Mon May  3 17:54:16 2010
@@ -14,61 +14,9 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-API_HDR = ../proxy/api/include/ts.h
+API_INC=$(top_srcdir)/proxy/api/include
 
-default: \
-	add-header/add-header.so \
-	append-transform/append-transform.so \
-	basic-auth/basic-auth.so \
-	blacklist-1/blacklist-1.so \
-	bnull-transform/bnull-transform.so \
-	hello/hello.so \
-	null-transform/null-transform.so \
-	output-header/output-header.so \
-	protocol/protocol.so \
-	redirect-1/redirect-1.so \
-	server-transform/server-transform.so \
-	session-1/session-1.so \
-	thread-pool/psi.so
+all-am:
+	ln -sfn . $(top_srcdir)/proxy/api/include/ts
 
-add-header/add-header.so: add-header/add-header.c $(API_HDR)
-	(cd add-header; $(MAKE))
-
-append-transform/append-transform.so: append-transform/append-transform.c $(API_HDR)
-	(cd append-transform; $(MAKE))
-
-basic-auth/basic-auth.so: basic-auth/basic-auth.c $(API_HDR)
-	(cd basic-auth; $(MAKE))
-
-blacklist-1/blacklist-1.so: blacklist-1/blacklist-1.c $(API_HDR)
-	(cd blacklist-1; $(MAKE))
-
-bnull-transform/bnull-transform.so: bnull-transform/bnull-transform.c $(API_HDR)
-	(cd bnull-transform; $(MAKE))
-
-hello/hello.so: hello/hello.c $(API_HDR)
-	(cd hello; $(MAKE))
-
-null-transform/null-transform.so: null-transform/null-transform.c $(API_HDR)
-	(cd null-transform; $(MAKE))
-
-output-header/output-header.so: output-header/output-header.c $(API_HDR)
-	(cd output-header; $(MAKE))
-
-protocol/protocol.so: protocol/Protocol.c protocol/TxnSM.c $(API_HDR)
-	(cd protocol; $(MAKE))
-
-redirect-1/redirect-1.so: redirect-1/redirect-1.c $(API_HDR)
-	(cd redirect-1; $(MAKE))
-
-server-transform/server-transform.so: server-transform/server-transform.c $(API_HDR)
-	(cd server-transform; $(MAKE))
-
-session-1/session-1.so: session-1/session-1.c $(API_HDR)
-	(cd session-1; $(MAKE))
-
-thread-pool/psi.so: thread-pool/psi.c thread-pool/thread.c thread-pool/thread.h $(API_HDR)
-	(cd thread-pool; $(MAKE))
-
-clean:
-	rm -f */*.so */*.o
+SUBDIRS = . add-header append-transform basic-auth blacklist-0 blacklist-1 bnull-transform cache_plugin cache_scan file-1 file_system_cache gzip-transform hello null-transform output-header protocol query_remap redirect-1 remap replace-header response-header-1 server-transform session-1 thread-1 thread-pool

Modified: trafficserver/traffic/trunk/example/add-header/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/add-header/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/add-header/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/add-header/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: add-header.so
+pkglib_LTLIBRARIES = add-header.la
+add_header_la_SOURCES = add-header.c
+add_header_la_LDFLAGS = -module
 
-add-header.o: add-header.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o add-header.o -c add-header.c
-
-add-header.so: add-header.o
-	$(CC) $(LDFLAGS) -o add-header.so add-header.o
-
-clean:
-	rm -f add-header.so add-header.o
+all:
+	ln -sf .libs/add-header.so

Modified: trafficserver/traffic/trunk/example/add-header/add-header.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/add-header/add-header.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/add-header/add-header.c (original)
+++ trafficserver/traffic/trunk/example/add-header/add-header.c Mon May  3 17:54:16 2010
@@ -33,6 +33,8 @@
  *          ith MIME header to be added to the client request
  */
 
+#include <ctype.h>
+#include <stdio.h>
 #include <string.h>
 #include <ts/ts.h>
 
@@ -55,7 +57,7 @@ add_header(INKHttpTxn txnp, INKCont cont
   }
 
   field_loc = INKMimeHdrFieldGet(hdr_bufp, hdr_loc, 0);
-  if (new_field_loc == INK_ERROR_PTR) {
+  if (field_loc == INK_ERROR_PTR) {
     INKError("[add_header] Error while getting field");
     goto error;
   }

Modified: trafficserver/traffic/trunk/example/append-transform/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/append-transform/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/append-transform/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/append-transform/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: append-transform.so
+pkglib_LTLIBRARIES = append-transform.la
+append_transform_la_SOURCES = append-transform.c
+append_transform_la_LDFLAGS = -module
 
-append-transform.o: append-transform.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o append-transform.o -c append-transform.c
-
-append-transform.so: append-transform.o
-	$(CC) $(LDFLAGS) -o append-transform.so append-transform.o
-
-clean:
-	rm -f append-transform.so append-transform.o
+all:
+	ln -sf .libs/append-transform.so

Modified: trafficserver/traffic/trunk/example/basic-auth/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/basic-auth/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/basic-auth/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/basic-auth/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: basic-auth.so
+pkglib_LTLIBRARIES = basic-auth.la
+basic_auth_la_SOURCES = basic-auth.c
+basic_auth_la_LDFLAGS = -module
 
-basic-auth.o: basic-auth.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o basic-auth.o -c basic-auth.c
-
-basic-auth.so: basic-auth.o
-	$(CC) $(LDFLAGS) -o basic-auth.so basic-auth.o
-
-clean:
-	rm -f basic-auth.so basic-auth.o
+all:
+	ln -sf .libs/basic-auth.so

Modified: trafficserver/traffic/trunk/example/blacklist-0/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/blacklist-0/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/blacklist-0/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/blacklist-0/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: blacklist-0.so
+pkglib_LTLIBRARIES = blacklist-0.la
+blacklist_0_la_SOURCES = blacklist-0.c
+blacklist_0_la_LDFLAGS = -module
 
-blacklist-0.o: blacklist-0.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o blacklist-0.o -c blacklist-0.c
-
-blacklist-0.so: blacklist-0.o
-	$(CC) $(LDFLAGS) -o blacklist-0.so blacklist-0.o
-
-clean:
-	rm -f blacklist-0.so blacklist-0.o
+all:
+	ln -sf .libs/blacklist-0.so

Modified: trafficserver/traffic/trunk/example/blacklist-1/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/blacklist-1/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/blacklist-1/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/blacklist-1/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: blacklist-1.so
+pkglib_LTLIBRARIES = blacklist-1.la
+blacklist_1_la_SOURCES = blacklist-1.c
+blacklist_1_la_LDFLAGS = -module
 
-blacklist-1.o: blacklist-1.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o blacklist-1.o -c blacklist-1.c
-
-blacklist-1.so: blacklist-1.o
-	$(CC) $(LDFLAGS) -o blacklist-1.so blacklist-1.o
-
-clean:
-	rm -f blacklist-1.so blacklist-1.o
+all:
+	ln -sf .libs/blacklist-1.so

Modified: trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c (original)
+++ trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c Mon May  3 17:54:16 2010
@@ -88,7 +88,6 @@ handle_dns(INKHttpTxn txnp, INKCont cont
   const char *host;
   int i;
   int host_length;
-  cdata *cd;
   int lock;
   INKReturnCode ret_code;
 
@@ -167,7 +166,6 @@ handle_response(INKHttpTxn txnp, INKCont
   char *url_str;
   char *buf;
   int url_length;
-  cdata *cd;
 
   if (!INKHttpTxnClientRespGet(txnp, &bufp, &hdr_loc)) {
     INKError("couldn't retrieve client response header\n");

Modified: trafficserver/traffic/trunk/example/bnull-transform/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/bnull-transform/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/bnull-transform/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/bnull-transform/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: bnull-transform.so
+pkglib_LTLIBRARIES = bnull-transform.la
+bnull_transform_la_SOURCES = bnull-transform.c
+bnull_transform_la_LDFLAGS = -module
 
-bnull-transform.o: bnull-transform.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o bnull-transform.o -c bnull-transform.c
-
-bnull-transform.so: bnull-transform.o
-	$(CC) $(LDFLAGS) -o bnull-transform.so bnull-transform.o
-
-clean:
-	rm -f bnull-transform.so bnull-transform.o
+all:
+	ln -sf .libs/bnull-transform.so

Modified: trafficserver/traffic/trunk/example/cache_plugin/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/cache_plugin/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/cache_plugin/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/cache_plugin/Makefile.am Mon May  3 17:54:16 2010
@@ -14,21 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=cc
-LD=ld
-CFLAGS= -g -D_REENTRANT=1 -m32
-LDFLAGS= -g -shared -m32
+CXXFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-TS_BASE=../../../..
-API_INC= -I. -I$(TS_BASE)/proxy/api/include
+pkglib_LTLIBRARIES = cache_plugin.la
+cache_plugin_la_SOURCES = cache_plugin.cc
+cache_plugin_la_LDFLAGS = -module
 
-default: cache_plugin.so
-
-cache_plugin.o: cache_plugin.cc
-	$(CXX) $(CFLAGS) $(API_INC) -o cache_plugin.o -c cache_plugin.cc
-
-cache_plugin.so: cache_plugin.o
-	$(CXX) $(LDFLAGS) -o cache_plugin.so cache_plugin.o
-
-clean:
-	rm -f cache_plugin.so cache_plugin.o
+all:
+	ln -sf .libs/cache_plugin.so

Modified: trafficserver/traffic/trunk/example/cache_plugin/cache_plugin.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/cache_plugin/cache_plugin.cc?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/cache_plugin/cache_plugin.cc (original)
+++ trafficserver/traffic/trunk/example/cache_plugin/cache_plugin.cc Mon May  3 17:54:16 2010
@@ -28,12 +28,12 @@
 #include <fcntl.h>
 #include <assert.h>
 #include <string.h>
+#include <stdint.h>
 
 
 using namespace std;
 
 
-static INKThread cacheThread;
 static map<string, string> cache;
 static INKMutex cacheMutex;
 
@@ -62,6 +62,8 @@ eventLoop(void *data)
       cout << "-";
     cout << endl;               // print a line
   }
+
+  return NULL;
 }
 
 
@@ -74,7 +76,7 @@ cache_read(INKCont contp, INKEvent event
   INKHttpTxn txnp = (INKHttpTxn) edata;
   void *key = 0;
   int keySize = 0;
-  uint64_t size, offset;
+  INKU64 size, offset;
 
   // get the key for the lookup
   INKCacheKeyGet(txnp, &key, &keySize);
@@ -229,7 +231,6 @@ cache_plugin(INKCont contp, INKEvent eve
 {
 
   INKHttpTxn txnp = (INKHttpTxn) edata;
-  int retVal;
 
   switch (event) {
     // read events
@@ -265,7 +266,6 @@ void
 INKPluginInit(const int argc, const char **argv)
 {
   INKPluginRegistrationInfo info;
-  INKCont contp;
 
   INKDebug("cache_plugin", "[INKPluginInit] Starting cache plugin");
 

Modified: trafficserver/traffic/trunk/example/cache_scan/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/cache_scan/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/cache_scan/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/cache_scan/Makefile.am Mon May  3 17:54:16 2010
@@ -14,22 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=cc
-LD=ld
-CFLAGS= -g -D_REENTRANT=1 -m32
-LDFLAGS= -g -shared -m32
+CXXFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-TS_BASE=../../../..
-API_INC= -I. -I$(TS_BASE)/proxy/api/include
-TARGET=cache_scan
+pkglib_LTLIBRARIES = cache_scan.la
+cache_scan_la_SOURCES = cache_scan.cc
+cache_scan_la_LDFLAGS = -module
 
-default: $(TARGET).so
-
-$(TARGET).o: $(TARGET).cc
-	$(CXX) $(CFLAGS) $(API_INC) -o $(TARGET).o -c $(TARGET).cc
-
-$(TARGET).so: $(TARGET).o
-	$(CXX) $(LDFLAGS) -o $(TARGET).so $(TARGET).o
-
-clean:
-	rm -f $(TARGET).so $(TARGET).o
+all:
+	ln -sf .libs/cache_scan.so

Modified: trafficserver/traffic/trunk/example/cache_scan/cache_scan.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/cache_scan/cache_scan.cc?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/cache_scan/cache_scan.cc (original)
+++ trafficserver/traffic/trunk/example/cache_scan/cache_scan.cc Mon May  3 17:54:16 2010
@@ -80,7 +80,7 @@ handle_scan(INKCont contp, INKEvent even
     cstate->done = 1;
     const char error[] = "Cache remove operation failed error=";
     char rc[12];
-    snprintf(rc, 12, "%d", (int) edata);
+    snprintf(rc, 12, "%p", edata);
     cstate->cache_vc = (INKVConn) edata;
     cstate->write_vio = INKVConnWrite(cstate->net_vc, contp, cstate->resp_reader, INT_MAX);
     cstate->total_bytes += INKIOBufferWrite(cstate->resp_buffer, error, sizeof(error) - 1);

Modified: trafficserver/traffic/trunk/example/file-1/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/file-1/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/file-1/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/file-1/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: file-1.so
+pkglib_LTLIBRARIES = file-1.la
+file_1_la_SOURCES = file-1.c
+file_1_la_LDFLAGS = -module
 
-file-1.o: file-1.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o file-1.o -c file-1.c
-
-file-1.so: file-1.o
-	$(CC) $(LDFLAGS) -o file-1.so file-1.o
-
-clean:
-	rm -f file-1.so file-1.o
+all:
+	ln -sf .libs/file-1.so

Modified: trafficserver/traffic/trunk/example/file_system_cache/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/file_system_cache/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/file_system_cache/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/file_system_cache/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-LDFLAGS= -g -m32 -shared
-TS_BASE=../../../..
-CXXFLAGS= -g -D_REENTRANT=1 -m32 -I. -I$(TS_BASE)/proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-diskcache_plugin.so: diskcache_plugin.o DiskCache.o
-	$(CXX) $(LDFLAGS) $^ -o $@
-
-test_diskcache: DiskCache.o test_diskcache.o
-	$(CXX) -g -m32 $^ -o $@ -lcrypto -pthread -lrt
-
-
-
-
-clean:
-	rm -f *.o test_diskcache
+pkglib_LTLIBRARIES = diskcache.la
+diskcache_la_SOURCES = 
+diskcache_la_LDFLAGS = -module
 
+all:
+	ln -sf .libs/diskcache.so

Modified: trafficserver/traffic/trunk/example/gzip-transform/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/gzip-transform/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/gzip-transform/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/gzip-transform/Makefile.am Mon May  3 17:54:16 2010
@@ -14,25 +14,15 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@ -lz
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: gzip.so gunzip.so
-
-gzip.o: gzip.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -I/usr/local/include -o gzip.o -c gzip.c
-
-gunzip.o: gunzip.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -I/usr/local/include -o gunzip.o -c gunzip.c
-
-gzip.so: gzip.o
-	$(CC) $(LDFLAGS) -L/usr/local/lib -o gzip.so gzip.o
-
-gunzip.so: gunzip.o
-	$(CC) $(LDFLAGS) -L/usr/local/lib -o gunzip.so gunzip.o
-
-clean:
-	rm -f gzip.so gzip.o gunzip.so gunzip.o 
+pkglib_LTLIBRARIES = gzip.la gunzip.la
+gzip_la_SOURCES = gzip.c
+gzip_la_LDFLAGS = -module
+
+gunzip_la_SOURCES = gunzip.c
+gunzip_la_LDFLAGS = -module
+
+all:
+	ln -sf .libs/gzip.so
+	ln -sf .libs/gunzip.so

Modified: trafficserver/traffic/trunk/example/gzip-transform/gunzip.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/gzip-transform/gunzip.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/gzip-transform/gunzip.c (original)
+++ trafficserver/traffic/trunk/example/gzip-transform/gunzip.c Mon May  3 17:54:16 2010
@@ -58,8 +58,6 @@ char dictionary[800000];
 void
 load_dictionary(char *dict, uLong * adler)
 {
-  char path[DICT_PATH_MAX];
-  char line[1024];
   FILE *fp;
   int i = 0;
 
@@ -71,10 +69,11 @@ load_dictionary(char *dict, uLong * adle
 
   i = 0;
   while (!feof(fp)) {
-    fscanf(fp, "%s\n", dict + i);
-    i = strlen(dict);
-    strcat(dict + i, " ");
-    i++;
+    if (fscanf(fp, "%s\n", dict + i) == 1) {
+      i = strlen(dict);
+      strcat(dict + i, " ");
+      i++;
+    }
   }
   dict[i - 1] = '\0';
 
@@ -100,7 +99,6 @@ static GzipData *
 gzip_data_alloc()
 {
   GzipData *data;
-  int err;
 
   data = (GzipData *) INKmalloc(sizeof(GzipData));
   data->output_vio = NULL;
@@ -151,9 +149,6 @@ static void
 gzip_transform_init(INKCont contp, GzipData * data)
 {
   INKVConn output_conn;
-  INKMBuffer bufp;
-  INKMLoc hdr_loc;
-  INKMLoc field_loc;
 
   data->state = 1;
 
@@ -172,11 +167,9 @@ gzip_transform_one(GzipData * data, INKI
   INKIOBufferBlock blkp;
   const char *ibuf;
   char *obuf;
-  int ilength, olength, i;
+  int ilength, olength;
   int err = Z_OK;
 
-  int size;
-
   while (amount > 0) {
     blkp = INKIOBufferReaderStart(input_reader);
     ibuf = INKIOBufferBlockReadStart(blkp, input_reader, &ilength);
@@ -242,12 +235,9 @@ gzip_transform_finish(GzipData * data)
 {
   if (data->state == 1) {
     INKIOBufferBlock blkp;
-    char buf[8], *p;
     char *obuf;
     int olength;
     int err;
-    uLong tmp;
-    int length;
 
     data->state = 2;
 
@@ -437,9 +427,6 @@ gzip_transformable(INKHttpTxn txnp, int 
   INKMLoc hdr_loc;
   INKMLoc field_loc;
   const char *value;
-  int nvalues;
-  int i;
-
 
   if (server) {
     INKHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
@@ -473,7 +460,6 @@ static void
 gzip_transform_add(INKHttpTxn txnp, int flag)
 {
   INKVConn connp;
-  INKVConn request_connp;
   GzipData *data;
 
   data = gzip_data_alloc();
@@ -496,7 +482,6 @@ transform_plugin(INKCont contp, INKEvent
     {
       INKMBuffer bufp;
       INKMLoc hdr_loc;
-      INKMLoc field_loc;
       INKMLoc ae_loc;           /* for the accept encoding mime field */
 
       INKHttpTxnClientReqGet(txnp, &bufp, &hdr_loc);

Modified: trafficserver/traffic/trunk/example/gzip-transform/gzip.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/gzip-transform/gzip.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/gzip-transform/gzip.c (original)
+++ trafficserver/traffic/trunk/example/gzip-transform/gzip.c Mon May  3 17:54:16 2010
@@ -57,8 +57,6 @@ char dictionary[800000];
 void
 load_dictionary(char *dict, uLong * adler)
 {
-  char path[DICT_PATH_MAX];
-  char line[1024];
   FILE *fp;
   int i = 0;
 
@@ -72,10 +70,11 @@ load_dictionary(char *dict, uLong * adle
 
   i = 0;
   while (!feof(fp)) {
-    fscanf(fp, "%s\n", dict + i);
-    i = strlen(dict);
-    strcat(dict + i, " ");
-    i++;
+    if (fscanf(fp, "%s\n", dict + i) == 1) {
+      i = strlen(dict);
+      strcat(dict + i, " ");
+      i++;
+    }
   }
   dict[i - 1] = '\0';
 
@@ -102,7 +101,6 @@ gzip_data_alloc()
 {
   GzipData *data;
   int err;
-  int size, i;
 
   data = (GzipData *) INKmalloc(sizeof(GzipData));
   data->output_vio = NULL;
@@ -167,7 +165,6 @@ gzip_transform_init(INKCont contp, GzipD
   INKVConn output_conn;
   INKMBuffer bufp;
   INKMLoc hdr_loc;
-  INKMLoc field_loc;
   INKMLoc ce_loc;               /* for the content encoding mime field */
 
   data->state = 1;
@@ -250,12 +247,9 @@ gzip_transform_finish(GzipData * data)
 {
   if (data->state == 1) {
     INKIOBufferBlock blkp;
-    char buf[8], *p;
     char *obuf;
     int olength;
     int err;
-    uLong tmp;
-    int length;
 
     data->state = 2;
 

Modified: trafficserver/traffic/trunk/example/hello/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/hello/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/hello/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/hello/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: hello.so
+pkglib_LTLIBRARIES = hello.la
+hello_la_SOURCES = hello.c
+hello_la_LDFLAGS = -module
 
-hello.o: hello.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o hello.o -c hello.c
-
-hello.so: hello.o
-	$(CC) $(LDFLAGS) -o hello.so hello.o
-
-clean:
-	rm -f hello.so hello.o
+all:
+	ln -sf .libs/hello.so

Modified: trafficserver/traffic/trunk/example/null-transform/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/null-transform/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/null-transform/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/null-transform/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: null-transform.so
+pkglib_LTLIBRARIES = null-transform.la
+null_transform_la_SOURCES = null-transform.c
+null_transform_la_LDFLAGS = -module
 
-null-transform.o: null-transform.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o null-transform.o -c null-transform.c
-
-null-transform.so: null-transform.o
-	$(CC) $(LDFLAGS) -o null-transform.so null-transform.o
-
-clean:
-	rm -f null-transform.so null-transform.o
+all:
+	ln -sf .libs/null-transform.so

Modified: trafficserver/traffic/trunk/example/output-header/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/output-header/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/output-header/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/output-header/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: output-header.so
+pkglib_LTLIBRARIES = output-header.la
+output_header_la_SOURCES = output-header.c
+output_header_la_LDFLAGS = -module
 
-output-header.o: output-header.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o output-header.o -c output-header.c
-
-output-header.so: output-header.o
-	$(CC) $(LDFLAGS) -o output-header.so output-header.o
-
-clean:
-	rm -f output-header.so output-header.o
+all:
+	ln -sf .libs/output-header.so

Modified: trafficserver/traffic/trunk/example/prefetch/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/prefetch/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/prefetch/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/prefetch/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=@ld@
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: prefetch-plugin-eg1.so
+pkglib_LTLIBRARIES = prefetch.la
+prefetch_la_SOURCES = prefetch.c
+prefetch_la_LDFLAGS = -module
 
-prefetch-plugin-eg1.o: prefetch-plugin-eg1.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o prefetch-plugin-eg1.o -c prefetch-plugin-eg1.c
-
-prefetch-plugin-eg1.so: prefetch-plugin-eg1.o
-	$(CC) $(LDFLAGS) -o prefetch-plugin-eg1.so prefetch-plugin-eg1.o
-
-clean:
-	rm -f prefetch-plugin-eg1.so prefetch-plugin-eg1.o
+all:
+	ln -sf .libs/prefetch.so

Modified: trafficserver/traffic/trunk/example/protocol/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/protocol/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/protocol/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/protocol/Makefile.am Mon May  3 17:54:16 2010
@@ -14,23 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: protocol.so
-
-TxnSM.o: TxnSM.c TxnSM.h $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o TxnSM.o -c TxnSM.c
-
-Protocol.o: Protocol.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o Protocol.o -c Protocol.c
-
-protocol.so: Protocol.o TxnSM.o
-	$(CC) $(LDFLAGS) -o protocol.so Protocol.o TxnSM.o
-
-clean:
-	rm -f protocol.so Protocol.o TxnSM.o
+pkglib_LTLIBRARIES = protocol.la
+protocol_la_SOURCES = Protocol.c TxnSM.c
+protocol_la_LDFLAGS = -module
 
+all:
+	ln -sf .libs/protocol.so

Modified: trafficserver/traffic/trunk/example/protocol/Protocol.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/protocol/Protocol.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/protocol/Protocol.c (original)
+++ trafficserver/traffic/trunk/example/protocol/Protocol.c Mon May  3 17:54:16 2010
@@ -22,6 +22,8 @@
  */
 
 #include "Protocol.h"
+#include "TxnSM.h"
+#include <math.h>
 
 /* global variable */
 INKTextLogObject protocol_plugin_log;

Copied: trafficserver/traffic/trunk/example/query_remap/Makefile.am (from r940506, trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am)
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/query_remap/Makefile.am?p2=trafficserver/traffic/trunk/example/query_remap/Makefile.am&p1=trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am&r1=940506&r2=940536&rev=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/query_remap/Makefile.am Mon May  3 17:54:16 2010
@@ -14,12 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=cc
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: gen 
+pkglib_LTLIBRARIES = query_remap.la
+query_remap_la_SOURCES = query_remap.c
+query_remap_la_LDFLAGS = -module
 
-gen: gen.c
-	$(CC) -o gen gen.c
-
-clean:
-	rm -f gen gen.o 
+all:
+	ln -sf .libs/query_remap.so

Modified: trafficserver/traffic/trunk/example/redirect-1/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/redirect-1/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/redirect-1/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/redirect-1/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: redirect-1.so
+pkglib_LTLIBRARIES = redirect-1.la
+redirect_1_la_SOURCES = redirect-1.c
+redirect_1_la_LDFLAGS = -module
 
-redirect-1.o: redirect-1.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o redirect-1.o -c redirect-1.c
-
-redirect-1.so: redirect-1.o
-	$(CC) $(LDFLAGS) -o redirect-1.so redirect-1.o
-
-clean:
-	rm -f redirect-1.so redirect-1.o
+all:
+	ln -sf .libs/redirect-1.so

Modified: trafficserver/traffic/trunk/example/redirect-1/redirect-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/redirect-1/redirect-1.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/redirect-1/redirect-1.c (original)
+++ trafficserver/traffic/trunk/example/redirect-1/redirect-1.c Mon May  3 17:54:16 2010
@@ -33,6 +33,7 @@
  *
  */
 
+#include <stdio.h>
 #include <string.h>
 
 #if !defined (_WIN32)
@@ -216,9 +217,6 @@ handle_response(INKHttpTxn txnp)
 {
   INKMBuffer bufp;
   INKMLoc hdr_loc, newfield_loc;
-  INKMLoc url_loc;
-  char *url_str;
-  char *buf;
   char *errormsg_body = "All requests from this IP address are redirected.\n";
   char *tmp_body;
 

Modified: trafficserver/traffic/trunk/example/remap/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/remap/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/remap/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/remap/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CXXFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: remap.so
+pkglib_LTLIBRARIES = remap.la
+remap_la_SOURCES = remap.cc
+remap_la_LDFLAGS = -module
 
-remap.o: replace-header.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o remap.o -c remap.c
-
-remap.so: remap.o
-	$(CC) $(LDFLAGS) -o remap.so remap.o
-
-clean:
-	rm -f remap.so remap.o
+all:
+	ln -sf .libs/remap.so

Modified: trafficserver/traffic/trunk/example/remap/remap.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/remap/remap.cc?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/remap/remap.cc (original)
+++ trafficserver/traffic/trunk/example/remap/remap.cc Mon May  3 17:54:16 2010
@@ -141,7 +141,7 @@ remap_entry::remove_from_list(remap_entr
 
 /* ----------------------- store_my_error_message -------------------------- */
 static int
-store_my_error_message(int retcode, char *err_msg_buf, int buf_size, char *fmt, ...)
+store_my_error_message(int retcode, char *err_msg_buf, int buf_size, const char *fmt, ...)
 {
   if (likely(err_msg_buf && buf_size > 0 && fmt)) {
     va_list ap;
@@ -178,9 +178,9 @@ void
 INKPluginInit(int argc, const char *argv[])
 {
   INKPluginRegistrationInfo info;
-  info.plugin_name = "remap_plugin";
-  info.vendor_name = "Apache";
-  info.support_email = "";
+  info.plugin_name = (char*)"remap_plugin";
+  info.vendor_name = (char*)"Apache";
+  info.support_email = (char*)"";
 
   if (!INKPluginRegister(INK_SDK_VERSION_2_0, &info)) {
     INKError("Plugin registration failed. \n");
@@ -227,6 +227,8 @@ tsremap_done(void)
 {
   fprintf(stderr, "Remap Plugin: tsremap_done()\n");
   /* do nothing */
+
+  return 0;
 }
 
 
@@ -346,7 +348,7 @@ tsremap_remap(ihandle ih, rhandle rh, TS
   // note: You can store up to INKHttpTxnGetMaxArgCnt() variables.
   if (INKHttpTxnGetMaxArgCnt() > 0) {
     fprintf(stderr,
-            "[tsremap_remap] Save processing counter %d inside request processing block\n", _processing_counter);
+            "[tsremap_remap] Save processing counter %lu inside request processing block\n", _processing_counter);
     INKHttpTxnSetArg((INKHttpTxn) rh, 1, (void *) _processing_counter); // save counter
   }
   // How to cancel request processing and return error message to the client

Modified: trafficserver/traffic/trunk/example/replace-header/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/replace-header/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/replace-header/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/replace-header/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: replace-header.so
+pkglib_LTLIBRARIES = replace-header.la
+replace_header_la_SOURCES = replace-header.c
+replace_header_la_LDFLAGS = -module
 
-replace-header.o: replace-header.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o replace-header.o -c replace-header.c
-
-replace-header.so: replace-header.o
-	$(CC) $(LDFLAGS) -o replace-header.so replace-header.o
-
-clean:
-	rm -f replace-header.so replace-header.o
+all:
+	ln -sf .libs/replace-header.so

Modified: trafficserver/traffic/trunk/example/response-header-1/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/response-header-1/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/response-header-1/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/response-header-1/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: response-header-1.so
+pkglib_LTLIBRARIES = response-header-1.la
+response_header_1_la_SOURCES = response-header-1.c
+response_header_1_la_LDFLAGS = -module
 
-response-header-1.o: response-header-1.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o response-header-1.o -c response-header-1.c
-
-response-header-1.so: response-header-1.o
-	$(CC) $(LDFLAGS) -o response-header-1.so response-header-1.o
-
-clean:
-	rm -f response-header-1.so response-header-1.o
+all:
+	ln -sf .libs/response-header-1.so

Modified: trafficserver/traffic/trunk/example/response-header-1/response-header-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/response-header-1/response-header-1.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/response-header-1/response-header-1.c (original)
+++ trafficserver/traffic/trunk/example/response-header-1/response-header-1.c Mon May  3 17:54:16 2010
@@ -47,6 +47,7 @@
  *
  */
 
+#include <time.h>
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -73,14 +74,13 @@ modify_header(INKHttpTxn txnp, INKCont c
   INKMLoc cached_loc;
   INKHttpStatus resp_status;
   INKMLoc new_field_loc;
-  INKMLoc new_value_loc;
   INKMLoc cached_field_loc;
   time_t recvd_time;
 
   const char *chkptr;
   int chklength;
 
-  int num_refreshes;
+  int num_refreshes = 0;
 
   if (!init_buffer_status)
     return;                     /* caller reenables */
@@ -273,8 +273,6 @@ INKPluginInit(int argc, const char *argv
 {
   INKMLoc chk_field_loc;
 
-  const char *p;
-  int i;
   INKPluginRegistrationInfo info;
 
   info.plugin_name = "response-header-1";
@@ -321,7 +319,7 @@ INKPluginInit(int argc, const char *argv
   field_loc = INKMimeHdrFieldCreate(hdr_bufp, hdr_loc);
   INKMimeHdrFieldInsert(hdr_bufp, hdr_loc, field_loc, -1);
   INKMimeHdrFieldNameSet(hdr_bufp, hdr_loc, field_loc, mimehdr1_name, strlen(mimehdr1_name));
-  value_loc = INKMimeHdrFieldValueInsert(hdr_bufp, hdr_loc, field_loc, mimehdr1_value, strlen(mimehdr1_value), -1);
+  INKMimeHdrFieldValueInsert(hdr_bufp, hdr_loc, field_loc, mimehdr1_value, strlen(mimehdr1_value), -1);
   INKDebug("resphdr", "init buffer hdr, field and value locs are %d, %d and %d", hdr_loc, field_loc, value_loc);
   init_buffer_status = 1;
 

Modified: trafficserver/traffic/trunk/example/server-transform/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/server-transform/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/server-transform/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/server-transform/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: server-transform.so
+pkglib_LTLIBRARIES = server-transform.la
+server_transform_la_SOURCES = server-transform.c
+server_transform_la_LDFLAGS = -module
 
-server-transform.o: server-transform.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o server-transform.o -c server-transform.c
-
-server-transform.so: server-transform.o
-	$(CC) $(LDFLAGS) -o server-transform.so server-transform.o
-
-clean:
-	rm -f server-transform.so server-transform.o
+all:
+	ln -sf .libs/server-transform.so

Modified: trafficserver/traffic/trunk/example/server-transform/server-transform.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/server-transform/server-transform.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/server-transform/server-transform.c (original)
+++ trafficserver/traffic/trunk/example/server-transform/server-transform.c Mon May  3 17:54:16 2010
@@ -52,6 +52,7 @@
    transformation. (i.e. A transformation which does not modify the
    content). */
 
+#include <string.h>
 #include <stdio.h>
 
 #if !defined (_WIN32)
@@ -397,9 +398,6 @@ transform_buffer_event(INKCont contp, Tr
   int avail;
 
   if (!data->input_buf) {
-    INKIOBufferData d;
-    INKIOBufferBlock b;
-
     data->input_buf = INKIOBufferCreate();
     if ((data->input_buf == NULL) || (data->input_buf == INK_ERROR_PTR)) {
       INKError("Error in Creating buffer");
@@ -672,7 +670,7 @@ transform_handler(INKCont contp, INKEven
     return 0;
   } else {
     TransformData *data;
-    int val;
+    int val = 0;
 
     data = (TransformData *) INKContDataGet(contp);
     if ((data == NULL) && (data == INK_ERROR_PTR)) {

Modified: trafficserver/traffic/trunk/example/session-1/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/session-1/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/session-1/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/session-1/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: session-1.so
+pkglib_LTLIBRARIES = session-1.la
+session_1_la_SOURCES = session-1.c
+session_1_la_LDFLAGS = -module
 
-session-1.o: session-1.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o session-1.o -c session-1.c
-
-session-1.so: session-1.o
-	$(CC) $(LDFLAGS) -o session-1.so session-1.o
-
-clean:
-	rm -f session-1.so session-1.o
+all:
+	ln -sf .libs/session-1.so

Modified: trafficserver/traffic/trunk/example/thread-1/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-1/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-1/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/thread-1/Makefile.am Mon May  3 17:54:16 2010
@@ -14,19 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: thread-1.so
+pkglib_LTLIBRARIES = thread-1.la
+thread_1_la_SOURCES = thread-1.c
+thread_1_la_LDFLAGS = -module
 
-thread-1.o: thread-1.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o thread-1.o -c thread-1.c
-
-thread-1.so: thread-1.o
-	$(CC) $(LDFLAGS) -o thread-1.so thread-1.o
-
-clean:
-	rm -f thread-1.so thread-1.o
+all:
+	ln -sf .libs/thread-1.so

Modified: trafficserver/traffic/trunk/example/thread-1/thread-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-1/thread-1.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-1/thread-1.c (original)
+++ trafficserver/traffic/trunk/example/thread-1/thread-1.c Mon May  3 17:54:16 2010
@@ -92,8 +92,6 @@ check_ts_version()
 void
 INKPluginInit(int argc, const char *argv[])
 {
-  int i;
-  INKCont contp;
   INKPluginRegistrationInfo info;
 
   info.plugin_name = "thread-1";

Modified: trafficserver/traffic/trunk/example/thread-pool/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/thread-pool/Makefile.am Mon May  3 17:54:16 2010
@@ -14,23 +14,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-CC=@CC@
-LD=ld
-CFLAGS=@CFLAGS@ @SHARED_CFLAGS@
-LDFLAGS=@LDFLAGS@ @SHARED_LDFLAGS@
-API_INC=../../proxy/api/include
+CFLAGS+=-I$(top_srcdir)/proxy/api/include
 
-default: psi.so
-
-thread.o: thread.c thread.h $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o thread.o -c thread.c
-
-psi.o: psi.c $(API_INC)/ts.h
-	$(CC) $(CFLAGS) -I$(API_INC) -o psi.o -c psi.c
-
-psi.so: psi.o thread.o
-	$(CC) $(LDFLAGS) -o psi.so psi.o thread.o
-
-clean:
-	rm -f psi.so psi.o thread.o
+pkglib_LTLIBRARIES = psi.la
+psi_la_SOURCES = psi.c thread.c
+psi_la_LDFLAGS = -module
 
+all:
+	ln -sf .libs/psi.so

Modified: trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am (original)
+++ trafficserver/traffic/trunk/example/thread-pool/include/Makefile.am Mon May  3 17:54:16 2010
@@ -16,10 +16,10 @@
 
 CC=cc
 
-default: gen 
+all:  gen 
 
 gen: gen.c
 	$(CC) -o gen gen.c
 
-clean:
+clean-local:
 	rm -f gen gen.o 

Modified: trafficserver/traffic/trunk/example/thread-pool/psi.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/psi.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/psi.c (original)
+++ trafficserver/traffic/trunk/example/thread-pool/psi.c Mon May  3 17:54:16 2010
@@ -130,6 +130,9 @@ extern Queue job_queue;
 static INKTextLogObject log;
 static char psi_directory[PSI_PATH_MAX_SIZE];
 
+
+static int trylock_handler(INKCont contp, INKEvent event, void *edata);
+
 /*-------------------------------------------------------------------------
   cont_data_alloc
   Allocate and initialize a ContData structure associated to a transaction
@@ -460,6 +463,7 @@ parse_data(INKCont contp, INKIOBufferRea
     INKAssert(!"strextract_ioreader returned bad status");
   }
 
+  return 0;
 }
 
 /*-------------------------------------------------------------------------
@@ -589,11 +593,6 @@ psi_include(INKCont contp, void *edata)
   /* Note: if the blocking call was not in the transformation state (i.e. in
      INK_HTTP_READ_REQUEST_HDR, INK_HTTP_OS_DNS and so on...) we could
      use INKHttpTxnReenable to wake up the transaction instead of sending an event. */
-done:
-  INKContSchedule(contp, 0);
-  data->state = STATE_DUMP_PSI;
-  INKMutexUnlock(INKContMutexGet(contp));
-  return 1;
 
 error:
   INKContSchedule(contp, 0);
@@ -881,26 +880,6 @@ dump_psi(INKCont contp)
   return 0;
 }
 
-/*-------------------------------------------------------------------------
-  trylock_handler
-  Small handler to handle INKMutexTryLock failures
-
-  Input:
-    contp      continuation for the current transaction
-    event      event received
-    data       pointer on optional data
-  Output :
-  Return Value:
-  -------------------------------------------------------------------------*/
-static int
-trylock_handler(INKCont contp, INKEvent event, void *edata)
-{
-  TryLockData *data = INKContDataGet(contp);
-  transform_handler(data->contp, data->event, NULL);
-  INKfree(data);
-  INKContDestroy(contp);
-  return 0;
-}
 
 /*-------------------------------------------------------------------------
   transform_handler
@@ -1005,6 +984,27 @@ transform_handler(INKCont contp, INKEven
   return 1;
 }
 
+/*-------------------------------------------------------------------------
+  trylock_handler
+  Small handler to handle INKMutexTryLock failures
+
+  Input:
+    contp      continuation for the current transaction
+    event      event received
+    data       pointer on optional data
+  Output :
+  Return Value:
+  -------------------------------------------------------------------------*/
+static int
+trylock_handler(INKCont contp, INKEvent event, void *edata)
+{
+  TryLockData *data = INKContDataGet(contp);
+  transform_handler(data->contp, data->event, NULL);
+  INKfree(data);
+  INKContDestroy(contp);
+  return 0;
+}
+
 
 /*-------------------------------------------------------------------------
   transformable
@@ -1191,7 +1191,7 @@ void
 INKPluginInit(int argc, const char *argv[])
 {
   INKPluginRegistrationInfo info;
-  int error, i;
+  int i;
   INKReturnCode retval;
 
   info.plugin_name = "psi";

Modified: trafficserver/traffic/trunk/example/thread-pool/thread.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/thread.c?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/thread.c (original)
+++ trafficserver/traffic/trunk/example/thread-pool/thread.c Mon May  3 17:54:16 2010
@@ -160,11 +160,10 @@ thread_init()
   pthread_cond_init(&cond, NULL);
 }
 
-void *
+void
 thread_loop(void *arg)
 {
   Job *job_todo;
-  char *thread_name = (char *) arg;
 
   /* Infinite loop */
   for (;;) {

Modified: trafficserver/traffic/trunk/example/thread-pool/thread.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/thread.h?rev=940536&r1=940535&r2=940536&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/thread.h (original)
+++ trafficserver/traffic/trunk/example/thread-pool/thread.h Mon May  3 17:54:16 2010
@@ -84,6 +84,6 @@ void thread_signal_job();
 
 void thread_init();
 
-void *thread_loop(void *arg);
+void thread_loop(void *arg);
 
 #endif



Mime
View raw message