bac508cecb
new things to bitch about
28 lines
839 B
Text
28 lines
839 B
Text
$NetBSD: patch-bj,v 1.2 2007/05/22 12:17:49 spz Exp $
|
|
|
|
--- ./src/Core/util/Buffer.cc.orig 2006-10-09 18:05:14.000000000 +0200
|
|
+++ ./src/Core/util/Buffer.cc
|
|
@@ -36,7 +36,11 @@
|
|
#include <cassert>
|
|
#include <iomanip>
|
|
#include <cctype>
|
|
+#if (__GNUC__ > 2)
|
|
#include <ostream>
|
|
+#else
|
|
+#include <ostream.h>
|
|
+#endif
|
|
|
|
using namespace std;
|
|
|
|
@@ -174,7 +178,10 @@ Buffer::uncompress()
|
|
|
|
void Buffer::extend(unsigned long minExtend) {
|
|
assert(!callerAllocated); // !!!
|
|
- capacity = (capacity + BufferExtendIncrement) >? (size + minExtend);
|
|
+ // using deprecated g++ only operators is not that portable,
|
|
+ // use ordinary trigraph instead
|
|
+ capacity = ( (capacity + BufferExtendIncrement) > (size + minExtend) ) ?
|
|
+ (capacity + BufferExtendIncrement) : (size + minExtend);
|
|
contents = (char *)realloc(contents, capacity);
|
|
}
|
|
|