mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-25 07:44:06 +08:00
basic_file_stdio.cc (__basic_file::_M_open_mode): Don't use O_NONBLOCK if it is not defined.
* config/io/basic_file_stdio.cc (__basic_file::_M_open_mode): Don't use O_NONBLOCK if it is not defined. (__basic_file::open): Don't use fcntl either. From-SVN: r60461
This commit is contained in:
parent
94be8403e2
commit
2ae1162e06
@ -1,3 +1,9 @@
|
||||
2002-12-23 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* config/io/basic_file_stdio.cc (__basic_file::_M_open_mode):
|
||||
Don't use O_NONBLOCK if it is not defined.
|
||||
(__basic_file::open): Don't use fcntl either.
|
||||
|
||||
2002-12-20 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
|
||||
|
||||
* include/bits/stl_deque.h: Fix typo.
|
||||
|
@ -74,7 +74,11 @@ namespace std
|
||||
if (__testi && !__testo && !__testt && !__testa)
|
||||
{
|
||||
strcpy(__c_mode, "r");
|
||||
#if defined (O_NONBLOCK)
|
||||
__p_mode |= O_RDONLY | O_NONBLOCK;
|
||||
#else
|
||||
__p_mode |= O_RDONLY;
|
||||
#endif
|
||||
}
|
||||
if (__testi && __testo && !__testt && !__testa)
|
||||
{
|
||||
@ -151,9 +155,11 @@ namespace std
|
||||
{
|
||||
_M_cfile_created = true;
|
||||
|
||||
#if defined (F_SETFL) && defined (O_NONBLOCK)
|
||||
// Set input to nonblocking for fifos.
|
||||
if (__mode & ios_base::in)
|
||||
fcntl(this->fd(), F_SETFL, O_NONBLOCK);
|
||||
#endif
|
||||
|
||||
__ret = this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user