This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?

Regards,
Kai

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

Index: gcc/libstdc++-v3/config/io/basic_file_stdio.cc
===================================================================
--- gcc.orig/libstdc++-v3/config/io/basic_file_stdio.cc 2010-02-22 
11:48:20.000000000 +0100
+++ gcc/libstdc++-v3/config/io/basic_file_stdio.cc      2010-12-02 
12:22:04.722391500 +0100
@@ -334,7 +334,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   streamsize
   __basic_file<char>::showmanyc()
   {
-#ifdef FIONREAD
+#if defined(FIONREAD) && !defined(__MINGW32__)
     // Pipes and sockets.
 #ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T
     off_t __num = 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]