# Port Specific Configurations
+COMPAT_SSL_ALL_SOURCES = \
+ openssl.h
+
+if ENABLE_SSL
+COMPAT_SSL_SOURCES = $(COMPAT_SSL_ALL_SOURCES)
+else
+COMPAT_SSL_SOURCES =
+EXCLUDE_FROM_HDR_TESTING += $(COMPAT_SSL_ALL_SOURCES)
+endif
+
noinst_LTLIBRARIES = libcompatsquid.la
libcompatsquid_la_SOURCES = \
+ $(COMPAT_SSL_SOURCES) \
assert.cc \
assert.h \
cmsg.h \
memrchr.cc \
memrchr.h \
mswindows.cc \
- openssl.h \
os/aix.h \
os/android.h \
os/dragonfly.h \
testPreCompiler.cc
testPreCompiler_LDADD= $(LIBCPPUNIT_LIBS)
testPreCompiler_LDFLAGS=
-
-# os/ subdir prevents us using src/TestHeaders.am
-#
-TESTS += testHeaders
-
-## Special Universal .h dependency test script
-## aborts if error encountered
-testHeaders: $(srcdir)/*.h $(srcdir)/os/*.h
- $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
-
-CLEANFILES += testHeaders
-
-.PHONY: testHeaders
openssl/x509v3.h \
openssl/engine.h \
openssl/txt_db.h \
+ openssl/pem.h \
)
# User may have provided a custom location for OpenSSL. Otherwise...
#define SQUID_SPLAY_H
#include "fatal.h"
+#include <cstddef>
#include <stack>
// private class of Splay. Do not use directly
tests_testRFC1738_LDFLAGS = $(LIBADD_DL)
-
-## Special Universal .h dependency test script
-## aborts if error encountered
testHeaders: $(top_srcdir)/include/*.h
- $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
-
-TESTS += testHeaders
-CLEANFILES += testHeaders
-.PHONY: testHeaders
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS = . test
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
AM_CPPFLAGS += -I$(top_srcdir)/lib
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libsspwin32.la
#ifndef SQUID_CLIENTREQUESTCONTEXT_H
#define SQUID_CLIENTREQUESTCONTEXT_H
+#include "acl/forward.h"
#include "base/RefCount.h"
#include "cbdata.h"
+#include "defines.h"
#include "dns/forward.h"
#include "helper/forward.h"
#include "ipcache.h"
## Some helpers are written in Perl and need the local shell defined properly
subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
+
+include $(top_srcdir)/src/TestHeaders.am
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libAIO.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libBlocking.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libDiskDaemon.la
libexec_PROGRAMS = diskd
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libDiskThreads.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libIpcIo.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS=
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libMmapped.la
#ifndef SQUID_HAPPYCONNOPENER_H
#define SQUID_HAPPYCONNOPENER_H
+#include "base/AsyncCallbacks.h"
+#include "base/JobWait.h"
#include "base/RefCount.h"
#include "comm.h"
#include "comm/Connection.h"
#include "comm/ConnOpener.h"
+#include "errorpage.h"
#include "http/forward.h"
#include "log/forward.h"
#include "ResolvedPeers.h"
#include "acl/forward.h"
#include "sbuf/SBuf.h"
+#include <deque>
#include <map>
/// a reference to a protocol name[/version] string; no 0-termination is assumed
return b.version.isEmpty() || (a.version == b.version);
}
+class ConfigParser;
+
/// Allows or blocks HTTP Upgrade protocols (see http_upgrade_request_protocols)
class HttpUpgradeProtocolAccess
{
snmp_core.cc \
snmp_agent.h \
snmp_agent.cc
+
if ENABLE_SNMP
SNMP_SOURCE = $(SNMP_ALL_SOURCE)
SUBDIRS += snmp
SNMP_LIBS = snmp/libsnmp.la $(SNMPLIB)
else
SNMP_SOURCE =
+EXCLUDE_FROM_HDR_TESTING += $(SNMP_ALL_SOURCE)
endif
if ENABLE_ADAPTATION
DELAY_POOL_SOURCE = $(DELAY_POOL_ALL_SOURCE)
else
DELAY_POOL_SOURCE =
+EXCLUDE_FROM_HDR_TESTING += $(DELAY_POOL_ALL_SOURCE)
endif
+KNOWN_HTCP_SOURCE = htcp.cc htcp.h
if ENABLE_HTCP
-HTCPSOURCE = htcp.cc htcp.h
+HTCPSOURCE = $(KNOWN_HTCP_SOURCE)
+else
+EXCLUDE_FROM_HDR_TESTING += $(KNOWN_HTCP_SOURCE)
endif
if ENABLE_UNLINKD
tests_testRandomUuid_SOURCES = \
tests/testRandomUuid.cc
nodist_tests_testRandomUuid_SOURCES = \
- RandomUuid.h \
+ base/RandomUuid.h \
tests/stub_debug.cc \
tests/stub_libmem.cc
tests_testRandomUuid_LDADD = \
$(COMPAT_LIB) \
$(XTRA_LIBS)
tests_testEventLoop_LDFLAGS = $(LIBADD_DL)
-
-## Run the unit tests. check_PROGRAMS only builds the binaries.
-TESTS += $(check_PROGRAMS) testHeaders
-
-## Special Universal .h dependency test script
-## aborts if error encountered
-testHeaders: $(srcdir)/*.h $(srcdir)/DiskIO/*.h $(srcdir)/DiskIO/*/*.h
- $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
-## src/repl/ has no .h files and its own makefile.
-
-CLEANFILES += testHeaders
-.PHONY: testHeaders
-
#include "base/DelayedAsyncCalls.h"
#include "dlink.h"
#include "http/RequestMethod.h"
+#include "HttpReply.h"
#include "RemovalPolicy.h"
#include "SquidString.h"
#include "stmem.h"
#ifndef SQUID_NEIGHBORTYPEDOMAINLIST_H_
#define SQUID_NEIGHBORTYPEDOMAINLIST_H_
+#include "enums.h"
+
/// representation of a neighbor_type_domain configuration directive. A POD
class NeighborTypeDomainList
{
#if USE_DELAY_POOLS
#include "DelayIdComposite.h"
+#include "mem/AllocatorProxy.h"
class NullDelayId : public DelayIdComposite
{
#define SQUID_SRC_PIPELINE_H
#include "base/RefCount.h"
-#include "http/forward.h"
+#include "http/Stream.h"
#include <list>
#define SQUID_RESOLVEDPEERS_H
#include "base/RefCount.h"
-#include "comm/forward.h"
+#include "comm/Connection.h"
+#include "mem/AllocatorProxy.h"
#include <iosfwd>
#include <limits>
#define SQUID_SNMPREQUEST_H_
#if SQUID_SNMP
+#include "acl/forward.h"
+#include "ip/Address.h"
#include "snmp_session.h"
// POD
#include "MessageDelayPools.h"
#endif
#include "Notes.h"
+#include "security/Context.h"
#include "security/forward.h"
#if USE_OPENSSL
#include "ssl/support.h"
## Please see the COPYING and CONTRIBUTORS files for details.
##
-## Test ./*.h files in a directory using test-suite/testheaders.sh
+# A space-separated list of header files to be skipped by
+# testHeaders during "make check"
+EXCLUDE_FROM_HDR_TESTING =
-## TODO: include in src/Common.am when all testHeaders users are the same.
-TESTS += testHeaders
-
-## .h dependency test script
-## aborts build process on errors; XXX: even with "make -k"
-testHeaders: $(srcdir)/*.h
- $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
+# to test header files in addition to those tested by default,
+# add an empty target named 'testHeaders' depending on the additional
+# headers to test
-## XXX: this is only needed because testheaders.sh creates a dummy file called
-## testHeaders and distclean does not know about it.
-## Remove when testheaders.sh and its users are fixed.
-CLEANFILES += testHeaders
+testHeaders: $(SOURCES) $(noinst_HEADERS) $(EXTRA_DIST) $(top_srcdir)/test-suite/testHeader.cc.in
+ $(MAKE) $(^:.h=.hdrtest) && cp $(TRUE) $@
+.h.hdrtest:
+ @SrcFilePath=`echo $< | $(SED) 's%^$(top_srcdir)/%%'`; \
+ SrcFileName=`basename $$SrcFilePath`; \
+ TargetFileName=`basename $@`; \
+ if test "$(EXCLUDE_FROM_HDR_TESTING)" != "" && echo "$(EXCLUDE_FROM_HDR_TESTING)" | $(TR) ' ' '\n' | $(FGREP) -x -q "$$SrcFileName" ; then \
+ echo "header-test: skip - $$SrcFilePath"; \
+ exit 0; \
+ fi; \
+ $(SED) "s%[@]HEADER[@]%${<}%" "$(top_srcdir)/test-suite/testHeader.cc.in" >"$$TargetFileName.cc" && \
+ echo "$(CXXCOMPILE) -c -o" "$$TargetFileName" "$$TargetFileName.cc" && \
+ if $(CXXCOMPILE) -c -o "$$TargetFileName" "$$TargetFileName.cc" ; \
+ then echo "header-test: ok - $$SrcFilePath"; $(RM) "$$TargetFileName.cc" "$$TargetFileName"; \
+ else echo "header-test: not ok - $$SrcFilePath"; exit 1; fi
-.PHONY: testHeaders
+TESTS += testHeaders
+CLEANFILES += testHeaders
#define SQUID_ACLARP_H
#include "acl/Acl.h"
+#include "eui/Eui48.h"
#include <set>
-namespace Eui
-{
-class Eui48;
-};
-
/// \ingroup ACLAPI
class ACLARP : public ACL
{
#include "acl/Data.h"
#include "acl/ParameterizedNode.h"
+#include "security/forward.h"
#include "ssl/support.h"
namespace Acl
#include "acl/Acl.h"
#include "acl/Data.h"
#include "acl/StringData.h"
+#include "security/forward.h"
#include "ssl/support.h"
#include <string>
#include <list>
#define SQUID_ACLEUI64_H
#include "acl/Acl.h"
+#include "eui/Eui64.h"
#include <set>
-namespace Eui
-{
-class Eui64;
-};
-
class ACLEui64 : public ACL
{
MEMPROXY_CLASS(ACLEui64);
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS= external
if ENABLE_SSL
libacls_la_SOURCES += $(SSL_ACLS)
+else
+EXCLUDE_FROM_HDR_TESTING += $(SSL_ACLS)
endif
EXTRA_libacls_la_SOURCES += $(SSL_ACLS)
if ENABLE_ADAPTATION
libacls_la_SOURCES += $(ADAPT_ACLS)
+else
+EXCLUDE_FROM_HDR_TESTING += $(ADAPT_ACLS)
endif
EXTRA_libacls_la_SOURCES += $(ADAPT_ACLS)
if ENABLE_EUI
libacls_la_SOURCES += $(ARP_ACLS)
+else
+EXCLUDE_FROM_HDR_TESTING += $(ARP_ACLS)
endif
EXTRA_libacls_la_SOURCES += $(ARP_ACLS)
#include "acl/Data.h"
#include "acl/ParameterizedNode.h"
+#include "security/forward.h"
#include "ssl/support.h"
namespace Acl
#ifndef SQUID_ACLSOURCEDOMAIN_H
#define SQUID_ACLSOURCEDOMAIN_H
+#include "acl/Checklist.h"
#include "acl/Data.h"
#include "acl/ParameterizedNode.h"
#include "dns/forward.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS =
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libecapsquid.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libicap.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libanyp.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS = $(AUTH_MODULES)
DIST_SUBDIRS = basic digest negotiate ntlm
#ifndef SQUID_SRC_AUTH_QUEUENODE_H
#define SQUID_SRC_AUTH_QUEUENODE_H
-#include "auth/forward.h"
+#include "auth/UserRequest.h"
#include "cbdata.h"
+#include "mem/AllocatorProxy.h"
namespace Auth
{
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
DIST_SUBDIRS = \
DB \
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
DIST_SUBDIRS= eDirectory file LDAP
SUBDIRS= $(DIGEST_AUTH_HELPERS)
#if HAVE_AUTH_MODULE_DIGEST
+#include "auth/digest/Config.h"
#include "auth/UserRequest.h"
class ConnStateData;
* Please see the COPYING and CONTRIBUTORS files for details.
*/
+#if HAVE_LDAP_H
+#include <ldap.h>
+#endif
+
int nds_get_password(LDAP *ld, char *object_dn, size_t * pwd_len, char *pwd);
class SchemeConfig;
typedef std::vector<Auth::SchemeConfig *> ConfigVector;
+class UserRequest;
+
} // namespace Auth
#endif /* USE_AUTH */
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
DIST_SUBDIRS= kerberos SSPI wrapper
SUBDIRS= $(NEGOTIATE_AUTH_HELPERS)
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
DIST_SUBDIRS= fake SMB_LM SSPI
SUBDIRS= $(NTLM_AUTH_HELPERS)
#define SQUID_ASYNCCALL_H
#include "base/CodeContext.h"
+#include "base/forward.h"
#include "base/InstanceId.h"
#include "event.h"
#include "RefCount.h"
class AsyncCall: public RefCountable
{
public:
- typedef RefCount <AsyncCall> Pointer;
+ using Pointer = AsyncCallPointer;
AsyncCall(int aDebugSection, int aDebugLevel, const char *aName);
~AsyncCall() override;
#ifndef SQUID_BASE_ASYNCCALLLIST_H
#define SQUID_BASE_ASYNCCALLLIST_H
-#include "base/forward.h"
+#include "base/AsyncCall.h"
#include "base/RefCount.h"
/// An efficient (but intrusive) AsyncCall storage preserving FIFO order.
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libbase.la
SupportOrVeto.h \
TextException.cc \
TextException.h \
+ ToCpp.h \
TypeTraits.h \
YesNoNone.h \
forward.h
--- /dev/null
+/*
+ * Copyright (C) 1996-2023 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.
+ */
+
+#ifndef SQUID_SRC_BASE_TOCPP_H
+#define SQUID_SRC_BASE_TOCPP_H
+
+/// Defines a C++ equivalent of an extern "C" function.
+/// The defined C++ function name uses a _cpp suffix.
+#define CtoCpp1(function, argument) \
+ extern "C++" inline void function##_cpp(argument a) \
+ { \
+ function(a); \
+ }
+
+#endif /* SQUID_SRC_BASE_TOCPP_H */
+
#define SQUID_SRC_CLIENTS_HTTP_TUNNELERANSWER_H
#include "base/CbcPointer.h"
-#include "comm/forward.h"
+#include "comm/Connection.h"
#include "http/StatusCode.h"
#include "sbuf/SBuf.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libclients.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = \
libcomm.la \
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libdebug.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libdns.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
categories.cc: forward.h $(top_srcdir)/src/mk-string-arrays.awk
$(AWK) -f $(top_srcdir)/src/mk-string-arrays.awk ifile=error/forward.h < $(srcdir)/forward.h > $@ || ($(RM) -f $@ && exit 1)
#include "esi/Parser.h"
#include "http/forward.h"
#include "http/StatusCode.h"
+#include "HttpReply.h"
class ESIVarState;
class ClientHttpRequest;
#include "esi/Context.h"
#include "esi/Element.h"
#include "esi/Segment.h"
+#include "HttpHeader.h"
class ESIInclude;
typedef RefCount<ESIInclude> ESIIncludePtr;
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libesi.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libeui.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libformat.la
rock/all: librock.la
rock/clean: clean
-
-TESTS += testHeaders
-
-## Special Universal .h dependency test script
-## aborts if error encountered
-testHeaders: $(srcdir)/ufs/*.h $(srcdir)/rock/*.h
- $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
-## diskd/ has no .h files
-## aufs/ has no .h files
-## ./ has no .h files
-
-CLEANFILES += testHeaders
-
-.PHONY: testHeaders
#ifndef SQUID_FS_UFS_UFSSTORESTATE_H
#define SQUID_FS_UFS_UFSSTORESTATE_H
+#include "DiskIO/DiskFile.h"
#include "DiskIO/IORequestor.h"
#include "StoreIOState.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libftp.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libhelper.la
#ifndef _SQUID_SRC_HELPER_REQUEST_H
#define _SQUID_SRC_HELPER_REQUEST_H
+#include "cbdata.h"
#include "helper/forward.h"
+#include "mem/AllocatorProxy.h"
#include "time/gadgets.h"
namespace Helper
#if USE_HTCP
+#include "enums.h"
#include "http/forward.h"
#include "HttpHeader.h"
#include "ip/forward.h"
/// \ingroup ServerProtocolHTCP
void htcpOpenPorts(void);
+class CachePeer;
+
/**
* \ingroup ServerProtocolHTCP
*
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS = one url_rewriters
#ifndef SQUID_SRC_HTTP_STREAM_H
#define SQUID_SRC_HTTP_STREAM_H
+#include "clientStreamForward.h"
+#include "comm/forward.h"
+#include "debug/Stream.h"
+#include "error/Error.h"
#include "http/forward.h"
+#include "log/forward.h"
#include "mem/forward.h"
+#include "servers/forward.h"
#include "StoreIOBuffer.h"
#if USE_DELAY_POOLS
#include "MessageBucket.h"
#endif
-class clientStreamNode;
-class ClientHttpRequest;
-
namespace Http
{
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libhttp1.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
# ICMP Specific Configurations
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libident.la
#ifndef SQUID_IP_IPINTERCEPT_H
#define SQUID_IP_IPINTERCEPT_H
+#include "comm/forward.h"
+
namespace Ip
{
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libip.la
#include "ip/forward.h"
+#include <iosfwd>
+
class SBuf;
namespace Ip
#define SQUID_QOSCONFIG_H
#include "acl/forward.h"
+#include "cbdata.h"
+#include "comm/forward.h"
#include "hier_code.h"
#include "ip/forward.h"
#include "ip/NfMarkConfig.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libipc.la
#include "base/RefCount.h"
#include "base/TypeTraits.h"
-#include "ipc/forward.h"
#include "ipc/QuestionerId.h"
+#include "ipc/RequestId.h"
namespace Ipc
{
#include "base/AsyncCall.h"
#include "base/Subscription.h"
+#include "ip/Address.h"
#include "ipc/QuestionerId.h"
#include "ipc/RequestId.h"
#include "ipc/StartListening.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
DIST_SUBDIRS= DB file
SUBDIRS= $(LOG_DAEMON_HELPERS)
#include "base/JobWait.h"
#include "comm/forward.h"
#include "ip/Address.h"
+#include "log/forward.h"
#include <list>
+class CommCloseCbParams;
+class CommConnectCbParams;
+class CommIoCbParams;
class MemBlob;
typedef RefCount<MemBlob> MemBlobPointer;
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = \
libmem.la \
#define SQUID_MGR_FILLER_H
#include "comm/forward.h"
-#include "ipc/forward.h"
+#include "ipc/RequestId.h"
#include "mgr/Action.h"
#include "mgr/StoreToCommWriter.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libmgr.la
#ifndef SQUID_MGR_REQUEST_H
#define SQUID_MGR_REQUEST_H
+#include "comm/forward.h"
#include "ipc/forward.h"
#include "ipc/Request.h"
#include "mgr/ActionParams.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libparser.la
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libproxyp.la
#ifndef SQUID_REFRESH_H_
#define SQUID_REFRESH_H_
-class RefreshPattern;
+#include "http/forward.h"
+#include "store/forward.h"
void refreshAddToList(const char *, int, time_t, int, time_t);
bool refreshIsCachable(const StoreEntry *);
int refreshCheckDigest(const StoreEntry *, time_t delta);
time_t getMaxAge(const char *url);
void refreshInit(void);
+
+class RefreshPattern;
const RefreshPattern *refreshLimits(const char *url);
#endif /* SQUID_REFRESH_H_ */
heap/store_heap_replacement.h \
heap/store_repl_heap.cc
-
-## Until such time as we have a makefile in src/repl/heap etc.
-TESTS += testHeaders
-
-## Special Universal .h dependency test script
-## aborts if error encountered
-testHeaders: $(srcdir)/heap/*.h
- $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
-## ./ has no .h files.
-## ./lru/ has no .h files.
-
-CLEANFILES += testHeaders
-.PHONY: testHeaders
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libsbuf.la
#ifndef SQUID_SRC_SECURITY_BLINDPEERCONNECTOR_H
#define SQUID_SRC_SECURITY_BLINDPEERCONNECTOR_H
+#include "http/forward.h"
+#include "HttpRequest.h"
#include "security/PeerConnector.h"
class ErrorState;
#ifndef SQUID_SRC_SECURITY_CERTIFICATE_H
#define SQUID_SRC_SECURITY_CERTIFICATE_H
+#include "sbuf/forward.h"
#include "security/forward.h"
// The accessing/testing functions below require a non-constant Certificate when
#define SQUID_SRC_SECURITY_COMMUNICATION_SECRETS_H
#include "sbuf/SBuf.h"
-#include "security/forward.h"
+#include "security/Session.h"
#include <iosfwd>
#define SQUID_SECURITY_ENCRYPTORANSWER_H
#include "base/CbcPointer.h"
-#include "comm/forward.h"
+#include "comm/Connection.h"
class ErrorState;
#endif /* USE_OPENSSL */
-// Macro to be used to define the C++ equivalent function of an extern "C"
-// function. The C++ function suffixed with the _cpp extension
-#define CtoCpp1(function, argument) \
- extern "C++" inline void function ## _cpp(argument a) { \
- function(a); \
- }
-
namespace Security
{
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS= cert_generators cert_validators
#include "base/YesNoNone.h"
#include "ConfigParser.h"
+#include "security/Context.h"
#include "security/forward.h"
#include "security/KeyData.h"
+#include "security/Session.h"
class Packable;
#include "base/HardFun.h"
#include "comm/forward.h"
-#include "security/forward.h"
+#include "security/Context.h"
#include "security/LockingPointer.h"
#include <memory>
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
include $(top_srcdir)/doc/manuals/Substitute.am
security_file_certgen.8: $(srcdir)/security_file_certgen.8.in Makefile
#include "base/CbDataList.h"
#include "base/forward.h"
-#include "security/Context.h"
-#include "security/Session.h"
+#include "base/ToCpp.h"
+#include "security/LockingPointer.h"
#if USE_GNUTLS && HAVE_GNUTLS_ABSTRACT_H
#include <gnutls/abstract.h>
#endif
#include <list>
#include <limits>
+#include <memory>
#if USE_OPENSSL
#include "compat/openssl.h"
#if HAVE_OPENSSL_BN_H
#if HAVE_OPENSSL_RSA_H
#include <openssl/rsa.h>
#endif
+#if HAVE_OPENSSL_X509_H
+#include <openssl/x509.h>
+#endif
#endif /* USE_OPENSSL */
#include <unordered_set>
#include "base/Lock.h"
#include "client_side.h"
#include "comm/forward.h"
+#include "http/forward.h"
namespace Ftp
{
#ifndef SQUID_SRC_SERVERS_HTTP1SERVER_H
#define SQUID_SRC_SERVERS_HTTP1SERVER_H
+#include "client_side.h"
+#include "http/one/RequestParser.h"
+#include "http/Stream.h"
#include "servers/forward.h"
namespace Http
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libservers.la
#include "BodyPipe.h"
#include "comm/Write.h"
#include "CommCalls.h"
+#include "error/forward.h"
+#include "http/Stream.h"
#include "log/forward.h"
#include "Pipeline.h"
#include "sbuf/SBuf.h"
} // namespace One
/// create a new HTTP connection handler; never returns NULL
-ConnStateData *NewServer(const MasterXaction::Pointer &xact);
+ConnStateData *NewServer(const MasterXactionPointer &xact);
} // namespace Http
{
/// create a new HTTPS connection handler; never returns NULL
-ConnStateData *NewServer(const MasterXaction::Pointer &xact);
+ConnStateData *NewServer(const MasterXactionPointer &xact);
} // namespace Https
#ifndef SQUID_SNMPX_FORWARDER_H
#define SQUID_SNMPX_FORWARDER_H
+#include "ip/forward.h"
#include "ipc/Forwarder.h"
#include "snmp/Pdu.h"
#include "snmp/Session.h"
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libsnmp.la
#include "cache_snmp.h"
#include "comm/forward.h"
#include "ip/forward.h"
+#include "snmp_vars.h"
class MemBuf;
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libsslsquid.la libsslutil.la
#include "ip/Address.h"
#include "mgr/Action.h"
#include "mgr/Command.h"
-#include "security/forward.h"
+#include "security/Context.h"
#include "ssl/gadgets.h"
#include <list>
#if HAVE_OPENSSL_ASN1_H
#include <openssl/asn1.h>
#endif
+#if HAVE_OPENSSL_PEM_H
+#include <openssl/pem.h>
+#endif
#if HAVE_OPENSSL_TXT_DB_H
#include <openssl/txt_db.h>
#endif
#include "comm/forward.h"
#include "compat/openssl.h"
#include "sbuf/SBuf.h"
-#include "security/forward.h"
+#include "security/Session.h"
#include "ssl/gadgets.h"
#if HAVE_OPENSSL_X509V3_H
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
SUBDIRS= id_rewriters
#define SQUID_SRC_STORE_SWAPMETAOUT_H
#include "base/HardFun.h"
+#include "base/ToCpp.h"
#include "store/forward.h"
#include <memory>
-// TODO: Use CtoCpp1() from security/LockingPointer.h by moving that into base/ToCpp.h or similar.
/// C++ wrapper for the legacy xmalloc()/xcalloc() deallocator
/// \sa xfree_cppwrapper() with a slightly different (FREE-matching) signature.
-extern "C++" inline void xfree_cpp(const void * const x) { xfree(x); }
+CtoCpp1(xfree, const void *)
// TODO: Move AllocedBuf and xfree_cpp() to src/base/Memory.h or similar.
/// memory allocated by xmalloc() or xcalloc(), to be freed by xfree()
#ifndef SQUID_SRC_STORE_SWAPMETAVIEW_H
#define SQUID_SRC_STORE_SWAPMETAVIEW_H
+#include "base/TextException.h"
#include "store/SwapMeta.h"
#include <iosfwd>
##
include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
noinst_LTLIBRARIES = libtime.la
#ifndef SQUID_WHOIS_H_
#define SQUID_WHOIS_H_
+#include "clients/forward.h"
+
/**
* \defgroup ServerProtocolWhoisAPI Server-Side WHOIS API
* \ingroup ServerProtocol
test-functionality.sh \
test-sources.sh \
test-squid-conf.sh \
- testheaders.sh
+ testHeader.cc.in
ESI_ALL_TESTS = \
ESIExpressions
--- /dev/null
+/*
+ * Copyright (C) 1996-2023 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.
+ */
+
+/*
+ * This file is used to test whether Squid header files can be compiled on their own.
+ * See the testHeaders target in src/TestHeaders.am.
+ */
+
+#include "squid.h"
+#include "@HEADER@"
+
+int
+main(int, char **) {
+ return 0;
+}
+
+++ /dev/null
-#!/bin/sh
-#
-## Copyright (C) 1996-2023 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.
-##
-
-# test all header files (.h) for dependency issues.
-#
-# Ideally this test should be performed twice before any code is accepted.
-# With or without inline enabled. This is needed because the .cci files
-# are only included into the .h files when inline mode is enabled.
-#
-# This script should be run from the makefile with the directory path and ccflags
-#
-cc="${1}"
-shift
-for dir in /usr/bin /usr/local/bin /usr/gnu/bin
-do
- test -x ${dir}/true && TRUE=${dir}/true
-done
-TRUE=${TRUE:-/bin/true}
-
-exitCode=0
-
-for f in $@; do
- echo -n "Testing ${f} ..."
- t="testhdr_`basename ${f}`"
- if [ ! -f "$t.o" -o $f -nt "$t.o" ]; then
- echo >$t.cc <<EOF
-/* This file is AUTOMATICALLY GENERATED. DO NOT ALTER IT */
-#include "squid.h"
-#include "${f}"
-int main( int argc, char* argv[] ) { return 0; }
-EOF
- if ${cc} -c -o $t.o $t.cc ; then
- echo "Ok."
- else
- echo "Fail."
- exitCode=1
- fi
- rm -f $t.cc $t.o
- fi
- test $exitCode -eq 0 || break
-done
-
-#who ever said that the test program needs to be meaningful?
-test $exitCode -eq 0 && cp ${TRUE} testHeaders
-exit $exitCode