Commit d232925f by Richard Sandiford Committed by Richard Sandiford

os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T): Define.

	* config/os/irix/irix6.5/os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T):
	Define.
	* config/io/basic_file_stdio.cc (__basic_file<char>::showmanyc): Use
	it to decide whether FIONREAD should take an off_t or int argument.

From-SVN: r77336
parent fca00ffb
2004-02-05 Richard Sandiford <rsandifo@redhat.com>
* config/os/irix/irix6.5/os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T):
Define.
* config/io/basic_file_stdio.cc (__basic_file<char>::showmanyc): Use
it to decide whether FIONREAD should take an off_t or int argument.
2004-02-05 Paolo Carlini <pcarlini@suse.de> 2004-02-05 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_function.h: Minor formatting changes. * include/bits/stl_function.h: Minor formatting changes.
......
...@@ -267,7 +267,11 @@ namespace std ...@@ -267,7 +267,11 @@ namespace std
{ {
#ifdef FIONREAD #ifdef FIONREAD
// Pipes and sockets. // Pipes and sockets.
#ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T
off_t __num = 0;
#else
int __num = 0; int __num = 0;
#endif
int __r = ioctl(this->fd(), FIONREAD, &__num); int __r = ioctl(this->fd(), FIONREAD, &__num);
if (!__r && __num >= 0) if (!__r && __num >= 0)
return __num; return __num;
......
...@@ -51,5 +51,8 @@ ...@@ -51,5 +51,8 @@
// GCC does not use thunks on IRIX. // GCC does not use thunks on IRIX.
#define _G_USING_THUNKS 0 #define _G_USING_THUNKS 0
// FINOREAD takes an "off_t *" as argument.
#define _GLIBCXX_FIONREAD_TAKES_OFF_T
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment