From: Francesco Chemolli Date: Fri, 31 Aug 2012 11:52:13 +0000 (+0200) Subject: Moved IPC-related prototypes to newly-created SquidIpc.h X-Git-Tag: sourceformat-review-1~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9609788086994e6748c50902315a87bfebbedaaf;p=thirdparty%2Fsquid.git Moved IPC-related prototypes to newly-created SquidIpc.h --- diff --git a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc index 3ee7d0744d..ba4ce1bc5c 100644 --- a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc +++ b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc @@ -42,6 +42,7 @@ #include "protos.h" #include "Store.h" #include "StatCounters.h" +#include "SquidIpc.h" #include "SquidTime.h" #include "unlinkd.h" diff --git a/src/Makefile.am b/src/Makefile.am index c8ca66bbe3..ee99ba0a31 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -156,9 +156,9 @@ WINSVC_SOURCE = endif if USE_IPC_WIN32 -IPC_SOURCE = ipc_win32.cc +IPC_SOURCE = SquidIpc.h ipc_win32.cc else -IPC_SOURCE = ipc.cc +IPC_SOURCE = SquidIpc.h ipc.cc endif AIO_WIN32_ALL_SOURCES = \ diff --git a/src/SquidIpc.h b/src/SquidIpc.h new file mode 100644 index 0000000000..007e27b3b9 --- /dev/null +++ b/src/SquidIpc.h @@ -0,0 +1,51 @@ +#ifndef SQUID_SQUIDIPC_H_ +#define SQUID_SQUIDIPC_H_ +/* + * DEBUG: section 54 Interprocess Communication + * AUTHOR: Duane Wessels + * + * 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. + * + */ + +namespace Ip { + class Address; +} +extern pid_t ipcCreate(int type, + const char *prog, + const char *const args[], + const char *name, + Ip::Address &local_addr, + int *rfd, + int *wfd, + void **hIpc); + + + + + +#endif /* SQUID_SQUIDIPC_H_ */ diff --git a/src/helper.cc b/src/helper.cc index 5bf1ad2740..252055b752 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -43,6 +43,7 @@ #include "Mem.h" #include "MemBuf.h" #include "protos.h" +#include "SquidIpc.h" #include "SquidMath.h" #include "SquidTime.h" #include "Store.h" diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc index 776683ff93..e819c4dbe8 100644 --- a/src/icmp/IcmpSquid.cc +++ b/src/icmp/IcmpSquid.cc @@ -40,6 +40,7 @@ #include "icmp/net_db.h" #include "ip/tools.h" #include "protos.h" +#include "SquidIpc.h" #include "SquidTime.h" #if HAVE_ERRNO_H diff --git a/src/ipc.cc b/src/ipc.cc index f2696a499d..373e5f4252 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -37,6 +37,7 @@ #include "globals.h" #include "ip/Address.h" #include "protos.h" +#include "SquidIpc.h" #include "tools.h" #include "rfc1738.h" diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc index b10d59b980..12c6d48032 100644 --- a/src/ipc_win32.cc +++ b/src/ipc_win32.cc @@ -40,6 +40,7 @@ #include "fde.h" #include "ip/Address.h" #include "rfc1738.h" +#include "SquidIpc.h" #include "SquidTime.h" #include "tools.h" diff --git a/src/log/ModDaemon.cc b/src/log/ModDaemon.cc index f603a9559e..0eb8dc89d7 100644 --- a/src/log/ModDaemon.cc +++ b/src/log/ModDaemon.cc @@ -39,6 +39,7 @@ #include "log/File.h" #include "log/ModDaemon.h" #include "protos.h" +#include "SquidIpc.h" #include "SquidTime.h" #if HAVE_ERRNO_H diff --git a/src/protos.h b/src/protos.h index 2b1f22d921..f3fd67d5a2 100644 --- a/src/protos.h +++ b/src/protos.h @@ -81,18 +81,6 @@ extern void reconfigure(int); #include "fatal.h" -/* - * ipc.c - */ -SQUIDCEXTERN pid_t ipcCreate(int type, - const char *prog, - const char *const args[], - const char *name, - Ip::Address &local_addr, - int *rfd, - int *wfd, - void **hIpc); - /* * prototypes for system functions missing from system includes */ diff --git a/src/unlinkd.cc b/src/unlinkd.cc index b2e687a17d..ab1bafd035 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -39,6 +39,7 @@ #include "globals.h" #include "xusleep.h" #include "protos.h" +#include "SquidIpc.h" #include "SquidTime.h" #include "StatCounters.h" #include "SwapDir.h"