This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
problems porting Common-C++
- To: libstdc++ at sources dot redhat dot com
- Subject: problems porting Common-C++
- From: Felix Natter <f dot natter at ndh dot net>
- Date: 19 Jun 2001 18:27:53 +0200
hi,
I am currently trying to port commoncpp (Common-C++, can be found
on a GNU-mirror) to gcc 3.x, and I have a few problems:
- i/ostream::init(streambuf*): make this publicly accessible ?:
this is used in classes that derive from e.g. streambuf + iostream,
so that streambuf is initalized when iostream uses it.
(but this problem could potentially be worked around by inheriting in the
right order, I don't know)
- socket.cpp: missing std::streambuf::setb(...):
what does this do ? is it necessary or can it be replaced ?
here is the code that uses it:
void TCPStream::Allocate(int size)
{
if(size < 2)
{
bufsize = 1;
return;
}
gbuf = new char[size];
pbuf = new char[size];
if(!pbuf || !gbuf)
{
Error(SOCKET_RESOURCE_FAILURE);
return;
}
bufsize = size;
clear();
setb(gbuf, gbuf + size, 0);
setg(gbuf, gbuf + size, gbuf + size);
setp(pbuf, pbuf + size);
}
--
Felix Natter