summaryrefslogtreecommitdiff
path: root/libstdc++-v3/config
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-10 12:02:51 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-10 12:02:51 +0000
commitdb6bb48c0cfb7caebbf6e316d7b01c7fb7fe36cb (patch)
tree490d966b3cf64a233db4d3fbdc9009934e222a0b /libstdc++-v3/config
parent0e4b822616351df513ec571aa816cb6f43d0d262 (diff)
downloadgcc-db6bb48c0cfb7caebbf6e316d7b01c7fb7fe36cb.tar.gz
* config/io/basic_file_stdio.cc (_M_open_mode): Assign __p_mode
rather than or'ing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71265 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config')
-rw-r--r--libstdc++-v3/config/io/basic_file_stdio.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc
index 5a3921c46d3..5791135eb54 100644
--- a/libstdc++-v3/config/io/basic_file_stdio.cc
+++ b/libstdc++-v3/config/io/basic_file_stdio.cc
@@ -87,33 +87,33 @@ namespace std
if (!__testi && __testo && !__testt && !__testa)
{
strcpy(__c_mode, "w");
- __p_mode = (O_WRONLY | O_CREAT);
+ __p_mode = O_WRONLY | O_CREAT;
}
if (!__testi && __testo && !__testt && __testa)
{
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)
{
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)
{
strcpy(__c_mode, "r");
- __p_mode |= O_RDONLY;
+ __p_mode = O_RDONLY;
}
if (__testi && __testo && !__testt && !__testa)
{
strcpy(__c_mode, "r+");
- __p_mode |= O_RDWR | O_CREAT;
+ __p_mode = O_RDWR | O_CREAT;
}
if (__testi && __testo && __testt && !__testa)
{
strcpy(__c_mode, "w+");
- __p_mode |= O_RDWR | O_CREAT | O_TRUNC;
+ __p_mode = O_RDWR | O_CREAT | O_TRUNC;
}
if (__testb)
strcat(__c_mode, "b");