compat_shared.h File Reference
#include <csignal>
#include "compat/xalloc.h"
#include "compat/xis.h"
#include "compat/xstrerror.h"
#include "compat/xstring.h"
#include "compat/xstrto.h"
#include "compat/strtoll.h"
#include "compat/memrchr.h"
Include dependency graph for compat_shared.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  rusage


#define dirent   direct
#define NAMLEN(dirent)   (dirent)->d_namlen
#define dirent_t   struct dirent
#define SQUID_MAXFD_LIMIT   ((signed int)FD_SETSIZE)
#define w_space   " \t\n\r"
#define SA_RESTART   0
#define SA_NODEFER   0
#define SA_RESETHAND   0


template<class A >
A const & min (A const &lhs, A const &rhs)
template<class A >
A const & max (A const &lhs, A const &rhs)
const char * squid_strnstr (const char *s, const char *find, size_t slen)


void(* failure_notify )(const char *)

Macro Definition Documentation

#define dirent   direct

Definition at line 51 of file compat_shared.h.

#define dirent_t   struct dirent

Definition at line 71 of file compat_shared.h.

Referenced by Fs::Ufs::UFSSwapDir::DirClean(), dirlevel(), and filelevel().

#define NAMLEN (   dirent)    (dirent)->d_namlen

Definition at line 52 of file compat_shared.h.


Definition at line 270 of file compat_shared.h.


Definition at line 271 of file compat_shared.h.


Definition at line 272 of file compat_shared.h.

#define SA_NODEFER   0

Definition at line 193 of file compat_shared.h.

Referenced by mainInitialize(), and Signal().

#define SA_RESETHAND   0

Definition at line 196 of file compat_shared.h.

Referenced by mainInitialize().

#define SA_RESTART   0

Signalling flags are apparently not always provided. TODO find out if these can be moved into specific OS portability files.

Definition at line 190 of file compat_shared.h.

Referenced by main(), mainInitialize(), set_our_signal(), and Signal().

#define SQUID_MAXFD_LIMIT   ((signed int)FD_SETSIZE)

Definition at line 84 of file compat_shared.h.

Referenced by SquidMain().


O_NDELAY is our fallback.

Definition at line 174 of file compat_shared.h.

Referenced by commSetNonBlocking(), commUnsetNonBlocking(), and main().

Function Documentation

template<class A >
A const& min ( A const &  lhs,
A const &  rhs 

min() comparison may not always be provided. Squid bundles this template for when its needed. May be used on any type which provides operator '<'

Definition at line 121 of file compat_shared.h.

Referenced by ESISegment::append(), Log::TcpLogger::appendRecord(), BandwidthBucket::applyQuota(), DelayBucket::bytesWanted(), DelayVector::Id::bytesWanted(), Client::calcBufferSpaceToReserve(), comm_init(), SBuf::compare(), Comm::Connection::connectTimeout(), SBuf::consume(), SBuf::copy(), mem_hdr::copyAvailable(), ShmWriter::copyToShmSlice(), Adaptation::Icap::ModXact::decideOnPreview(), diskerRead(), diskerWriteAttempts(), Ipc::StoreMap::entryLimit(), Rock::SwapDir::entryLimitActual(), esiProcessStream(), fdAdjustReserved(), BodyPipe::getMoreData(), Adaptation::Icap::ServiceRep::handleNewOptions(), hashPrime(), idnsGrokReply(), idnsTickleQueue(), inet_ntop4(), Ipc::StoreMap::Init(), Range< C, S >::intersection(), Store::Controller::keepForLocalMemoryCache(), Http::Stream::lengthToSend(), logfile_mod_daemon_append(), Store::Disk::maxObjectSize(), MemStore::maxObjectSize(), ntlm_check_auth(), ACLRandom::parse(), parse_refreshpattern(), Http::One::TeChunkedParser::parseChunkBody(), Ftp::Server::parseOneRequest(), BodyPipe::putMoreData(), MessageBucket::quota(), SBuf::rawAppendFinish(), re_match_2(), Rock::IoState::read_(), store_client::readHeader(), refreshCheck(), refreshStaleness(), Client::replyBodySpace(), SBuf::reserve(), rfc2671RROptPack(), Ftp::Client::scheduleReadControlReply(), ESIContext::send(), Security::PeerConnector::setReadTimeout(), Rock::SwapDir::slotLimitActual(), testSBuf::testComparisons(), testComparisonStdOneWay(), testSBuf::testReserve(), testStatHist::testStatHistLog(), Comm::Connection::timeLeft(), Ip::Address::toStr(), Store::Controller::updateLimits(), ipcache_entry::updateTtl(), Adaptation::Ecap::XactionRep::vbContent(), Adaptation::Ecap::XactionRep::vbContentShift(), Adaptation::Icap::ModXact::virginConsume(), Ipc::StoreMap::visitVictims(), IpcIoFile::WaitBeforePop(), mem_hdr::writeAvailable(), Adaptation::Icap::ModXact::writePreviewBody(), Adaptation::Icap::ModXact::writeSomeBody(), and Rock::IoState::writeToBuffer().

const char* squid_strnstr ( const char *  s,
const char *  find,
size_t  slen 

com_err.h is a C header and needs explicit shielding, but not all other system headers including this care to do so.

Find the first occurrence of find in s, where the search is limited to the first slen characters of s.

Definition at line 77 of file

References len, NULL, and sc.

Variable Documentation

void(* failure_notify)(const char *)

Definition at line 12 of file

Referenced by fatal_dump(), SquidMain(), xcalloc(), xmalloc(), xrealloc(), xstrdup(), and xstrndup().






Web Site Translations