This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



> ...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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]