From: Francesco Chemolli Date: Wed, 22 Aug 2012 10:49:28 +0000 (+0200) Subject: Moved fd.cc-related prototypes to new fd.h X-Git-Tag: sourceformat-review-1~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4ad1349e041053f675ef4b4f27b6c4713bbef58;p=thirdparty%2Fsquid.git Moved fd.cc-related prototypes to new fd.h --- diff --git a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc index 2f1b4952c7..41f91ebe4c 100644 --- a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc +++ b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc @@ -40,6 +40,7 @@ #include "DiskIO/DiskFile.h" #include "DiskdFile.h" #include "diomsg.h" +#include "fd.h" #include "protos.h" #include "Store.h" #include "StatCounters.h" diff --git a/src/DiskIO/DiskThreads/CommIO.cc b/src/DiskIO/DiskThreads/CommIO.cc index 9de30912b0..d975942c6d 100644 --- a/src/DiskIO/DiskThreads/CommIO.cc +++ b/src/DiskIO/DiskThreads/CommIO.cc @@ -35,6 +35,7 @@ #include "squid.h" #include "comm/Loops.h" #include "DiskIO/DiskThreads/CommIO.h" +#include "fd.h" #include "globals.h" #include "protos.h" diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index 89ee7df28c..6cb8f45331 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -40,6 +40,7 @@ #include "DiskIO/IORequestor.h" #include "DiskIO/ReadRequest.h" #include "DiskIO/WriteRequest.h" +#include "fd.h" #include "Generic.h" #include "globals.h" #include "StatCounters.h" diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index cac9fc982e..fb00ba9c4a 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -12,6 +12,7 @@ #include "DiskIO/ReadRequest.h" #include "DiskIO/WriteRequest.h" #include "disk.h" +#include "fd.h" #include "globals.h" #include "ipc/mem/Pages.h" #include "ipc/Messages.h" diff --git a/src/Makefile.am b/src/Makefile.am index 679258a4d4..c3fa6f7072 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -330,6 +330,7 @@ squid_SOURCES = \ ExternalACLEntry.h \ FadingCounter.h \ FadingCounter.cc \ + fd.h \ fd.cc \ fde.cc \ fde.h \ @@ -714,6 +715,7 @@ ufsdump_SOURCES = \ HttpRequestMethod.cc \ RemovalPolicy.cc \ $(WIN32_SOURCE) \ + fd.h \ tests/stub_fd.cc ufsdump_LDADD = \ $(AUTH_ACL_LIBS) \ @@ -1224,6 +1226,7 @@ tests_testACLMaxUserIP_SOURCES= \ tests/stub_DelayId.cc \ tests/stub_DiskIOModule.cc \ tests/stub_errorpage.cc \ + fd.h \ tests/stub_fd.cc \ tests/stub_HttpRequest.cc \ tests/stub_HttpReply.cc \ @@ -1359,6 +1362,7 @@ tests_testCacheManager_SOURCES = \ event.cc \ external_acl.cc \ ExternalACLEntry.cc \ + fd.h \ fd.cc \ fde.cc \ FileMap.h \ @@ -1529,6 +1533,7 @@ tests_testDiskIO_SOURCES = \ ETag.cc \ EventLoop.cc \ event.cc \ + fd.h \ fd.cc \ FileMap.h \ filemap.cc \ @@ -1716,6 +1721,7 @@ tests_testEvent_SOURCES = \ external_acl.cc \ ExternalACLEntry.cc \ FadingCounter.cc \ + fd.h \ fd.cc \ fde.cc \ FileMap.h \ @@ -1928,6 +1934,7 @@ tests_testEventLoop_SOURCES = \ external_acl.cc \ ExternalACLEntry.cc \ FadingCounter.cc \ + fd.h \ fd.cc \ fde.cc \ FileMap.h \ @@ -2137,6 +2144,7 @@ tests_test_http_range_SOURCES = \ external_acl.cc \ ExternalACLEntry.cc \ FadingCounter.cc \ + fd.h \ fd.cc \ fde.cc \ FileMap.h \ @@ -2396,6 +2404,7 @@ tests_testHttpRequest_SOURCES = \ ETag.cc \ external_acl.cc \ ExternalACLEntry.cc \ + fd.h \ fd.cc \ fde.cc \ forward.cc \ @@ -2623,6 +2632,7 @@ tests_testStore_SOURCES= \ tests/stub_debug.cc \ tests/stub_DiskIOModule.cc \ tests/stub_errorpage.cc \ + fd.h \ tests/stub_fd.cc \ tests/stub_helper.cc \ tests/stub_HelperChildConfig.cc \ @@ -2773,6 +2783,7 @@ tests_testUfs_SOURCES = \ tests/stub_libformat.cc \ tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ + fd.h \ fd.cc \ client_db.h \ disk.h \ @@ -2921,6 +2932,7 @@ tests_testRock_SOURCES = \ ETag.cc \ EventLoop.cc \ event.cc \ + fd.h \ fd.cc \ FileMap.h \ filemap.cc \ @@ -3064,6 +3076,7 @@ tests_testCoss_SOURCES = \ tests/stub_pconn.cc \ tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ + fd.h \ fd.cc \ disk.h \ disk.cc \ @@ -3208,6 +3221,7 @@ tests_testNull_SOURCES = \ tests/stub_internal.cc \ tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ + fd.h \ fd.cc \ disk.h \ disk.cc \ @@ -3376,6 +3390,7 @@ tests_testURL_SOURCES = \ event.cc \ external_acl.cc \ ExternalACLEntry.cc \ + fd.h \ fd.cc \ fde.cc \ FileMap.h \ diff --git a/src/Server.cc b/src/Server.cc index 43a95ec9ed..7ab82aa589 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -38,6 +38,7 @@ #include "comm/Connection.h" #include "comm/forward.h" #include "comm/Write.h" +#include "fd.h" #include "err_detail_type.h" #include "errorpage.h" #include "HttpReply.h" diff --git a/src/client_side.cc b/src/client_side.cc index a607cb357c..daf94cfd57 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -101,6 +101,7 @@ #include "CommCalls.h" #include "errorpage.h" #include "eui/Config.h" +#include "fd.h" #include "fde.h" #include "forward.h" #include "fqdncache.h" diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 75eff7c1ba..9995f5feb2 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -40,6 +40,7 @@ #include "clientStream.h" #include "dlink.h" #include "errorpage.h" +#include "fd.h" #include "fde.h" #include "format/Token.h" #include "forward.h" diff --git a/src/client_side_request.cc b/src/client_side_request.cc index db2c6db82c..861ece467e 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -56,6 +56,7 @@ #include "compat/inet_pton.h" #include "err_detail_type.h" #include "errorpage.h" +#include "fd.h" #include "fde.h" #include "format/Token.h" #include "gopher.h" diff --git a/src/comm.cc b/src/comm.cc index 34efd3c9e2..77cda47a13 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -48,6 +48,7 @@ #include "compat/cmsg.h" #include "DescriptorSet.h" #include "event.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "icmp/net_db.h" diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index 4a5d6eb585..7d708124ff 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -7,6 +7,7 @@ #include "comm/Connection.h" #include "comm/Loops.h" #include "comm.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "icmp/net_db.h" diff --git a/src/comm/ModPoll.cc b/src/comm/ModPoll.cc index 6a6cbf0af8..a47f28d0c8 100644 --- a/src/comm/ModPoll.cc +++ b/src/comm/ModPoll.cc @@ -36,6 +36,7 @@ #include "anyp/PortCfg.h" #include "comm/Connection.h" #include "comm/Loops.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "ICP.h" diff --git a/src/comm/TcpAcceptor.cc b/src/comm/TcpAcceptor.cc index e7c362ea71..371cbbc7a0 100644 --- a/src/comm/TcpAcceptor.cc +++ b/src/comm/TcpAcceptor.cc @@ -41,6 +41,7 @@ #include "comm/Connection.h" #include "comm/Loops.h" #include "comm/TcpAcceptor.h" +#include "fd.h" #include "fde.h" #include "ip/Intercept.h" #include "profiler/Profiler.h" diff --git a/src/comm/Write.cc b/src/comm/Write.cc index 20c2f967b2..a9db6177dd 100644 --- a/src/comm/Write.cc +++ b/src/comm/Write.cc @@ -2,6 +2,7 @@ #include "comm/Connection.h" #include "comm/IoCallback.h" #include "comm/Write.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "MemBuf.h" diff --git a/src/disk.cc b/src/disk.cc index 4dc0550190..3b71f51deb 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -34,6 +34,7 @@ #include "squid.h" #include "comm/Loops.h" +#include "fd.h" #include "fde.h" #include "Mem.h" #include "MemBuf.h" diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 4242ffd6da..cebfe5e337 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -40,6 +40,7 @@ #include "comm/Loops.h" #include "comm/Write.h" #include "event.h" +#include "fd.h" #include "fde.h" #include "ip/tools.h" #include "Mem.h" diff --git a/src/fd.cc b/src/fd.cc index 29a9164ab4..5bfdaee65d 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -36,6 +36,7 @@ #include "squid.h" #include "comm/Loops.h" #include "Debug.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "profiler/Profiler.h" diff --git a/src/fd.h b/src/fd.h new file mode 100644 index 0000000000..19b898d30a --- /dev/null +++ b/src/fd.h @@ -0,0 +1,45 @@ +/* + * DEBUG: section + * AUTHOR: + * + * SQUID Web Proxy Cache http://www.squid-cache.org/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sources; see the CREDITS file for full details. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + * + */ + + +#ifndef SQUID_FD_H_ +#define SQUID_FD_H_ + +extern void fd_close(int fd); +extern void fd_open(int fd, unsigned int type, const char *); +extern void fd_note(int fd, const char *); +extern void fd_bytes(int fd, int len, unsigned int type); +extern void fdDumpOpen(void); +extern int fdUsageHigh(void); +extern void fdAdjustReserved(void); + +#endif /* SQUID_FD_H_ */ diff --git a/src/forward.cc b/src/forward.cc index 5da0ede1ab..ca1487c07f 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -44,6 +44,7 @@ #include "CommCalls.h" #include "errorpage.h" #include "event.h" +#include "fd.h" #include "fde.h" #include "forward.h" #include "globals.h" diff --git a/src/ftp.cc b/src/ftp.cc index a1de50e800..4aeaecb30c 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -40,6 +40,7 @@ #include "CommCalls.h" #include "compat/strtoll.h" #include "errorpage.h" +#include "fd.h" #include "fde.h" #include "forward.h" #include "html_quote.h" diff --git a/src/gopher.cc b/src/gopher.cc index 2ca02cd467..23bece4d82 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -37,6 +37,7 @@ #include "comm.h" #include "comm/Write.h" #include "errorpage.h" +#include "fd.h" #include "forward.h" #include "html_quote.h" #include "HttpReply.h" diff --git a/src/helper.cc b/src/helper.cc index 48eb016e9d..9ee2a8b5bf 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -37,6 +37,7 @@ #include "comm.h" #include "comm/Connection.h" #include "comm/Write.h" +#include "fd.h" #include "format/Quoting.h" #include "helper.h" #include "Mem.h" diff --git a/src/http.cc b/src/http.cc index a679c71c06..6b5a547663 100644 --- a/src/http.cc +++ b/src/http.cc @@ -48,6 +48,7 @@ #include "comm/Write.h" #include "err_detail_type.h" #include "errorpage.h" +#include "fd.h" #include "fde.h" #include "HttpControlMsg.h" #include "http.h" diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc index 7a8b43dca4..c61c07a725 100644 --- a/src/icmp/IcmpSquid.cc +++ b/src/icmp/IcmpSquid.cc @@ -35,6 +35,7 @@ #include "squid.h" #include "comm.h" #include "comm/Loops.h" +#include "fd.h" #include "icmp/IcmpSquid.h" #include "icmp/net_db.h" #include "ip/tools.h" diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 07feaf3877..4828ff0dd1 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -44,6 +44,7 @@ #include "comm/Connection.h" #include "comm/Loops.h" #include "comm/UdpOpenDialer.h" +#include "fd.h" #include "HttpRequest.h" #include "icmp/net_db.h" #include "ICP.h" diff --git a/src/ipc.cc b/src/ipc.cc index 9f0cb0cdab..adb493a65c 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -32,6 +32,7 @@ #include "squid.h" #include "comm/Connection.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "ip/Address.h" diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc index 684742e2e2..bd42e38d98 100644 --- a/src/ipc_win32.cc +++ b/src/ipc_win32.cc @@ -36,6 +36,7 @@ #include "squid.h" #include "cache_cf.h" #include "comm.h" +#include "fd.h" #include "fde.h" #include "ip/Address.h" #include "rfc1738.h" diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc index abe76f0738..1a8c6206cd 100644 --- a/src/log/ModStdio.cc +++ b/src/log/ModStdio.cc @@ -32,6 +32,7 @@ #include "squid.h" #include "disk.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "log/File.h" diff --git a/src/log/ModTcp.cc b/src/log/ModTcp.cc index 0d460b0d8e..9b8675e3fb 100644 --- a/src/log/ModTcp.cc +++ b/src/log/ModTcp.cc @@ -35,6 +35,7 @@ #include "comm.h" #include "comm/Connection.h" #include "disk.h" +#include "fd.h" #include "log/File.h" #include "log/ModTcp.h" #include "Parsing.h" diff --git a/src/log/ModUdp.cc b/src/log/ModUdp.cc index 15b3115cd5..29c8422ac0 100644 --- a/src/log/ModUdp.cc +++ b/src/log/ModUdp.cc @@ -34,6 +34,7 @@ #include "comm.h" #include "comm/Connection.h" #include "disk.h" +#include "fd.h" #include "log/File.h" #include "log/ModUdp.h" #include "Parsing.h" diff --git a/src/main.cc b/src/main.cc index 502da17b95..eb0a330603 100644 --- a/src/main.cc +++ b/src/main.cc @@ -52,6 +52,7 @@ #include "event.h" #include "EventLoop.h" #include "ExternalACL.h" +#include "fd.h" #include "format/Token.h" #include "forward.h" #include "fs/Module.h" diff --git a/src/pconn.cc b/src/pconn.cc index a987c4b31d..a57f6c3ffc 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -35,6 +35,7 @@ #include "squid.h" #include "comm.h" #include "comm/Connection.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "mgr/Registration.h" diff --git a/src/protos.h b/src/protos.h index 8c92295947..6f318fd1ba 100644 --- a/src/protos.h +++ b/src/protos.h @@ -52,14 +52,6 @@ class ClientInfo; #endif -extern void fd_close(int fd); -extern void fd_open(int fd, unsigned int type, const char *); -extern void fd_note(int fd, const char *); -extern void fd_bytes(int fd, int len, unsigned int type); -extern void fdDumpOpen(void); -extern int fdUsageHigh(void); -extern void fdAdjustReserved(void); - class FwdState; /** diff --git a/src/send-announce.cc b/src/send-announce.cc index 4560e89d27..ea2a6570c4 100644 --- a/src/send-announce.cc +++ b/src/send-announce.cc @@ -37,6 +37,7 @@ #include "comm/Connection.h" #include "disk.h" #include "event.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "ICP.h" diff --git a/src/unlinkd.cc b/src/unlinkd.cc index 8428bf04bb..c36a1655ea 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -35,6 +35,7 @@ #include "squid.h" #include "disk.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "xusleep.h"