Porting question from previous libstdc++ to 2.90.8...

Benjamin Kosnik bkoz@cygnus.com
Wed Apr 19 14:56:00 GMT 2000


> ...I have a pair of classes that subclass streambuf and ostream to provide an
> ostream that writes to a socket.  It doesn't work right with the new libstdc++
> and I wondered if there was some sort of guide for porting code that does this
> sort of thing.

Hmm. I'm not aware of a porting guide. It would be nice to have something
like this integrated into the rest of the pre-chapter documentation. I
know specific issues like dealing with microsoft strings are already
covered.

(see the documention page)


> As an aside--is there a method by which I can pass a file descriptor to an
> ofstream instead of a file name?  I conjecture that if such a feature was
> available, I could pass the return value of socket() (socket file descriptor)
> in place of the regular file descriptor and have this work.

this is non-standard, and in the filebuf code:

 basic_filebuf(int __fd, const char* __name, ios_base::openmode __mode)

-benjamin



More information about the Libstdc++ mailing list