This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch libstdc++]: PR/43738 - basic_file_stdio.cc uses ioctl on a fd, but not available on mingw32
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 02 Dec 2010 13:07:24 +0100
- Subject: Re: [patch libstdc++]: PR/43738 - basic_file_stdio.cc uses ioctl on a fd, but not available on mingw32
- References: <OF5048B737.A8434754-ONC12577ED.003EE04B-C12577ED.003F6571@onevision.de>
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.