C++ Streams and the underlying file descriptor

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat Apr 1 00:00:00 GMT 2000


> 1) Is the filedesc() and or fstream::rdbuf()->fd() methods standard
> practice on POSIX systems?

I'm not certain SunPro CC4 has filebuf::fd(); SunPro CC 5 has it if
_RWSTD_NO_EXTENSION is not defined. I could not find another system
that has filedesc; perhaps there is no point in maintaining that
anymore.

> 2) When the new libstdc++ makes it into gcc can I expect the
> _STREAM_COMPAT to be defined by default on most unix like systems? 

They are defined if you include old-style headers, like stream.h, and
they are not recommended for new code. However, filebuf::fd does not
depend on this define.

Regards,
Martin


More information about the Libstdc++ mailing list