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
This commit is contained in:
Richard Sandiford 2004-02-05 20:11:32 +00:00 committed by Richard Sandiford
parent fca00ffb49
commit d232925f0b
3 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,10 @@
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>
* include/bits/stl_function.h: Minor formatting changes.

View File

@ -267,7 +267,11 @@ namespace std
{
#ifdef FIONREAD
// Pipes and sockets.
#ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T
off_t __num = 0;
#else
int __num = 0;
#endif
int __r = ioctl(this->fd(), FIONREAD, &__num);
if (!__r && __num >= 0)
return __num;

View File

@ -51,5 +51,8 @@
// GCC does not use thunks on IRIX.
#define _G_USING_THUNKS 0
// FINOREAD takes an "off_t *" as argument.
#define _GLIBCXX_FIONREAD_TAKES_OFF_T
#endif