Hello Tommi,
I did an svn update tntdb to pick up the change to tntdb/src/blob.cpp.
I compiled tntdb in subversion again with cxxtools 1.4.6 and tntnet 1.6.1.
Since tntdb/include/tntdb/iface/iblob.h includes cstddef, I assumed that it
really wants std::size_t, so I changed size_t to std::size_t like:
goanna% svn diff tntdb
Index: tntdb/include/tntdb/bits/blob.h
===================================================================
--- tntdb/include/tntdb/bits/blob.h (revision 122)
+++ tntdb/include/tntdb/bits/blob.h (working copy)
@@ -55,7 +55,7 @@
to manage the blob-data and the shared data object. The first \a len
bytes of the data pointed to by \a data are copied to this Blob.
*/
- Blob(const char* data, size_t len)
+ Blob(const char* data, std::size_t len)
: m_data( new BlobImpl() )
{
m_data->assign(data, len);
@@ -69,7 +69,7 @@
/** assigns the data to this blob object
*/
- void assign(const char* data, size_t len)
+ void assign(const char* data, std::size_t len)
{
// copy-on-write
if ( m_data->getRefs() > 1 )
@@ -84,7 +84,7 @@
* If shrink is set, the buffer will be exactly len bytes.
* Data is not preserved when reallocated.
*/
- char* reserve(size_t len, bool shrink = false)
+ char* reserve(std::size_t len, bool shrink = false)
{
return m_data->reserve(len, shrink);
}
@@ -108,7 +108,7 @@
/** Returns the size of the data
*/
- size_t size() const
+ std::size_t size() const
{
return m_data->size();
}
Index: tntdb/include/tntdb/impl/blob.h
===================================================================
--- tntdb/include/tntdb/impl/blob.h (revision 122)
+++ tntdb/include/tntdb/impl/blob.h (working copy)
@@ -42,9 +42,9 @@
delete[] _data;
}
- virtual void assign(const char* data, size_t len);
+ virtual void assign(const char* data, std::size_t len);
- virtual char* reserve(size_t len, bool shrink);
+ virtual char* reserve(std::size_t len, bool shrink);
virtual IBlob* create() const;
Index: tntdb/include/tntdb/iface/iblob.h
===================================================================
--- tntdb/include/tntdb/iface/iblob.h (revision 122)
+++ tntdb/include/tntdb/iface/iblob.h (working copy)
@@ -49,11 +49,11 @@
The \a len bytes of the data pointed to by \a data are copied
to this blob.
*/
- virtual void assign(const char* data, size_t len) = 0;
+ virtual void assign(const char* data, std::size_t len) = 0;
/** @brief Makes sure, the buffer has at least \a len bytes.
*/
- virtual char* reserve(size_t len, bool shrink) = 0;
+ virtual char* reserve(std::size_t len, bool shrink) = 0;
/** @brief Create a value implementation
@@ -71,7 +71,7 @@
/** @brief Returns the size of the blob-data.
*/
- size_t size() const
+ std::size_t size() const
{ return _size; }
/** @brief Returns a pointer to the blob-data or 0 if the blob is empty
@@ -94,7 +94,7 @@
{ }
char* _data;
- size_t _size;
+ std::size_t _size;
};
}
Index: tntdb/src/blob.cpp
===================================================================
--- tntdb/src/blob.cpp (revision 122)
+++ tntdb/src/blob.cpp (working copy)
@@ -24,14 +24,14 @@
IBlob::~IBlob()
{ }
- void BlobImpl::assign(const char* data, size_t len)
+ void BlobImpl::assign(const char* data, std::size_t len)
{
reserve(len, false);
std::memcpy(_data, data, len);
_size = len;
}
- char* BlobImpl::reserve(size_t len, bool shrink)
+ char* BlobImpl::reserve(std::size_t len, bool shrink)
{
if (len == 0 && shrink)
{
Index: tntdb/src/oracle/blob.cpp
===================================================================
--- tntdb/src/oracle/blob.cpp (revision 122)
+++ tntdb/src/oracle/blob.cpp (working copy)
@@ -18,6 +18,7 @@
#include <tntdb/oracle/blob.h>
#include <cxxtools/log.h>
+#include <string.h>
log_define("tntdb.oracle.blob")
goanna%
Then it compiles fine with Sun Studio 12 on Solaris 10.
Thanks, Mark
--
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general