This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Accessing the UNIX file descriptor inside an fstream
- To: Zack Weinberg <zack at codesourcery dot com>
- Subject: Re: Accessing the UNIX file descriptor inside an fstream
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 15 Sep 2001 20:51:07 +0200
- Cc: Chris Rankin <rankinc at pacbell dot net>, libstdc++ at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200109150420.f8F4KCu17156@twopit.underworld> <20010914223533.J443@codesourcery.com>
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