/*
- * $Id: splay.h,v 1.27 2004/08/30 05:12:29 robertc Exp $
+ * $Id: splay.h,v 1.28 2005/01/06 13:16:38 serassio Exp $
*/
#ifndef SQUID_SPLAY_H
}
template <class V>
-typename Splay<V>::const_iterator
+const SplayConstIterator<V>
Splay<V>::begin() const
{
return const_iterator(head);
}
template <class V>
-typename Splay<V>::const_iterator
+const SplayConstIterator<V>
Splay<V>::end() const
{
return const_iterator(NULL);
/*
- * $Id: ESICustomParser.cc,v 1.4 2003/08/04 22:14:40 robertc Exp $
+ * $Id: ESICustomParser.cc,v 1.5 2005/01/06 13:16:38 serassio Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
case ESITAG: {
++openESITags;
- char *tagEnd = strchr(tag, '>');
+ char *tagEnd = strchr(const_cast<char *>(tag), '>');
if (!tagEnd) {
error = "Could not find end ('>') of tag";
if (*(tagEnd - 1) == '/')
--openESITags;
- char * endofName = strpbrk(tag, w_space);
+ char * endofName = strpbrk(const_cast<char *>(tag), w_space);
if (endofName > tagEnd)
endofName = const_cast<char *>(tagEnd);
Vector<char *>attributes;
- char *attribute = endofName + 1;
+ char *attribute = const_cast<char *>(endofName + 1);
while (attribute > tag && attribute < tagEnd) {
/* leading spaces */
if (tagEnd - tag > (ssize_t)remainingCount)
return false;
- char * endofName = strpbrk(tag, w_space);
+ char * endofName = strpbrk(const_cast<char *>(tag), w_space);
if (endofName > tagEnd)
endofName = const_cast<char *>(tagEnd);
/* Comments must not be nested, without CDATA
* and we don't support CDATA
*/
- char *commentEnd = strstr (tag, "-->");
+ char *commentEnd = strstr (const_cast<char *>(tag), "-->");
if (!commentEnd) {
error = "missing end of comment";
/*
- * $Id: ESIVarState.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
+ * $Id: ESIVarState.cc,v 1.4 2005/01/06 13:16:39 serassio Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
n = 0;
while (query_pos) {
- char *next = strchr (query_pos, '&');
- char *div = strchr (query_pos, '=');
+ char const *next = strchr (query_pos, '&');
+ char const *div = strchr (query_pos, '=');
if (next)
++next;
/*
- * $Id: auth_basic.cc,v 1.35 2004/12/24 01:03:39 hno Exp $
+ * $Id: auth_basic.cc,v 1.36 2005/01/06 13:16:39 serassio Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
debug(29, 9) ("authenticateBasicDecodeAuth: cleartext = '%s'\n", cleartext);
- username(xstrndup(cleartext, USER_IDENT_SZ));
+ char * tempusername = xstrndup(cleartext, USER_IDENT_SZ);
xfree(cleartext);
/* terminate the username string */
- if ((cleartext = strchr(username(), ':')) != NULL)
+ if ((cleartext = strchr(tempusername, ':')) != NULL)
*(cleartext)++ = '\0';
+ username (tempusername);
+
if (!basicConfig.casesensitive)
Tolower((char *)username());
}
/*
- * $Id: client.cc,v 1.107 2004/04/03 15:10:56 hno Exp $
+ * $Id: client.cc,v 1.108 2005/01/06 13:16:39 serassio Exp $
*
* DEBUG: section 0 WWW Client
* AUTHOR: Harvest Derived
/* Send the HTTP request */
#ifdef _SQUID_MSWIN_
- bytesWritten = send(conn, msg, strlen(msg), 0);
+ bytesWritten = send(conn, (const void *) msg, strlen(msg), 0);
#else
#ifdef _SQUID_MSWIN_
setmode(1, O_BINARY);
- while ((len = recv(conn, buf, sizeof(buf), 0)) > 0) {
+ while ((len = recv(conn, (void *) buf, sizeof(buf), 0)) > 0) {
#else
while ((len = myread(conn, buf, sizeof(buf))) > 0) {
/*
- * $Id: fd.cc,v 1.51 2004/12/27 10:25:32 robertc Exp $
+ * $Id: fd.cc,v 1.52 2005/01/06 13:16:39 serassio Exp $
*
* DEBUG: section 51 Filedescriptor Functions
* AUTHOR: Duane Wessels
int
socket_read_method(int fd, char *buf, int len)
{
- return (recv(fd, buf, len, 0));
+ return (recv(fd, (void *) buf, len, 0));
}
int
int
socket_write_method(int fd, const char *buf, int len)
{
- return (send(fd, buf, len, 0));
+ return (send(fd, (const void *) buf, len, 0));
}
int
/*
- * $Id: store_dir_coss.cc,v 1.57 2005/01/03 16:08:27 robertc Exp $
+ * $Id: store_dir_coss.cc,v 1.58 2005/01/06 13:16:39 serassio Exp $
* vim: set et :
*
* DEBUG: section 47 Store COSS Directory Routines
continue;
} else {
- x = log(++rb->counts.bad_log_op) / log(10.0);
+ x = log(static_cast<double>(++rb->counts.bad_log_op)) / log(10.0);
- if (0.0 == x - (double) (int) x)
+ if (0.0 == x - (double)
+ (int) x)
debug(47, 1) ("WARNING: %d invalid swap log entries found\n",
rb->counts.bad_log_op);
/*
- * $Id: ufscommon.cc,v 1.3 2005/01/03 16:08:27 robertc Exp $
+ * $Id: ufscommon.cc,v 1.4 2005/01/06 13:16:39 serassio Exp $
* vim: set et :
*
* DEBUG: section 47 Store Directory Routines
continue;
} else {
- x = ::log(++counts.bad_log_op) / ::log(10.0);
+ x = ::log(static_cast<double>(++counts.bad_log_op)) / ::log(10.0);
if (0.0 == x - (double) (int) x)
debug(47, 1) ("WARNING: %d invalid swap log entries found\n",
/*
- * $Id: http.cc,v 1.442 2005/01/03 16:08:26 robertc Exp $
+ * $Id: http.cc,v 1.443 2005/01/06 13:16:39 serassio Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
_peer->stats.n_keepalives_recv++;
if (entry->getReply()->date > -1 && !_peer) {
- int skew = abs(entry->getReply()->date - squid_curtime);
+ int skew = abs((int)(entry->getReply()->date - squid_curtime));
if (skew > 86400)
debug(11, 3) ("%s's clock is skewed by %d seconds!\n",
/*
- * $Id: int.cc,v 1.2 2003/02/21 22:50:09 robertc Exp $
+ * $Id: int.cc,v 1.3 2005/01/06 13:16:39 serassio Exp $
*
* DEBUG: section 21 Integer functions
* AUTHOR: Harvest Derived
int
isPowTen(int count)
{
- double x = log(count) / log(10.0);
+ double x = log(static_cast<double>(count)) / log(10.0);
if (0.0 != x - (double) (int) x)
return 0;
/*
- * $Id: squid.h,v 1.244 2005/01/03 16:08:26 robertc Exp $
+ * $Id: squid.h,v 1.245 2005/01/06 13:16:39 serassio Exp $
*
* AUTHOR: Duane Wessels
*
#define getpagesize( ) sysconf(_SC_PAGE_SIZE)
#endif
+#if defined(_SQUID_MSWIN_)
+/* Windows may lack getpagesize() prototype */
+#ifndef getpagesize
+SQUIDCEXTERN size_t getpagesize(void);
+#endif
+#endif /* _SQUID_MSWIN_ */
+
#ifndef BUFSIZ
#define BUFSIZ 4096 /* make reasonable guess */
#endif