[Bug libstdc++/43738] basic_file_stdio.cc uses ioctl on a fd, but not available on mingw32

paolo dot carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 15 03:10:00 GMT 2010



------- Comment #5 from paolo dot carlini at oracle dot com  2010-04-15 03:09 -------
(In reply to comment #4)
> MinGW doesn't have sys/ioctl.h; could we test HAVE_SYS_IOCTL_H?  Are there
> likely to be any platforms we support that define FIONREAD but don't have
> sys/ioctl.h?

Dave, if you look at the beginning of the file, it looks like Solaris 2.5 is
one such case. Now, leaving aside for the moment that likely clean-ups are
possible (because Rainer is removing support for some old Solaris* versions, if
I remember correctly), I wonder whether we should simply special case mingw32
and conditional to the macro being defined (don't remember: _MINGW32?) just
include the required headers, and use ioctlsocket in place of ioctl. I think
that in such kind of low level .cc file it's all the elegance we can hope for
;)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43738



More information about the Gcc-bugs mailing list