From: Amos Jeffries Date: Wed, 1 Aug 2012 12:51:45 +0000 (+1200) Subject: More GCC 4.2 dependency fixes X-Git-Tag: sourceformat-review-1~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf57f33e5b7001cc680e9d978a027f6264faa60;p=thirdparty%2Fsquid.git More GCC 4.2 dependency fixes --- diff --git a/src/Makefile.am b/src/Makefile.am index 88bfe73273..8785e9f6af 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1151,6 +1151,7 @@ tests_testACLMaxUserIP_SOURCES= \ filemap.cc \ HelperChildConfig.h \ HelperChildConfig.cc \ + HttpBody.cc \ HttpHeader.cc \ HttpHeaderTools.cc \ HttpHdrContRange.cc \ @@ -1198,18 +1199,23 @@ tests_testACLMaxUserIP_SOURCES= \ tests/stub_errorpage.cc \ tests/stub_fd.cc \ tests/stub_HttpRequest.cc \ + tests/stub_HttpReply.cc \ + tests/stub_ipc_TypedMsgHdr.cc \ tests/stub_libcomm.cc \ tests/stub_libformat.cc \ + tests/stub_libsslsquid.cc \ tests/stub_MemObject.cc \ tests/stub_MemStore.cc \ tests/stub_mime.cc \ tests/stub_pconn.cc \ + tests/stub_Port.cc \ tests/stub_store.cc \ tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ tests/stub_store_swapout.cc \ tests/stub_tools.cc \ tests/stub_cache_manager.cc \ + tests/stub_UdsOp.cc \ tests/testACLMaxUserIP.cc \ tests/testACLMaxUserIP.h \ tests/testMain.cc \ @@ -1235,6 +1241,8 @@ tests_testACLMaxUserIP_LDADD= \ base/libbase.la \ libsquid.la \ ip/libip.la \ + ipc/libipc.la \ + mgr/libmgr.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ diff --git a/src/mgr/Makefile.am b/src/mgr/Makefile.am index f647396c99..690ba6089e 100644 --- a/src/mgr/Makefile.am +++ b/src/mgr/Makefile.am @@ -52,5 +52,3 @@ libmgr_la_SOURCES = \ IntParam.h \ StringParam.cc \ StringParam.h - -EXTRA_DIST = stub_libmgr.cc diff --git a/src/ssl/Makefile.am b/src/ssl/Makefile.am index 8ea9be76a8..1b47a484c9 100644 --- a/src/ssl/Makefile.am +++ b/src/ssl/Makefile.am @@ -7,8 +7,6 @@ EXTRA_PROGRAMS = \ ssl_crtd EXTRA_DIST = \ - stub_libsslsquid.cc \ - stub_libsslutil.cc \ ssl_crtd.8 if USE_SSL_CRTD diff --git a/src/tests/stub_libcomm.cc b/src/tests/stub_libcomm.cc index 0d473a4c59..b2632fc0e9 100644 --- a/src/tests/stub_libcomm.cc +++ b/src/tests/stub_libcomm.cc @@ -60,4 +60,4 @@ void Comm::TcpAcceptor::notify(const comm_err_t flag, const Comm::ConnectionPoin void Comm::Write(const Comm::ConnectionPointer &, const char *, int, AsyncCall::Pointer &, FREE *) STUB void Comm::Write(const Comm::ConnectionPointer &conn, MemBuf *mb, AsyncCall::Pointer &callback) STUB void Comm::WriteCancel(const Comm::ConnectionPointer &conn, const char *reason) STUB -//PF Comm::HandleWrite STUB +/*PF*/ void Comm::HandleWrite(int, void*) STUB diff --git a/src/mgr/stub_libmgr.cc b/src/tests/stub_libmgr.cc similarity index 99% rename from src/mgr/stub_libmgr.cc rename to src/tests/stub_libmgr.cc index b03e96ee62..ab9727de18 100644 --- a/src/mgr/stub_libmgr.cc +++ b/src/tests/stub_libmgr.cc @@ -1,4 +1,5 @@ #include "squid.h" +#include "comm/Connection.h" #define STUB_API "lmgr/libmgr.la" #include "tests/STUB.h" @@ -64,7 +65,7 @@ void Mgr::OfflineToggleAction::dump(StoreEntry *entry) STUB void Mgr::RegisterBasics() STUB -#include "CountersAction.h" +#include "mgr/CountersAction.h" //Mgr::CountersActionData::CountersActionData() STUB Mgr::CountersActionData& Mgr::CountersActionData::operator +=(const Mgr::CountersActionData& stats) STUB_RETVAL(*this) diff --git a/src/ssl/stub_libsslsquid.cc b/src/tests/stub_libsslsquid.cc similarity index 78% rename from src/ssl/stub_libsslsquid.cc rename to src/tests/stub_libsslsquid.cc index cf87011912..4098c94998 100644 --- a/src/ssl/stub_libsslsquid.cc +++ b/src/tests/stub_libsslsquid.cc @@ -1,23 +1,23 @@ #include "squid.h" + +#if USE_SSL + #include "fatal.h" /* Stub File for the ssl/libsslsquid.la convenience library */ -#define STUB_BASE "ssl/libsslsquid.la" +#define STUB_API "ssl/libsslsquid.la" +#include "tests/STUB.h" -#define STUB { fatal(STUB_BASE " required."); } -#define STUB_RETVAL(x) { fatal(STUB_BASE " required."); return (x); } -#define STUB_RETREF(x) { fatal(STUB_BASE " required."); static x v; return v; } -#define STUB_RETREF2(x,y) { fatal(STUB_BASE " required."); static x v((y)); return v; } #include "ssl/Config.h" -Ssl::Config::Config() STUB -Ssl::Config::~Config() STUB +Ssl::Config::Config() { printf("Ssl::Config::Config No implemented\n"); } +Ssl::Config::~Config() { printf("Ssl::Config::Config No implemented\n"); } Ssl::Config Ssl::TheConfig; #include "ssl/context_storage.h" //Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &cmd) STUB -Ssl::CertificateStorageAction::Pointer Ssl::CertificateStorageAction::Create(const Mgr::Command::Pointer &cmd) STUB_RETREF(Ssl::CertificateStorageAction::Pointer) +Ssl::CertificateStorageAction::Pointer Ssl::CertificateStorageAction::Create(const Mgr::Command::Pointer &cmd) STUB_RETSTATREF(Ssl::CertificateStorageAction::Pointer) void Ssl::CertificateStorageAction::dump(StoreEntry *sentry) STUB Ssl::LocalContextStorage::Item::Item(SSL_CTX * aSsl_ctx, std::string const & aName) STUB Ssl::LocalContextStorage::Item::~Item() STUB @@ -27,26 +27,27 @@ void Ssl::LocalContextStorage::SetSize(size_t aMax_memory) STUB SSL_CTX * Ssl::LocalContextStorage::add(char const * host_name, SSL_CTX * ssl_ctx) STUB_RETVAL(NULL) SSL_CTX * Ssl::LocalContextStorage::find(char const * host_name) STUB_RETVAL(NULL) void Ssl::LocalContextStorage::remove(char const * host_name) STUB -Ssl::GlobalContextStorage::GlobalContextStorage() STUB -Ssl::GlobalContextStorage::~GlobalContextStorage() STUB +//Ssl::GlobalContextStorage::GlobalContextStorage() STUB +//Ssl::GlobalContextStorage::~GlobalContextStorage() STUB void Ssl::GlobalContextStorage::addLocalStorage(Ip::Address const & address, size_t size_of_store) STUB -Ssl::LocalContextStorage & Ssl::GlobalContextStorage::getLocalStorage(Ip::Address const & address) STUB_RETREF2(Ssl::LocalContextStorage, 0) +Ssl::LocalContextStorage & Ssl::GlobalContextStorage::getLocalStorage(Ip::Address const & address) + { fatal(STUB_API " required"); static Ssl::LocalContextStorage v(0); return v; } void Ssl::GlobalContextStorage::reconfigureStart() STUB //Ssl::GlobalContextStorage Ssl::TheGlobalContextStorage; #include "ssl/ErrorDetail.h" Ssl::ssl_error_t parseErrorString(const char *name) STUB_RETVAL(0) -const char *Ssl::getErrorName(ssl_error_t value) STUB_RETVAL(NULL) +//const char *Ssl::getErrorName(ssl_error_t value) STUB_RETVAL(NULL) Ssl::ErrorDetail::ErrorDetail(ssl_error_t err_no, X509 *cert) STUB Ssl::ErrorDetail::ErrorDetail(ErrorDetail const &) STUB -const String & Ssl::ErrorDetail::toString() const STUB_RETREF(String) +const String & Ssl::ErrorDetail::toString() const STUB_RETSTATREF(String) #include "ssl/support.h" SSL_CTX *sslCreateServerContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *clientCA, const char *CAfile, const char *CApath, const char *CRLfile, const char *dhpath, const char *context) STUB_RETVAL(NULL) SSL_CTX *sslCreateClientContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *CAfile, const char *CApath, const char *CRLfile) STUB_RETVAL(NULL) int ssl_read_method(int, char *, int) STUB_RETVAL(0) int ssl_write_method(int, const char *, int) STUB_RETVAL(0) -void ssl_shutdown_method(int) STUB +void ssl_shutdown_method(SSL *) STUB const char *sslGetUserEmail(SSL *ssl) STUB_RETVAL(NULL) // typedef char const *SSLGETATTRIBUTE(SSL *, const char *); // SSLGETATTRIBUTE sslGetUserAttribute; @@ -58,3 +59,5 @@ bool Ssl::verifySslCertificateDate(SSL_CTX * sslContext) STUB_RETVAL(false) SSL_CTX * Ssl::generateSslContextUsingPkeyAndCertFromMemory(const char * data) STUB_RETVAL(NULL) int Ssl::matchX509CommonNames(X509 *peer_cert, void *check_data, int (*check_func)(void *check_data, ASN1_STRING *cn_data)) STUB_RETVAL(0) int Ssl::asn1timeToString(ASN1_TIME *tm, char *buf, int len) STUB_RETVAL(0) + +#endif