Minor problem compiling

From: Gerard Eviston <geviston@dont-contact.us>
Date: Thu, 05 Jun 2003 21:56:25 +1000

Hi,

A minor issue is stopping Squid-3 from compiling on AIX. Squid doesn't quite
link (seperate issue) but it compiles OK with only a handful of warnings and
1 error with gcc + IBM ld:

HttpReply.cc: In function `int httpReplyParse (HttpReply *, const char *, long
int)':
HttpReply.cc:161: no matching function for call to `min (long int, int)'

A suggested patch:

diff -uNr squid-3.0.DEVEL-20030605/src/HttpReply.cc
squid-3.0.DEVEL-20030605.new/src/HttpReply.cc
--- squid-3.0.DEVEL-20030605/src/HttpReply.cc Sun May 11 23:53:03 2003
+++ squid-3.0.DEVEL-20030605.new/src/HttpReply.cc Thu Jun 5 21:21:15 2003
@@ -158,7 +158,7 @@
      */
     char *headers = (char *)memAllocate(MEM_4K_BUF);
     int success;
- size_t s = XMIN(end + 1, 4096);
+ size_t s = XMIN(end + 1, (ssize_t)4096);
     /* reset current state, because we are not used in incremental fashion */
     httpReplyReset(rep);
     /* put a string terminator. s is how many bytes to touch in

Cheers
Gerard
Received on Thu Jun 05 2003 - 05:57:22 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:07 MST