[patch libstdc++]: PR/43738 - basic_file_stdio.cc uses ioctl on a fd, but not available on mingw32

Paolo Carlini paolo.carlini@oracle.com
Thu Dec 2 12:07:00 GMT 2010


On 12/02/2010 12:32 PM, Kai Tietz wrote:
> Hello,
>
> This patch fixes the described issue (as discussed in the bug-report).
>
> ChangeLog
>
>         PR libstdc++/43738
>         * config/io/basic_file_stdio.cc (showmanyc): Special case for 
> mingw targets.
>
> Tested for i686-w64-mingw32, x86_64-w64-mingw32, and regression tested for 
> i686-pc-cygwin. Ok for apply?
>   
Please always CC libstdc++ too when submitting patches for the C++ runtime.

I would suggest instead defining a macro in
config/os/mingw32/os_defines.h, a _GLIBCXX_NO_IOCTL or something and
checking that is not defined in showmanyc before checking FIONREAD etc.
And add a comment in that os_defines.h about the issue, maybe somebody
will want to work on something better for mingw32 and/or just add an
autoconf test for ioctl and clean up a bit of this mess.

Paolo.




More information about the Libstdc++ mailing list