mirror of git://gcc.gnu.org/git/gcc.git
re PR libstdc++/43738 (basic_file_stdio.cc uses ioctl on a fd, but not available on mingw32)
2010-12-02 Kai Tietz <kai.tietz@onevision.com>
PR libstdc++/43738
* config/io/basic_file_stdio.cc (showmanyc): Check _GLIBCXX_NO_IOCTL
before use of ioctl.
* config/os/mingw32/os_defines.h (_GLIBCXX_NO_IOCTL): New.
From-SVN: r167369
This commit is contained in:
parent
8529e24b96
commit
266afdd60e
|
|
@ -1,3 +1,10 @@
|
||||||
|
2010-12-02 Kai Tietz <kai.tietz@onevision.com>
|
||||||
|
|
||||||
|
PR libstdc++/43738
|
||||||
|
* config/io/basic_file_stdio.cc (showmanyc): Check _GLIBCXX_NO_IOCTL
|
||||||
|
before use of ioctl.
|
||||||
|
* config/os/mingw32/os_defines.h (_GLIBCXX_NO_IOCTL): New.
|
||||||
|
|
||||||
2010-12-01 François Dumont <francois.cppdevs@free.fr>
|
2010-12-01 François Dumont <francois.cppdevs@free.fr>
|
||||||
|
|
||||||
* testsuite/23_containers/deque/cons/2.cc: Fix to explicitely invoke
|
* testsuite/23_containers/deque/cons/2.cc: Fix to explicitely invoke
|
||||||
|
|
|
||||||
|
|
@ -334,6 +334,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
streamsize
|
streamsize
|
||||||
__basic_file<char>::showmanyc()
|
__basic_file<char>::showmanyc()
|
||||||
{
|
{
|
||||||
|
#ifndef _GLIBCXX_NO_IOCTL
|
||||||
#ifdef FIONREAD
|
#ifdef FIONREAD
|
||||||
// Pipes and sockets.
|
// Pipes and sockets.
|
||||||
#ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T
|
#ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T
|
||||||
|
|
@ -345,6 +346,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
if (!__r && __num >= 0)
|
if (!__r && __num >= 0)
|
||||||
return __num;
|
return __num;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_HAVE_POLL
|
#ifdef _GLIBCXX_HAVE_POLL
|
||||||
// Cheap test.
|
// Cheap test.
|
||||||
|
|
|
||||||
|
|
@ -60,4 +60,9 @@
|
||||||
// See libstdc++/37522.
|
// See libstdc++/37522.
|
||||||
#define _GLIBCXX_HAVE_BROKEN_VSWPRINTF 1
|
#define _GLIBCXX_HAVE_BROKEN_VSWPRINTF 1
|
||||||
|
|
||||||
|
// See libstdc++/43738
|
||||||
|
// On native windows targets there is no ioctl function. And the existing
|
||||||
|
// ioctlsocket function doesn't work for normal file-descriptors.
|
||||||
|
#define _GLIBCXX_NO_IOCTL 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue