Re: Polygraph v3.1.5 available

Alex Rousskov <[email protected]> Mon, 17 Mar 2008 09:17:21 -0600
Newsgroups gmane.comp.web.web-polygraph.user
Message-ID <[email protected]>
On Mon, 2008-03-17 at 04:48 +0000, Richard Wall wrote:

> I had to do this to get it to compile on Ubuntu Gutsy.
> ...
> +++ src/runtime/SslWrap.cc      2008-03-17 04:32:12 +0000
> +#include <cassert>

Noted, thank you. The SslWrap code should have used Assert() defined in
xstd/Assert.h instead of assert(). Your fix should work. I have attached
the committed fix.

Thanks,

Alex.

_______________________________________________
Users mailing list
Users-mN9fGWdlm5pku/f+YMZH/di2O/[email protected]
http://www.web-polygraph.org/mailman/listinfo/users
assert.diff (text/x-patch, 1.3 KB)
Fixed "undefined assert()" compilation error on Ubuntu Gutsy,
reported by Richard Wall.

Index: src/runtime/SslWrap.cc
===================================================================
--- src/runtime/SslWrap.cc	(revision 9772)
+++ src/runtime/SslWrap.cc	(working copy)
@@ -10,6 +10,7 @@
 #include "xstd/Checksum.h"
 #include "xstd/Map.h"
 
+#include "xstd/Assert.h"
 #include "xstd/Ssl.h"
 #include "xstd/StrIdentifier.h"
 #include "xstd/rndDistrs.h"
@@ -343,12 +344,12 @@
 }
 
 bool SslCommand::runIfNeeded() {
-	assert(theWrap);
+	Assert(theWrap);
 
 	if (theState == stError) // construction error
 		return false;
 
-	assert(theState == stUnknown);
+	Assert(theState == stUnknown);
 
 	const String cmd = thePrefix + theSuffix;
 	if (cmd.str(TheUnknownFileName)) {
@@ -377,7 +378,7 @@
 	} else
 	if (theState == stSuccess) {
 		Comment << "skipping cached: " << cmd << endc;
-		assert(theWrap->canShare);
+		Assert(theWrap->canShare);
 	} else
 	if (theState == stError) {
 		Comment << "skipping error: " << cmd << endc;
@@ -392,7 +393,7 @@
 
 String SslCommand::calcKey(const String &cmd) const {
 	const String path = theWrap->sharingPath();
-	assert(path.len() > 0);
+	Assert(path.len() > 0);
 	ChecksumAlg alg;
 	alg.update(cmd.data(), cmd.len());
 	alg.update(path.data(), path.len());