mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-27 23:34:58 +08:00
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:
parent
fca00ffb49
commit
d232925f0b
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user