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:
Danny Smith 2002-12-24 02:48:19 +00:00 committed by Danny Smith
parent 94be8403e2
commit 2ae1162e06
2 changed files with 12 additions and 0 deletions

View File

@ -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.

View File

@ -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;
}