]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability fix: fix always-true comparison in ICAP for some 32-bit platforms
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 26 May 2011 17:06:00 +0000 (19:06 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 26 May 2011 17:06:00 +0000 (19:06 +0200)
configure.ac
src/adaptation/icap/ModXact.cc

index 06b053d219ed2cdee91b76b1439ab99fccef92fc..21b0603fdc9afc7c512b0bfc7e70d0eadc4f0d3a 100644 (file)
@@ -2428,6 +2428,7 @@ AC_CHECK_SIZEOF(int64_t)
 AC_CHECK_SIZEOF(long)
 #need the define for overflow checks
 AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(size_t)
 
 dnl On Solaris 9 x86, gcc may includes a "fixed" set of old system include files
 dnl that is incompatible with the updated Solaris header files.
index c7e55cd9d14a41876fcdd18548bfdb7f158cdcf4..b5b3d17e2302c389274329e07151afad9f354f6b 100644 (file)
@@ -1809,7 +1809,10 @@ void Adaptation::Icap::VirginBodyAct::disable()
 void Adaptation::Icap::VirginBodyAct::progress(size_t size)
 {
     Must(active());
+#if SIZEOF_SIZE_T > 4
+    /* always true for smaller size_t's */
     Must(static_cast<int64_t>(size) >= 0);
+#endif
     theStart += static_cast<int64_t>(size);
 }