basic_file_stdio.cc in __basic_file<char>::showmanyc() uses ioctl with FIONREAD, but the equivalent on win32 is ioctlsocket, perhaps not usable here, because I think there is not support for socket here in gcc (I'm wrong?)
anyway it does not compiles I solve this by commenting out that part int __r = ioctl(this->fd(), FIONREAD, &__num); if (!__r && __num >= 0) return __num; the problem still there since 4.3 iirc, I'm the only that noticed it? there is something wrong in my setup? my configure options: ../gcc/configure \ --prefix=/mingw \ --disable-bootstrap \ --with-gnu-ld \ --target=i686-pc-mingw32 \ --with-tune=generic \ --with-cpu=i686 \ --disable-cpp \ --disable-win32-registry \ --disable-shared \ --enable-static \ --program-suffix=-4.6 \ --enable-version-specific-runtime-libs \ --enable-languages=c,c++ \ --enable-cld \ --enable-__cxa_atexit \ --disable-werror \ --disable-checking \ --enable-multilib \ --enable-threads=posix \ --disable-libssp \ --with-dwarf2 \ --disable-nls \ --with-ppl \ --disable-cloog \ --enable-libgomp -- Summary: basic_file_stdio.cc uses ioctl on a fd, but not available on mingw32 Product: gcc Version: unknown Status: UNCONFIRMED Severity: major Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sherpya at netfarm dot it GCC build triplet: i686-pc-mingw32 GCC host triplet: i686-pc-mingw32 GCC target triplet: i686-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43738