From: Francesco Chemolli Date: Tue, 23 Feb 2016 08:51:22 +0000 (+0100) Subject: initial version of libsbuf X-Git-Tag: SQUID_4_0_8~60^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65e41a45348d24c5769e811d502efca6a9004cac;p=thirdparty%2Fsquid.git initial version of libsbuf --- diff --git a/configure.ac b/configure.ac index d852733ad7..a2a5b3f7cc 100644 --- a/configure.ac +++ b/configure.ac @@ -3881,6 +3881,7 @@ AC_CONFIG_FILES([ src/mgr/Makefile src/parser/Makefile src/repl/Makefile + src/sbuf/Makefile src/security/Makefile src/security/cert_generators/Makefile src/security/cert_generators/file/Makefile diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index dfc99f14e0..ed5d7e4e9c 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -24,7 +24,7 @@ #include "ipc/Queue.h" #include "ipc/StrandSearch.h" #include "ipc/UdsOp.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidConfig.h" #include "SquidTime.h" #include "StatCounters.h" diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 8853c21865..cc968c60bd 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -15,7 +15,7 @@ #include "HttpHeaderFieldStat.h" #include "HttpHeaderStat.h" #include "HttpHeaderTools.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "StatHist.h" #include "Store.h" #include "StrList.h" diff --git a/src/Makefile.am b/src/Makefile.am index 0e5acccb66..f1c3edd19c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,13 +13,10 @@ DNSSOURCE = \ SBUF_SOURCE= \ base/CharacterSet.h \ base/InstanceId.h \ - MemBlob.h \ - MemBlob.cc \ - OutOfBoundsException.h \ - SBuf.h \ - SBuf.cc \ - SBufExceptions.h \ - SBufExceptions.cc + sbuf/MemBlob.h \ + sbuf/OutOfBoundsException.h \ + sbuf/SBuf.h \ + sbuf/SBufExceptions.h STOREMETA_SOURCE = \ StoreMeta.cc \ @@ -42,8 +39,8 @@ LOADABLE_MODULES_SOURCES = \ LoadableModules.h \ LoadableModules.cc -SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl store DiskIO -DIST_SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl store DiskIO +SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients sbuf servers fs repl store DiskIO +DIST_SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients sbuf servers fs repl store DiskIO if ENABLE_AUTH SUBDIRS += auth @@ -421,9 +418,6 @@ squid_SOURCES = \ RemovalPolicy.h \ send-announce.h \ send-announce.cc \ - $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ SBufDetailedStats.cc \ SBufStatsAction.h \ @@ -550,6 +544,7 @@ squid_LDADD = \ $(AUTH_LIBS) \ acl/libapi.la \ clients/libclients.la \ + sbuf/libsbuf.la \ servers/libservers.la \ ftp/libftp.la \ helper/libhelper.la \ @@ -571,6 +566,7 @@ squid_LDADD = \ icmp/libicmp.la \ log/liblog.la \ format/libformat.la \ + sbuf/libsbuf.la \ $(XTRA_OBJS) \ $(REPL_OBJS) \ $(NETTLELIB) \ @@ -998,9 +994,6 @@ tests_testHttpReply_SOURCES=\ Notes.cc \ SquidString.h \ SquidTime.h \ - $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ String.cc \ @@ -1054,6 +1047,7 @@ tests_testHttpReply_LDADD=\ base/libbase.la \ ipc/libipc.la \ mem/libmem.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ @@ -1111,9 +1105,6 @@ tests_testACLMaxUserIP_SOURCES= \ StrList.cc \ tests/stub_StatHist.cc \ stmem.cc \ - $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ String.cc \ @@ -1189,6 +1180,7 @@ tests_testACLMaxUserIP_LDADD= \ ip/libip.la \ ipc/libipc.la \ mgr/libmgr.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ @@ -1379,9 +1371,6 @@ tests_testCacheManager_SOURCES = \ refresh.h \ refresh.cc \ RemovalPolicy.cc \ - $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ $(SNMP_SOURCE) \ @@ -1473,6 +1462,7 @@ tests_testCacheManager_LDADD = \ $(SNMP_LIBS) \ mem/libmem.la \ store/libstore.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ @@ -1552,9 +1542,6 @@ tests_testDiskIO_SOURCES = \ StatHist.h \ tests/stub_StatHist.cc \ stmem.cc \ - $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ StoreFileSystem.cc \ @@ -1652,6 +1639,7 @@ tests_testDiskIO_LDADD = \ base/libbase.la \ mem/libmem.la \ store/libstore.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ @@ -1818,9 +1806,6 @@ tests_testEvent_SOURCES = \ RemovalPolicy.cc \ StrList.h \ StrList.cc \ - $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ $(SNMP_SOURCE) \ @@ -1917,6 +1902,7 @@ tests_testEvent_LDADD = \ ipc/libipc.la \ mgr/libmgr.la \ store/libstore.la \ + sbuf/libsbuf.la \ $(SNMP_LIBS) \ $(NETTLELIB) \ $(REGEXLIB) \ @@ -2062,8 +2048,6 @@ tests_testEventLoop_SOURCES = \ refresh.h \ refresh.cc \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ $(SNMP_SOURCE) \ @@ -2161,6 +2145,7 @@ tests_testEventLoop_LDADD = \ $(top_builddir)/lib/libmiscutil.la \ ipc/libipc.la \ mgr/libmgr.la \ + sbuf/libsbuf.la \ store/libstore.la \ $(SNMP_LIBS) \ $(NETTLELIB) \ @@ -2303,8 +2288,6 @@ tests_test_http_range_SOURCES = \ refresh.cc \ RemovalPolicy.cc \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ $(SNMP_SOURCE) \ @@ -2399,6 +2382,7 @@ tests_test_http_range_LDADD = \ dns/libdns.la \ base/libbase.la \ mgr/libmgr.la \ + sbuf/libsbuf.la \ store/libstore.la \ $(SNMP_LIBS) \ $(top_builddir)/lib/libmisccontainers.la \ @@ -2434,6 +2418,7 @@ tests_testTokenizer_LDFLAGS = $(LIBADD_DL) tests_testTokenizer_LDADD = \ parser/libparser.la \ base/libbase.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ $(COMPAT_LIB) \ $(SQUID_CPPUNIT_LA) \ @@ -2450,8 +2435,6 @@ tests_testHttp1Parser_SOURCES = \ String.cc \ cache_cf.h \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ tests/stub_SBufDetailedStats.cc \ tests/stub_cache_cf.cc \ tests/stub_cache_manager.cc \ @@ -2481,6 +2464,7 @@ tests_testHttp1Parser_LDADD= \ SquidConfig.o \ base/libbase.la \ ip/libip.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ $(SQUID_CPPUNIT_LIBS) \ $(SSLLIB) \ @@ -2630,8 +2614,6 @@ tests_testHttpRequest_SOURCES = \ refresh.cc \ RemovalPolicy.cc \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ $(SNMP_SOURCE) \ @@ -2715,6 +2697,7 @@ tests_testHttpRequest_LDADD = \ log/liblog.la \ format/libformat.la \ store/libstore.la \ + sbuf/libsbuf.la \ $(REPL_OBJS) \ $(ADAPTATION_LIBS) \ $(ESI_LIBS) \ @@ -2841,8 +2824,6 @@ tests_testStore_SOURCES= \ store_key_md5.h \ store_key_md5.cc \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ String.cc \ @@ -2930,6 +2911,7 @@ tests_testStore_LDADD= \ anyp/libanyp.la \ mem/libmem.la \ store/libstore.la \ + sbuf/libsbuf.la \ DiskIO/libdiskio.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ @@ -2975,6 +2957,7 @@ tests_testString_LDADD = \ base/libbase.la \ libsquid.la \ ip/libip.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ $(REGEXLIB) \ $(SQUID_CPPUNIT_LIBS) \ @@ -3082,8 +3065,6 @@ tests_testUfs_SOURCES = \ tests/stub_helper.cc \ cbdata.cc \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ String.cc \ @@ -3163,6 +3144,7 @@ tests_testUfs_LDADD = \ ip/libip.la \ mem/libmem.la \ store/libstore.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ @@ -3261,8 +3243,6 @@ tests_testRock_SOURCES = \ store_swapmeta.cc \ store_swapout.cc \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ String.cc \ @@ -3339,6 +3319,7 @@ tests_testRock_LDADD = \ base/libbase.la \ mem/libmem.la \ store/libstore.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ @@ -3480,8 +3461,6 @@ tests_testURL_SOURCES = \ refresh.cc \ RemovalPolicy.cc \ $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ $(SNMP_SOURCE) \ @@ -3580,6 +3559,7 @@ tests_testURL_LDADD = \ log/liblog.la \ format/libformat.la \ store/libstore.la \ + sbuf/libsbuf.la \ $(REGEXLIB) \ $(REPL_OBJS) \ $(ADAPTATION_LIBS) \ @@ -3608,9 +3588,6 @@ tests_testSBuf_SOURCES= \ $(SBUF_SOURCE) \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ - SBufAlgos.h \ - SBufAlgos.cc \ - SBufStream.h \ tests/stub_time.cc \ tests/stub_debug.cc \ tests/stub_fatal.cc \ @@ -3633,6 +3610,7 @@ tests_testSBuf_LDADD=\ libsquid.la \ ip/libip.la \ mgr/libmgr.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ $(REGEXLIB) \ $(SQUID_CPPUNIT_LIBS) \ @@ -3644,13 +3622,8 @@ tests_testSBufList_SOURCES= \ tests/testSBufList.h \ tests/testSBufList.cc \ $(SBUF_SOURCE) \ - SBufList.h \ - SBufList.cc \ - SBufAlgos.h \ - SBufAlgos.cc \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ - SBufStream.h \ tests/stub_time.cc \ tests/stub_MemObject.cc \ tests/stub_cbdata.cc \ @@ -3679,6 +3652,7 @@ tests_testSBufList_LDADD=\ libsquid.la \ ip/libip.la \ mgr/libmgr.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ $(SQUID_CPPUNIT_LIBS) \ $(COMPAT_LIB) \ @@ -3715,6 +3689,7 @@ tests_testConfigParser_LDADD = \ base/libbase.la \ libsquid.la \ ip/libip.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ $(REGEXLIB) \ $(SQUID_CPPUNIT_LIBS) \ @@ -3760,6 +3735,7 @@ nodist_tests_testStatHist_SOURCES = \ tests_testStatHist_LDFLAGS = $(LIBADD_DL) tests_testStatHist_LDADD = \ base/libbase.la \ + sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ $(top_builddir)/lib/libmisccontainers.la \ $(SQUID_CPPUNIT_LIBS) \ @@ -3775,13 +3751,12 @@ tests_testLookupTable_SOURCES = \ tests/stub_SBufDetailedStats.cc \ base/LookupTable.h \ String.cc \ - $(SBUF_SOURCE) \ - SBufAlgos.h \ - SBufAlgos.cc + $(SBUF_SOURCE) nodist_tests_testLookupTable_SOURCES = $(TESTSOURCES) tests_testLookupTable_LDFLAGS = $(LIBADD_DL) tests_testLookupTable_LDADD = \ base/libbase.la \ + sbuf/libsbuf.la \ $(SQUID_CPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) diff --git a/src/SBufDetailedStats.h b/src/SBufDetailedStats.h index 86761c1cb9..f5bc27f819 100644 --- a/src/SBufDetailedStats.h +++ b/src/SBufDetailedStats.h @@ -9,7 +9,7 @@ #ifndef SQUID_SBUFDETAILEDSTATS_H #define SQUID_SBUFDETAILEDSTATS_H -#include "SBuf.h" +#include "sbuf/SBuf.h" class StatHist; diff --git a/src/SBufStatsAction.h b/src/SBufStatsAction.h index e64233afae..2099fa78cb 100644 --- a/src/SBufStatsAction.h +++ b/src/SBufStatsAction.h @@ -10,7 +10,7 @@ #define SQUID_SBUFEXTRAS_H #include "mgr/Action.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "StatHist.h" class StoreEntry; diff --git a/src/URL.h b/src/URL.h index 02b7c58f70..7217663e3a 100644 --- a/src/URL.h +++ b/src/URL.h @@ -12,7 +12,7 @@ #include "anyp/UriScheme.h" #include "ip/Address.h" #include "rfc2181.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include diff --git a/src/acl/Acl.h b/src/acl/Acl.h index 698206a290..bbd87ab83a 100644 --- a/src/acl/Acl.h +++ b/src/acl/Acl.h @@ -14,7 +14,7 @@ #include "cbdata.h" #include "defines.h" #include "dlink.h" -#include "SBufList.h" +#include "sbuf/SBufList.h" #include #include diff --git a/src/acl/Data.h b/src/acl/Data.h index 17f3b8276f..bfb917daa5 100644 --- a/src/acl/Data.h +++ b/src/acl/Data.h @@ -9,7 +9,7 @@ #ifndef SQUID_ACLDATA_H #define SQUID_ACLDATA_H -#include "SBufList.h" +#include "sbuf/SBufList.h" /// \ingroup ACLAPI template diff --git a/src/acl/HttpHeaderData.cc b/src/acl/HttpHeaderData.cc index 5a8e275bf9..9d4c661434 100644 --- a/src/acl/HttpHeaderData.cc +++ b/src/acl/HttpHeaderData.cc @@ -17,7 +17,7 @@ #include "ConfigParser.h" #include "Debug.h" #include "HttpHeaderTools.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" /* Construct an ACLHTTPHeaderData that uses an ACLRegex rule with the value of the * selected header from a given request. diff --git a/src/acl/HttpHeaderData.h b/src/acl/HttpHeaderData.h index 44143d393b..c5b91e8b7c 100644 --- a/src/acl/HttpHeaderData.h +++ b/src/acl/HttpHeaderData.h @@ -11,7 +11,7 @@ #include "acl/Data.h" #include "HttpHeader.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidString.h" class ACLHTTPHeaderData : public ACLData diff --git a/src/acl/StringData.h b/src/acl/StringData.h index 60ca0dbbfa..77ac0cf2c6 100644 --- a/src/acl/StringData.h +++ b/src/acl/StringData.h @@ -11,7 +11,7 @@ #include "acl/Acl.h" #include "acl/Data.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include diff --git a/src/acl/Tree.h b/src/acl/Tree.h index d9314d031b..28518f2f27 100644 --- a/src/acl/Tree.h +++ b/src/acl/Tree.h @@ -10,7 +10,7 @@ #define SQUID_ACL_TREE_H #include "acl/BoolOps.h" -#include "SBufList.h" +#include "sbuf/SBufList.h" namespace Acl { diff --git a/src/acl/UserData.cc b/src/acl/UserData.cc index f5659f43c4..576cfebf68 100644 --- a/src/acl/UserData.cc +++ b/src/acl/UserData.cc @@ -14,7 +14,7 @@ #include "ConfigParser.h" #include "Debug.h" #include "globals.h" -#include "SBufAlgos.h" +#include "sbuf/SBufAlgos.h" #include "util.h" bool diff --git a/src/acl/UserData.h b/src/acl/UserData.h index a3d2476359..d99b18e7d9 100644 --- a/src/acl/UserData.h +++ b/src/acl/UserData.h @@ -11,7 +11,7 @@ #include "acl/Acl.h" #include "acl/Data.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include diff --git a/src/adaptation/History.h b/src/adaptation/History.h index 9e34fde06a..5acb842e79 100644 --- a/src/adaptation/History.h +++ b/src/adaptation/History.h @@ -13,7 +13,7 @@ #include "base/RefCount.h" #include "HttpHeader.h" #include "Notes.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidString.h" namespace Adaptation diff --git a/src/adaptation/icap/Xaction.h b/src/adaptation/icap/Xaction.h index 0d2cf28cb0..a562deb222 100644 --- a/src/adaptation/icap/Xaction.h +++ b/src/adaptation/icap/Xaction.h @@ -15,7 +15,7 @@ #include "comm/ConnOpener.h" #include "HttpReply.h" #include "ipcache.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #if USE_OPENSSL #include "ssl/PeerConnector.h" #endif diff --git a/src/anyp/PortCfg.h b/src/anyp/PortCfg.h index 11ee74647e..fc63a8e369 100644 --- a/src/anyp/PortCfg.h +++ b/src/anyp/PortCfg.h @@ -13,7 +13,7 @@ #include "anyp/ProtocolVersion.h" #include "anyp/TrafficMode.h" #include "comm/Connection.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "security/ServerOptions.h" #if USE_OPENSSL diff --git a/src/auth/CredentialsCache.h b/src/auth/CredentialsCache.h index b5e42126af..ff7b094b4b 100644 --- a/src/auth/CredentialsCache.h +++ b/src/auth/CredentialsCache.h @@ -11,7 +11,7 @@ #include "auth/User.h" #include "cbdata.h" -#include "SBufAlgos.h" +#include "sbuf/SBufAlgos.h" #include diff --git a/src/auth/User.h b/src/auth/User.h index d08422b6f7..30e738b49f 100644 --- a/src/auth/User.h +++ b/src/auth/User.h @@ -18,7 +18,7 @@ #include "dlink.h" #include "ip/Address.h" #include "Notes.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" class StoreEntry; diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc index abe73a1e34..2d17acf3c0 100644 --- a/src/auth/digest/Config.cc +++ b/src/auth/digest/Config.cc @@ -30,7 +30,7 @@ #include "HttpRequest.h" #include "mgr/Registration.h" #include "rfc2617.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidTime.h" #include "Store.h" #include "StrList.h" diff --git a/src/base/LookupTable.h b/src/base/LookupTable.h index 763cc53861..72190f317c 100644 --- a/src/base/LookupTable.h +++ b/src/base/LookupTable.h @@ -9,8 +9,8 @@ #ifndef SQUID_LOOKUPTABLE_H_ #define SQUID_LOOKUPTABLE_H_ -#include "SBuf.h" -#include "SBufAlgos.h" +#include "sbuf/SBuf.h" +#include "sbuf/SBufAlgos.h" #include diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 33bd63bd3a..d45d95a55d 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -52,7 +52,7 @@ #include "redirect.h" #include "RefreshPattern.h" #include "rfc1738.h" -#include "SBufList.h" +#include "sbuf/SBufList.h" #include "SquidConfig.h" #include "SquidString.h" #include "ssl/ProxyCerts.h" diff --git a/src/client_side.h b/src/client_side.h index ec3b9a796b..fc7a7a0898 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -18,7 +18,7 @@ #include "http/forward.h" #include "HttpControlMsg.h" #include "ipc/FdNotes.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "servers/Server.h" #if USE_AUTH #include "auth/UserRequest.h" diff --git a/src/clients/FtpRelay.cc b/src/clients/FtpRelay.cc index e0e7f58c14..4cb3726490 100644 --- a/src/clients/FtpRelay.cc +++ b/src/clients/FtpRelay.cc @@ -18,7 +18,7 @@ #include "http/Stream.h" #include "HttpHdrCc.h" #include "HttpRequest.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "servers/FtpServer.h" #include "SquidTime.h" #include "Store.h" diff --git a/src/comm.cc b/src/comm.cc index 212d6f64a7..e7b62176e1 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -31,7 +31,7 @@ #include "ip/tools.h" #include "pconn.h" #include "profiler/Profiler.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidConfig.h" #include "StatCounters.h" #include "StoreIOBuffer.h" diff --git a/src/comm/Read.cc b/src/comm/Read.cc index 70e61238b1..ffaefc8dc3 100644 --- a/src/comm/Read.cc +++ b/src/comm/Read.cc @@ -18,7 +18,7 @@ #include "Debug.h" #include "fd.h" #include "fde.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "StatCounters.h" //#include "tools.h" diff --git a/src/esi/CustomParser.h b/src/esi/CustomParser.h index 565fbaa790..664aa3a78a 100644 --- a/src/esi/CustomParser.h +++ b/src/esi/CustomParser.h @@ -14,7 +14,7 @@ class Trie; /* inherits from */ #include "esi/Parser.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidString.h" /** diff --git a/src/fs/rock/RockIoState.h b/src/fs/rock/RockIoState.h index 681e4b2fed..6926206715 100644 --- a/src/fs/rock/RockIoState.h +++ b/src/fs/rock/RockIoState.h @@ -10,7 +10,7 @@ #define SQUID_FS_ROCK_IO_STATE_H #include "fs/rock/RockSwapDir.h" -#include "MemBlob.h" +#include "sbuf/MemBlob.h" class DiskFile; diff --git a/src/ftp/Elements.cc b/src/ftp/Elements.cc index cfee20df47..64dac4a95a 100644 --- a/src/ftp/Elements.cc +++ b/src/ftp/Elements.cc @@ -12,7 +12,7 @@ #include "ftp/Elements.h" #include "HttpHdrCc.h" #include "HttpReply.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" // FTP does not have a notion of a "protocol version" but we need something for // compatibility with the current HttpMsg wrapping layer. We use version 1.1: diff --git a/src/globals.h b/src/globals.h index 2977647458..3b3c962d2b 100644 --- a/src/globals.h +++ b/src/globals.h @@ -15,7 +15,7 @@ #include "hash.h" #include "IoStats.h" #include "rfc2181.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" extern char *ConfigFile; /* NULL */ extern char *IcpOpcodeStr[]; diff --git a/src/helper.h b/src/helper.h index 8d6e1d5a24..f531bca70b 100644 --- a/src/helper.h +++ b/src/helper.h @@ -19,7 +19,7 @@ #include "helper/ChildConfig.h" #include "helper/forward.h" #include "ip/Address.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include #include diff --git a/src/http/MethodType.h b/src/http/MethodType.h index 6ec9c9a4e7..d8f661887b 100644 --- a/src/http/MethodType.h +++ b/src/http/MethodType.h @@ -9,7 +9,7 @@ #ifndef SQUID_SRC_HTTP_METHODTYPE_H #define SQUID_SRC_HTTP_METHODTYPE_H -#include "SBuf.h" +#include "sbuf/SBuf.h" namespace Http { diff --git a/src/http/RequestMethod.h b/src/http/RequestMethod.h index 028f463397..d6e0b664f0 100644 --- a/src/http/RequestMethod.h +++ b/src/http/RequestMethod.h @@ -11,7 +11,7 @@ #include "http/forward.h" #include "http/MethodType.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" class SquidConfig; diff --git a/src/http/one/Parser.h b/src/http/one/Parser.h index ff4d1c6685..abe30a245c 100644 --- a/src/http/one/Parser.h +++ b/src/http/one/Parser.h @@ -12,7 +12,7 @@ #include "anyp/ProtocolVersion.h" #include "http/one/forward.h" #include "http/StatusCode.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" namespace Http { namespace One { diff --git a/src/icmp/IcmpConfig.h b/src/icmp/IcmpConfig.h index 7e5331656d..4cd6b9d98c 100644 --- a/src/icmp/IcmpConfig.h +++ b/src/icmp/IcmpConfig.h @@ -14,7 +14,7 @@ #if USE_ICMP #include "cache_cf.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" /** * Squid pinger Configuration settings diff --git a/src/ipc/MemMap.h b/src/ipc/MemMap.h index 4fb9a1de09..18437e5de9 100644 --- a/src/ipc/MemMap.h +++ b/src/ipc/MemMap.h @@ -13,7 +13,7 @@ #include "ipc/mem/FlexibleArray.h" #include "ipc/mem/Pointer.h" #include "ipc/ReadWriteLock.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "store/forward.h" #include "store_key_md5.h" #include "tools.h" diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc index 105b1c6eda..9c39f398e2 100644 --- a/src/ipc/StoreMap.cc +++ b/src/ipc/StoreMap.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "ipc/StoreMap.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "Store.h" #include "store_key_md5.h" #include "tools.h" diff --git a/src/ipc/StoreMap.h b/src/ipc/StoreMap.h index 6494cdec0c..c53d4209a2 100644 --- a/src/ipc/StoreMap.h +++ b/src/ipc/StoreMap.h @@ -12,7 +12,7 @@ #include "ipc/mem/FlexibleArray.h" #include "ipc/mem/Pointer.h" #include "ipc/ReadWriteLock.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "store/forward.h" #include "store_key_md5.h" diff --git a/src/ipc/mem/Segment.cc b/src/ipc/mem/Segment.cc index dfc363d7de..289a2dff45 100644 --- a/src/ipc/mem/Segment.cc +++ b/src/ipc/mem/Segment.cc @@ -14,7 +14,7 @@ #include "Debug.h" #include "fatal.h" #include "ipc/mem/Segment.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "tools.h" #if HAVE_FCNTL_H diff --git a/src/log/TcpLogger.cc b/src/log/TcpLogger.cc index dfa96f28a9..a757e329ba 100644 --- a/src/log/TcpLogger.cc +++ b/src/log/TcpLogger.cc @@ -18,7 +18,7 @@ #include "log/CustomLog.h" #include "log/File.h" #include "log/TcpLogger.h" -#include "MemBlob.h" +#include "sbuf/MemBlob.h" #include "Parsing.h" #include "SquidConfig.h" #include "SquidTime.h" diff --git a/src/parser/Tokenizer.h b/src/parser/Tokenizer.h index 079d67c71c..49917e4312 100644 --- a/src/parser/Tokenizer.h +++ b/src/parser/Tokenizer.h @@ -10,7 +10,7 @@ #define SQUID_PARSER_TOKENIZER_H_ #include "base/CharacterSet.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" /// Generic protocol-agnostic parsing tools namespace Parser diff --git a/src/redirect.cc b/src/redirect.cc index d62089eabf..c6bffaa543 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -25,7 +25,7 @@ #include "mgr/Registration.h" #include "redirect.h" #include "rfc1738.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidConfig.h" #include "Store.h" #if USE_AUTH diff --git a/src/sbuf/Makefile.am b/src/sbuf/Makefile.am new file mode 100644 index 0000000000..5e0bae53dc --- /dev/null +++ b/src/sbuf/Makefile.am @@ -0,0 +1,26 @@ +## Copyright (C) 1996-2016 The Squid Software Foundation and contributors +## +## Squid software is distributed under GPLv2+ license and includes +## contributions from numerous individuals and organizations. +## Please see the COPYING and CONTRIBUTORS files for details. +## + +include $(top_srcdir)/src/Common.am +include $(top_srcdir)/src/TestHeaders.am + +noinst_LTLIBRARIES = libsbuf.la + +libsbuf_la_SOURCES = \ + ../base/CharacterSet.h \ + MemBlob.cc \ + MemBlob.h \ + OutOfBoundsException.h \ + SBuf.cc \ + SBuf.h \ + SBufAlgos.cc \ + SBufAlgos.h \ + SBufExceptions.cc \ + SBufExceptions.h \ + SBufList.cc \ + SBufList.h \ + SBufStream.h \ No newline at end of file diff --git a/src/MemBlob.cc b/src/sbuf/MemBlob.cc similarity index 99% rename from src/MemBlob.cc rename to src/sbuf/MemBlob.cc index 2e1ff92426..b488eafbe1 100644 --- a/src/MemBlob.cc +++ b/src/sbuf/MemBlob.cc @@ -9,7 +9,7 @@ #include "squid.h" #include "base/TextException.h" #include "Debug.h" -#include "MemBlob.h" +#include "sbuf/MemBlob.h" #include "SBufDetailedStats.h" #include diff --git a/src/MemBlob.h b/src/sbuf/MemBlob.h similarity index 100% rename from src/MemBlob.h rename to src/sbuf/MemBlob.h diff --git a/src/OutOfBoundsException.h b/src/sbuf/OutOfBoundsException.h similarity index 97% rename from src/OutOfBoundsException.h rename to src/sbuf/OutOfBoundsException.h index e3995dc2b4..a2545a7189 100644 --- a/src/OutOfBoundsException.h +++ b/src/sbuf/OutOfBoundsException.h @@ -10,7 +10,7 @@ #define _SQUID_SRC_OUTOFBOUNDSEXCEPTION_H #include "base/TextException.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" /** * Exception raised when the user is going out of bounds when accessing diff --git a/src/SBuf.cc b/src/sbuf/SBuf.cc similarity index 100% rename from src/SBuf.cc rename to src/sbuf/SBuf.cc diff --git a/src/SBuf.h b/src/sbuf/SBuf.h similarity index 99% rename from src/SBuf.h rename to src/sbuf/SBuf.h index 68c8afc37b..8bb77ab8ab 100644 --- a/src/SBuf.h +++ b/src/sbuf/SBuf.h @@ -14,7 +14,7 @@ #include "base/InstanceId.h" #include "Debug.h" #include "globals.h" -#include "MemBlob.h" +#include "sbuf/MemBlob.h" #include "SBufExceptions.h" #include "SquidString.h" diff --git a/src/SBufAlgos.cc b/src/sbuf/SBufAlgos.cc similarity index 100% rename from src/SBufAlgos.cc rename to src/sbuf/SBufAlgos.cc diff --git a/src/SBufAlgos.h b/src/sbuf/SBufAlgos.h similarity index 100% rename from src/SBufAlgos.h rename to src/sbuf/SBufAlgos.h diff --git a/src/SBufExceptions.cc b/src/sbuf/SBufExceptions.cc similarity index 100% rename from src/SBufExceptions.cc rename to src/sbuf/SBufExceptions.cc diff --git a/src/SBufExceptions.h b/src/sbuf/SBufExceptions.h similarity index 100% rename from src/SBufExceptions.h rename to src/sbuf/SBufExceptions.h diff --git a/src/SBufList.cc b/src/sbuf/SBufList.cc similarity index 100% rename from src/SBufList.cc rename to src/sbuf/SBufList.cc diff --git a/src/SBufList.h b/src/sbuf/SBufList.h similarity index 100% rename from src/SBufList.h rename to src/sbuf/SBufList.h diff --git a/src/SBufStream.h b/src/sbuf/SBufStream.h similarity index 100% rename from src/SBufStream.h rename to src/sbuf/SBufStream.h diff --git a/src/security/KeyData.h b/src/security/KeyData.h index 6f33692847..1aa8f7d0d2 100644 --- a/src/security/KeyData.h +++ b/src/security/KeyData.h @@ -9,7 +9,7 @@ #ifndef SQUID_SRC_SECURITY_KEYDATA_H #define SQUID_SRC_SECURITY_KEYDATA_H -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "security/forward.h" namespace Security diff --git a/src/servers/Server.h b/src/servers/Server.h index e9bfbf3146..0d2832fc03 100644 --- a/src/servers/Server.h +++ b/src/servers/Server.h @@ -18,7 +18,7 @@ #include "comm/Write.h" #include "CommCalls.h" #include "Pipeline.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" /** * Common base for all Server classes used diff --git a/src/ssl/bio.h b/src/ssl/bio.h index df2d926cb1..c8f537a159 100644 --- a/src/ssl/bio.h +++ b/src/ssl/bio.h @@ -10,7 +10,7 @@ #define SQUID_SSL_BIO_H #include "fd.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include #include diff --git a/src/ssl/support.h b/src/ssl/support.h index 2ece667acd..b54828693f 100644 --- a/src/ssl/support.h +++ b/src/ssl/support.h @@ -14,7 +14,7 @@ #if USE_OPENSSL #include "base/CbDataList.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "security/forward.h" #include "ssl/gadgets.h" diff --git a/src/tests/SBufFindTest.h b/src/tests/SBufFindTest.h index ffe9c4a8f2..7f28b03cf8 100644 --- a/src/tests/SBufFindTest.h +++ b/src/tests/SBufFindTest.h @@ -9,7 +9,7 @@ #ifndef SQUID_SRC_TEST_SBUFFINDTEST_H #define SQUID_SRC_TEST_SBUFFINDTEST_H -#include "SBuf.h" +#include "sbuf/SBuf.h" #include #include diff --git a/src/tests/stub_SBuf.cc b/src/tests/stub_SBuf.cc index 3a703c7838..6be715719c 100644 --- a/src/tests/stub_SBuf.cc +++ b/src/tests/stub_SBuf.cc @@ -11,7 +11,7 @@ #define STUB_API "SBuf.cc" #include "tests/STUB.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" InstanceIdDefinitions(SBuf, "SBuf"); diff --git a/src/tests/stub_SBufDetailedStats.cc b/src/tests/stub_SBufDetailedStats.cc index 59ff33a307..7d552822d8 100644 --- a/src/tests/stub_SBufDetailedStats.cc +++ b/src/tests/stub_SBufDetailedStats.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #define STUB_API "SBufDetailedStats.cc" #include "tests/STUB.h" diff --git a/src/tests/testSBuf.cc b/src/tests/testSBuf.cc index bc092a668d..0b896e3520 100644 --- a/src/tests/testSBuf.cc +++ b/src/tests/testSBuf.cc @@ -8,10 +8,10 @@ #include "squid.h" #include "base/CharacterSet.h" -#include "SBuf.h" -#include "SBufAlgos.h" +#include "sbuf/SBuf.h" +#include "sbuf/SBufAlgos.h" #include "SBufFindTest.h" -#include "SBufStream.h" +#include "sbuf/SBufStream.h" #include "SquidString.h" #include "testSBuf.h" #include "unitTestMain.h" diff --git a/src/tests/testSBuf.h b/src/tests/testSBuf.h index bc935598fb..40e8d0774f 100644 --- a/src/tests/testSBuf.h +++ b/src/tests/testSBuf.h @@ -11,7 +11,7 @@ #include -#include "OutOfBoundsException.h" +#include "sbuf/OutOfBoundsException.h" /* * test the SBuf functionalities diff --git a/src/tests/testSBufList.cc b/src/tests/testSBufList.cc index 4af14664f3..21f71b2722 100644 --- a/src/tests/testSBufList.cc +++ b/src/tests/testSBufList.cc @@ -7,8 +7,8 @@ */ #include "squid.h" -#include "SBufAlgos.h" -#include "SBufList.h" +#include "sbuf/SBufAlgos.h" +#include "sbuf/SBufList.h" #include "testSBufList.h" #include "unitTestMain.h" diff --git a/src/tests/testSBufList.h b/src/tests/testSBufList.h index 2ecd268f46..1ff6013b92 100644 --- a/src/tests/testSBufList.h +++ b/src/tests/testSBufList.h @@ -11,7 +11,7 @@ #include -#include "OutOfBoundsException.h" +#include "sbuf/OutOfBoundsException.h" class testSBufList : public CPPUNIT_NS::TestFixture { diff --git a/src/tools.h b/src/tools.h index e438387e55..9626def6b6 100644 --- a/src/tools.h +++ b/src/tools.h @@ -11,7 +11,7 @@ #ifndef SQUID_TOOLS_H_ #define SQUID_TOOLS_H_ -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "typedefs.h" class MemBuf; diff --git a/src/tunnel.cc b/src/tunnel.cc index a38a69af98..3656619126 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -32,7 +32,7 @@ #include "LogTags.h" #include "MemBuf.h" #include "PeerSelectState.h" -#include "SBuf.h" +#include "sbuf/SBuf.h" #include "SquidConfig.h" #include "SquidTime.h" #include "ssl/BlindPeerConnector.h" diff --git a/src/wordlist.h b/src/wordlist.h index fa8b38610e..42363a36f9 100644 --- a/src/wordlist.h +++ b/src/wordlist.h @@ -11,7 +11,7 @@ #include "globals.h" #include "profiler/Profiler.h" -#include "SBufList.h" +#include "sbuf/SBufList.h" /** A list of C-strings * @@ -48,7 +48,7 @@ const char *wordlistAdd(wordlist **, const char *); /** Concatenate a wordlist * - * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead + * \deprecated use SBufListContainerJoin(SBuf()) from sbuf/SBufAlgos.h instead */ void wordlistCat(const wordlist *, MemBuf *); @@ -60,7 +60,7 @@ void wordlistAddWl(wordlist **, wordlist *); /** Concatenate the words in a wordlist * - * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead + * \deprecated use SBufListContainerJoin(SBuf()) from sbuf/SBufAlgos.h instead */ void wordlistJoin(wordlist **, wordlist **);