basic_file_stdio.cc (_M_open_mode): Assign __p_mode rather than or'ing.

* config/io/basic_file_stdio.cc (_M_open_mode): Assign __p_mode
	rather than or'ing.

From-SVN: r71265
This commit is contained in:
Alan Modra 2003-09-10 12:02:51 +00:00 committed by Alan Modra
parent 39adabaf32
commit 80e46d778a
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2003-09-10 Alan Modra <amodra@bigpond.net.au>
* config/io/basic_file_stdio.cc (_M_open_mode): Assign __p_mode
rather than or'ing.
2003-09-09 Alan Modra <amodra@bigpond.net.au> 2003-09-09 Alan Modra <amodra@bigpond.net.au>
* configure: Regenerate. * configure: Regenerate.

View File

@ -87,33 +87,33 @@ namespace std
if (!__testi && __testo && !__testt && !__testa) if (!__testi && __testo && !__testt && !__testa)
{ {
strcpy(__c_mode, "w"); strcpy(__c_mode, "w");
__p_mode = (O_WRONLY | O_CREAT); __p_mode = O_WRONLY | O_CREAT;
} }
if (!__testi && __testo && !__testt && __testa) if (!__testi && __testo && !__testt && __testa)
{ {
strcpy(__c_mode, "a"); strcpy(__c_mode, "a");
__p_mode |= O_WRONLY | O_CREAT | O_APPEND; __p_mode = O_WRONLY | O_CREAT | O_APPEND;
} }
if (!__testi && __testo && __testt && !__testa) if (!__testi && __testo && __testt && !__testa)
{ {
strcpy(__c_mode, "w"); strcpy(__c_mode, "w");
__p_mode |= O_WRONLY | O_CREAT | O_TRUNC; __p_mode = O_WRONLY | O_CREAT | O_TRUNC;
} }
if (__testi && !__testo && !__testt && !__testa) if (__testi && !__testo && !__testt && !__testa)
{ {
strcpy(__c_mode, "r"); strcpy(__c_mode, "r");
__p_mode |= O_RDONLY; __p_mode = O_RDONLY;
} }
if (__testi && __testo && !__testt && !__testa) if (__testi && __testo && !__testt && !__testa)
{ {
strcpy(__c_mode, "r+"); strcpy(__c_mode, "r+");
__p_mode |= O_RDWR | O_CREAT; __p_mode = O_RDWR | O_CREAT;
} }
if (__testi && __testo && __testt && !__testa) if (__testi && __testo && __testt && !__testa)
{ {
strcpy(__c_mode, "w+"); strcpy(__c_mode, "w+");
__p_mode |= O_RDWR | O_CREAT | O_TRUNC; __p_mode = O_RDWR | O_CREAT | O_TRUNC;
} }
if (__testb) if (__testb)
strcat(__c_mode, "b"); strcat(__c_mode, "b");