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

Joe Buck Joe.Buck@synopsys.COM
Thu Feb 17 01:51:00 GMT 2005


On Wed, Feb 16, 2005 at 11:56:29PM +0100, Richard B. Kreckel wrote:
> So, here is my lament: http://www.ginac.de/~kreckel/fileno/.

It would seem that there's a case to be made for this; just as fileno is
not a standard ISO C function (C does not require the existence of integer
file descriptors), but is a standard Posix function (Posix does), maybe
there should be a clean fileno function for streams (as long as it can
return an exceptional value for streams that have no matching file
descriptor, like stringstreams); such a function would not be part of ISO
C++, but it would be part of whatever the appropriate Posix/C++ binding
is.

In the meantime, if you want people to pick up your hack, you'd need to
give it a real license.  You give people permission to use it "free of
charge" but give no permission to modify it or redistribute it.  Better
to just pick a standard license that reflects your wishes.

Can anyone point to any standardization efforts that cover the C++
equivalent to the C "in Posix but not in ANSI/ISO" ground?



More information about the Libstdc++ mailing list