--- ../iostream/libs/io/src/file_descriptor.cpp Mon Aug 23 16:43:27 2004 +++ libs/io/src/file_descriptor.cpp Sun Aug 29 23:23:18 2004 @@ -33,7 +33,7 @@ # if defined(BOOST_IO_WINDOWS) # define BOOST_RTL(x) BOOST_JOIN(_, x) # else -# define BOOST_RTL(x) x +# define BOOST_RTL(x) ::x # endif #endif @@ -51,21 +51,18 @@ void file_descriptor_resource::open // Calculate oflag argument to open. int oflag = 0; - switch (m & (ios::in | ios::out)) { - case ios::in: + ios::openmode m_switch = m & (ios::in | ios::out); + if (m_switch == ios::in) { assert(!(m & (ios::app |ios::trunc))); oflag |= O_RDONLY; - break; - case ios::out: + } else if (m_switch == ios::out) { oflag |= O_WRONLY; if (m & ios::app) oflag |= O_APPEND; - break; - case (int) ios::in | (int) ios::out: + } else if (m_switch == (ios::in | ios::out)) { assert(!(m & ios::app)); oflag |= O_RDWR; - break; - } + } if (m & ios::trunc) oflag |= O_CREAT; #ifdef BOOST_IO_WINDOWS