This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: Accessing the UNIX file descriptor inside an fstream


Zack Weinberg <zack@codesourcery.com> writes:

| On Fri, Sep 14, 2001 at 09:20:12PM -0700, Chris Rankin wrote:
| > Hi,
| > 
| > Yes, I am fully aware that this topic has been brought up before. I
| > have found numerous references in the mailing list going back to
| > January 2000. However, I doubt that you'll make it go away by ignoring
| > it, especially since libstdc++-v3 is now part of gcc.
| > 
| > I am (was) trying to port some C++ code from g++-2.95.3 to g++-3.0.1
| > and the showstopper problem was this single line:
| > 
| >   fcntl(m_file.rdbuf()->fd(), F_SETFD, FD_CLOEXEC);
| 
| Given the existence of the extended basic_filebuf constructor, I think
| it would be reasonable to provide an operator FILE *() member on

This is an old issue.  No body is denying the need for a category of
prgrammers for non-standard extensions.  
However, I'm not at all convinced that what is proposed at the current
level of developement is the right solution.  The nonstandard
interfaces are not stabilized yet.  It is hard to remove a
non-standard feature once it is in and documented.  It is not an overly
anal pedantic conformance issue.

A better solution is to extend the IOSttream hierarchy for FILE*-based
stream -- there are some implementations around there.

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com


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