This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

RE: Legalize access to file descriptors now! (So sue me.)


On Wed, 2005-02-16 at 15:42 -0800, Jan Reimers wrote:
> Interesting read .. thank you.
> 
> How about the inverse problem: making a stream (or fstream) given a file
> descriptor?  This arises when creating temporary files using mkstemp().

This one is easy. It has been implemented for about a year or two....
Have a look at ext::stdio_filebuf.

This being said, I have always been in favor of providing some way to
get the fileno or the FILE* from a stream (for memory mapping issues
among others).

Yes please "Legalize access to file descriptors now! ", make it under
some flag for gnu-extension with no guaranties if people use both the
stream and the fileno or FILE* and write everywhere that this is a
temporary measure that will disappear as soon as a better solution is
standardized...

In the meantime, thank's for the code Richard.

Theo.


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